Skip to content

Commit efd2619

Browse files
committed
dont clone old syntax context
1 parent 0d63418 commit efd2619

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

compiler/rustc_span/src/hygiene.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1420,7 +1420,8 @@ pub fn decode_syntax_context<D: Decoder, F: FnOnce(&mut D, u32) -> SyntaxContext
14201420
&& old.outer_transparency == ctxt_data.outer_transparency
14211421
&& old.parent == ctxt_data.parent
14221422
{
1423-
ctxt_data = old.clone();
1423+
ctxt_data.opaque = old.opaque;
1424+
ctxt_data.opaque_and_semitransparent = old.opaque_and_semitransparent;
14241425
}
14251426

14261427
let dummy = std::mem::replace(

0 commit comments

Comments
 (0)