@@ -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 ,
@@ -188,6 +188,9 @@ pub(crate) struct ImportData<'ra> {
188188 /// |`use foo` | `ModuleOrUniformRoot::CurrentScope` | - |
189189 pub imported_module : Cell < Option < ModuleOrUniformRoot < ' ra > > > ,
190190 pub vis : Visibility ,
191+
192+ /// Span of the visibility.
193+ pub vis_span : Span ,
191194}
192195
193196/// All imports are unique and allocated on a same arena,
@@ -1373,6 +1376,9 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
13731376 err. subdiagnostic ( ConsiderAddingMacroExport {
13741377 span : binding. span ,
13751378 } ) ;
1379+ err. subdiagnostic ( ConsiderMarkingAsPubCrate {
1380+ vis_span : import. vis_span ,
1381+ } ) ;
13761382 }
13771383 _ => {
13781384 err. subdiagnostic ( ConsiderMarkingAsPub {
0 commit comments