File tree 1 file changed +3
-3
lines changed
compiler/rustc_ast_passes/src
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ struct AstValidator<'a> {
81
81
features : & ' a Features ,
82
82
83
83
/// The span of the `extern` in an `extern { ... }` block, if any.
84
- extern_mod : Option < & ' a Item > ,
84
+ extern_mod : Option < Span > ,
85
85
86
86
outer_trait_or_trait_impl : Option < TraitOrTraitImpl < ' a > > ,
87
87
@@ -579,7 +579,7 @@ impl<'a> AstValidator<'a> {
579
579
}
580
580
581
581
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 ( ) )
583
583
}
584
584
585
585
/// An `fn` in `extern { ... }` cannot have qualifiers, e.g. `async fn`.
@@ -1080,7 +1080,7 @@ impl<'a> Visitor<'a> for AstValidator<'a> {
1080
1080
}
1081
1081
ItemKind :: ForeignMod ( ForeignMod { abi, safety, .. } ) => {
1082
1082
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 ) ) ;
1084
1084
this. visibility_not_permitted (
1085
1085
& item. vis ,
1086
1086
errors:: VisibilityNotPermittedNote :: IndividualForeignItems ,
You can’t perform that action at this time.
0 commit comments