@@ -30,7 +30,7 @@ use crate::diagnostics::{DiagMode, Suggestion, import_candidates};
3030use crate :: errors:: {
3131 CannotBeReexportedCratePublic , CannotBeReexportedCratePublicNS , CannotBeReexportedPrivate ,
3232 CannotBeReexportedPrivateNS , CannotDetermineImportResolution , CannotGlobImportAllCrates ,
33- ConsiderAddingMacroExport , ConsiderMarkingAsPub ,
33+ ConsiderAddingMacroExport , ConsiderMarkingAsPub , ConsiderMarkingAsPubCrate ,
3434} ;
3535use crate :: {
3636 AmbiguityError , AmbiguityKind , BindingKey , CmResolver , Determinacy , Finalize , ImportSuggestion ,
@@ -184,6 +184,9 @@ pub(crate) struct ImportData<'ra> {
184184 /// |`use foo` | `ModuleOrUniformRoot::CurrentScope` | - |
185185 pub imported_module : Cell < Option < ModuleOrUniformRoot < ' ra > > > ,
186186 pub vis : Visibility ,
187+
188+ /// Span of the visibility.
189+ pub vis_span : Span ,
187190}
188191
189192/// All imports are unique and allocated on a same arena,
@@ -1368,6 +1371,9 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
13681371 err. subdiagnostic ( ConsiderAddingMacroExport {
13691372 span : binding. span ,
13701373 } ) ;
1374+ err. subdiagnostic ( ConsiderMarkingAsPubCrate {
1375+ vis_span : import. vis_span ,
1376+ } ) ;
13711377 }
13721378 _ => {
13731379 err. subdiagnostic ( ConsiderMarkingAsPub {
0 commit comments