Remove feature: crate
visibility modifier
This commit is contained in:
parent
6970246886
commit
8cece636b2
17 changed files with 19 additions and 116 deletions
|
@ -1372,17 +1372,11 @@ impl UnreachablePub {
|
|||
let def_span = cx.tcx.sess.source_map().guess_head_span(span);
|
||||
cx.struct_span_lint(UNREACHABLE_PUB, def_span, |lint| {
|
||||
let mut err = lint.build(&format!("unreachable `pub` {}", what));
|
||||
let replacement = if cx.tcx.features().crate_visibility_modifier {
|
||||
"crate"
|
||||
} else {
|
||||
"pub(crate)"
|
||||
}
|
||||
.to_owned();
|
||||
|
||||
err.span_suggestion(
|
||||
vis_span,
|
||||
"consider restricting its visibility",
|
||||
replacement,
|
||||
"pub(crate)".to_owned(),
|
||||
applicability,
|
||||
);
|
||||
if exportable {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue