File tree Expand file tree Collapse file tree 3 files changed +6
-0
lines changed
Expand file tree Collapse file tree 3 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -979,6 +979,7 @@ lint_unused_op = unused {$op} that must be used
979979lint_unused_result = unused result of type `{ $ty } `
980980
981981lint_unused_visibilities = visibility qualifiers have no effect on `const _` declarations
982+ .note = there is no declared name for the qualifier to affect
982983 .suggestion = remove the qualifier
983984
984985lint_use_let_underscore_ignore_suggestion = use `let _ = ...` to ignore the expression or result
Original file line number Diff line number Diff line change @@ -3194,6 +3194,7 @@ pub(crate) struct UnsafeAttrOutsideUnsafeSuggestion {
31943194
31953195#[ derive( LintDiagnostic ) ]
31963196#[ diag( lint_unused_visibilities) ]
3197+ #[ note]
31973198pub ( crate ) struct UnusedVisibility {
31983199 #[ suggestion( style = "short" , code = "" , applicability = "machine-applicable" ) ]
31993200 pub span : Span ,
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ warning: visibility qualifiers have no effect on `const _` declarations
44LL | pub const _: () = {};
55 | ^^^ help: remove the qualifier
66 |
7+ = note: there is no declared name for the qualifier to affect
78note: the lint level is defined here
89 --> $DIR/unused-visibilities.rs:4:9
910 |
@@ -15,6 +16,8 @@ warning: visibility qualifiers have no effect on `const _` declarations
1516 |
1617LL | pub(self) const _: () = {};
1718 | ^^^^^^^^^ help: remove the qualifier
19+ |
20+ = note: there is no declared name for the qualifier to affect
1821
1922warning: visibility qualifiers have no effect on `const _` declarations
2023 --> $DIR/unused-visibilities.rs:14:9
@@ -25,6 +28,7 @@ LL | pub const _: () = {};
2528LL | foo!();
2629 | ------ in this macro invocation
2730 |
31+ = note: there is no declared name for the qualifier to affect
2832 = note: this warning originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info)
2933
3034warning: 3 warnings emitted
You can’t perform that action at this time.
0 commit comments