@@ -30,7 +30,7 @@ use crate::diagnostics::{DiagMode, Suggestion, import_candidates};
30
30
use crate :: errors:: {
31
31
CannotBeReexportedCratePublic , CannotBeReexportedCratePublicNS , CannotBeReexportedPrivate ,
32
32
CannotBeReexportedPrivateNS , CannotDetermineImportResolution , CannotGlobImportAllCrates ,
33
- ConsiderAddingMacroExport , ConsiderMarkingAsPub ,
33
+ ConsiderAddingMacroExport , ConsiderMarkingAsPub , ConsiderMarkingAsPubCrate ,
34
34
} ;
35
35
use crate :: {
36
36
AmbiguityError , AmbiguityKind , BindingKey , CmResolver , Determinacy , Finalize , ImportSuggestion ,
@@ -184,6 +184,9 @@ pub(crate) struct ImportData<'ra> {
184
184
/// |`use foo` | `ModuleOrUniformRoot::CurrentScope` | - |
185
185
pub imported_module : Cell < Option < ModuleOrUniformRoot < ' ra > > > ,
186
186
pub vis : Visibility ,
187
+
188
+ /// Span of the visibility.
189
+ pub vis_span : Span ,
187
190
}
188
191
189
192
/// All imports are unique and allocated on a same arena,
@@ -1368,6 +1371,9 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
1368
1371
err. subdiagnostic ( ConsiderAddingMacroExport {
1369
1372
span : binding. span ,
1370
1373
} ) ;
1374
+ err. subdiagnostic ( ConsiderMarkingAsPubCrate {
1375
+ vis_span : import. vis_span ,
1376
+ } ) ;
1371
1377
}
1372
1378
_ => {
1373
1379
err. subdiagnostic ( ConsiderMarkingAsPub {
0 commit comments