@@ -51,13 +51,13 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
5151 mut self : CmResolver < ' r , ' ra , ' tcx > ,
5252 scope_set : ScopeSet < ' ra > ,
5353 parent_scope : & ParentScope < ' ra > ,
54- orig_ctxt : SyntaxContext ,
54+ orig_ctxt : Span ,
5555 derive_fallback_lint_id : Option < NodeId > ,
5656 mut visitor : impl FnMut (
5757 & mut CmResolver < ' r , ' ra , ' tcx > ,
5858 Scope < ' ra > ,
5959 UsePrelude ,
60- SyntaxContext ,
60+ Span ,
6161 ) -> ControlFlow < T > ,
6262 ) -> Option < T > {
6363 // General principles:
@@ -236,11 +236,12 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
236236 fn hygienic_lexical_parent (
237237 & self ,
238238 module : Module < ' ra > ,
239- ctxt : & mut SyntaxContext ,
239+ span : & mut Span ,
240240 derive_fallback_lint_id : Option < NodeId > ,
241241 ) -> Option < ( Module < ' ra > , Option < NodeId > ) > {
242- if !module. expansion . outer_expn_is_descendant_of ( * ctxt) {
243- return Some ( ( self . expn_def_scope ( ctxt. remove_mark ( ) ) , None ) ) ;
242+ let ctxt = span. ctxt ( ) ;
243+ if !module. expansion . outer_expn_is_descendant_of ( ctxt) {
244+ return Some ( ( self . expn_def_scope ( span. remove_mark ( ) ) , None ) ) ;
244245 }
245246
246247 if let ModuleKind :: Block = module. kind {
@@ -270,7 +271,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
270271 let ext = & self . get_macro_by_def_id ( def_id) . ext ;
271272 if ext. builtin_name . is_none ( )
272273 && ext. macro_kinds ( ) == MacroKinds :: DERIVE
273- && parent. expansion . outer_expn_is_descendant_of ( * ctxt)
274+ && parent. expansion . outer_expn_is_descendant_of ( ctxt)
274275 {
275276 return Some ( ( parent, derive_fallback_lint_id) ) ;
276277 }
@@ -431,10 +432,10 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
431432 let break_result = self . visit_scopes (
432433 scope_set,
433434 parent_scope,
434- orig_ident. span . ctxt ( ) ,
435+ orig_ident. span ,
435436 derive_fallback_lint_id,
436437 |this, scope, use_prelude, ctxt| {
437- let ident = Ident :: new ( orig_ident. name , orig_ident . span . with_ctxt ( ctxt) ) ;
438+ let ident = Ident :: new ( orig_ident. name , ctxt) ;
438439 // The passed `ctxt` is already normalized, so avoid expensive double normalization.
439440 let ident = Macros20NormalizedIdent ( ident) ;
440441 let res = match this. reborrow ( ) . resolve_ident_in_scope (
0 commit comments