This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
compiler/rustc_ast_passes/src Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ struct AstValidator<'a> {
8181 features : & ' a Features ,
8282
8383 /// The span of the `extern` in an `extern { ... }` block, if any.
84- extern_mod : Option < & ' a Item > ,
84+ extern_mod : Option < Span > ,
8585
8686 outer_trait_or_trait_impl : Option < TraitOrTraitImpl < ' a > > ,
8787
@@ -579,7 +579,7 @@ impl<'a> AstValidator<'a> {
579579 }
580580
581581 fn current_extern_span ( & self ) -> Span {
582- self . session . source_map ( ) . guess_head_span ( self . extern_mod . unwrap ( ) . span )
582+ self . session . source_map ( ) . guess_head_span ( self . extern_mod . unwrap ( ) )
583583 }
584584
585585 /// An `fn` in `extern { ... }` cannot have qualifiers, e.g. `async fn`.
@@ -1080,7 +1080,7 @@ impl<'a> Visitor<'a> for AstValidator<'a> {
10801080 }
10811081 ItemKind :: ForeignMod ( ForeignMod { abi, safety, .. } ) => {
10821082 self . with_in_extern_mod ( * safety, |this| {
1083- let old_item = mem:: replace ( & mut this. extern_mod , Some ( item) ) ;
1083+ let old_item = mem:: replace ( & mut this. extern_mod , Some ( item. span ) ) ;
10841084 this. visibility_not_permitted (
10851085 & item. vis ,
10861086 errors:: VisibilityNotPermittedNote :: IndividualForeignItems ,
You can’t perform that action at this time.
0 commit comments