File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -237,6 +237,12 @@ impl HygieneData {
237
237
fn prev_ctxt ( & self , ctxt : SyntaxContext ) -> SyntaxContext {
238
238
self . syntax_contexts [ ctxt. 0 as usize ] . prev_ctxt
239
239
}
240
+
241
+ fn remove_mark ( & self , ctxt : & mut SyntaxContext ) -> Mark {
242
+ let outer_mark = self . syntax_contexts [ ctxt. 0 as usize ] . outer_mark ;
243
+ * ctxt = self . prev_ctxt ( * ctxt) ;
244
+ outer_mark
245
+ }
240
246
}
241
247
242
248
pub fn clear_markings ( ) {
@@ -406,11 +412,7 @@ impl SyntaxContext {
406
412
/// invocation of f that created g1.
407
413
/// Returns the mark that was removed.
408
414
pub fn remove_mark ( & mut self ) -> Mark {
409
- HygieneData :: with ( |data| {
410
- let outer_mark = data. syntax_contexts [ self . 0 as usize ] . outer_mark ;
411
- * self = data. prev_ctxt ( * self ) ;
412
- outer_mark
413
- } )
415
+ HygieneData :: with ( |data| data. remove_mark ( self ) )
414
416
}
415
417
416
418
pub fn marks ( mut self ) -> Vec < ( Mark , Transparency ) > {
You can’t perform that action at this time.
0 commit comments