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 @@ -949,6 +949,7 @@ lint_unused_op = unused {$op} that must be used
949949lint_unused_result = unused result of type `{ $ty } `
950950
951951lint_unused_visibilities = visibility qualifiers have no effect on `const _` declarations
952+ .note = there is no declared name for the qualifier to affect
952953 .suggestion = remove the qualifier
953954
954955lint_use_let_underscore_ignore_suggestion = use `let _ = ...` to ignore the expression or result
Original file line number Diff line number Diff line change @@ -3150,6 +3150,7 @@ impl Subdiagnostic for MismatchedLifetimeSyntaxesSuggestion {
31503150
31513151#[ derive( LintDiagnostic ) ]
31523152#[ diag( lint_unused_visibilities) ]
3153+ #[ note]
31533154pub ( crate ) struct UnusedVisibility {
31543155 #[ suggestion( style = "short" , code = "" , applicability = "machine-applicable" ) ]
31553156 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