vis note for no pub reexports glob import

This commit is contained in:
bohan 2023-12-01 10:25:40 +08:00
parent c263ccf185
commit d0941f92d7
12 changed files with 118 additions and 32 deletions

View file

@ -926,6 +926,10 @@ pub trait LintContext {
if elided { "'static " } else { "'static" },
Applicability::MachineApplicable
);
},
BuiltinLintDiagnostics::RedundantImportVisibility { max_vis, span } => {
db.span_note(span, format!("the most public imported item is `{max_vis}`"));
db.help("reduce the glob import's visibility or increase visibility of imported items");
}
}
// Rewrap `db`, and pass control to the user.