@@ -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 ,
@@ -188,6 +188,9 @@ pub(crate) struct ImportData<'ra> {
188
188
/// |`use foo` | `ModuleOrUniformRoot::CurrentScope` | - |
189
189
pub imported_module : Cell < Option < ModuleOrUniformRoot < ' ra > > > ,
190
190
pub vis : Visibility ,
191
+
192
+ /// Span of the visibility.
193
+ pub vis_span : Span ,
191
194
}
192
195
193
196
/// All imports are unique and allocated on a same arena,
@@ -1373,6 +1376,9 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
1373
1376
err. subdiagnostic ( ConsiderAddingMacroExport {
1374
1377
span : binding. span ,
1375
1378
} ) ;
1379
+ err. subdiagnostic ( ConsiderMarkingAsPubCrate {
1380
+ vis_span : import. vis_span ,
1381
+ } ) ;
1376
1382
}
1377
1383
_ => {
1378
1384
err. subdiagnostic ( ConsiderMarkingAsPub {
0 commit comments