You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rollup merge of rust-lang#47479 - zackmdavis:and_the_case_of_the_suggested_double-pub, r=estebank
private no-mangle lints: only suggest `pub` if it doesn't already exist
Fixesrust-lang#47383 (function or static can be `pub` but unreachable because it's in a private module; adding another `pub` is nonsensical).
r? @estebank
Copy file name to clipboardExpand all lines: src/test/ui/lint/suggestions.stderr
+22-10
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
warning: unnecessary parentheses around assigned value
2
-
--> $DIR/suggestions.rs:36:21
2
+
--> $DIR/suggestions.rs:46:21
3
3
|
4
-
36 | let mut a = (1); // should suggest no `mut`, no parens
4
+
46 | let mut a = (1); // should suggest no `mut`, no parens
5
5
| ^^^ help: remove these parentheses
6
6
|
7
7
note: lint level defined here
@@ -11,17 +11,17 @@ note: lint level defined here
11
11
| ^^^^^^^^^^^^^
12
12
13
13
warning: use of deprecated attribute `no_debug`: the `#[no_debug]` attribute was an experimental feature that has been deprecated due to lack of demand. See https://github.com/rust-lang/rust/issues/29721
14
-
--> $DIR/suggestions.rs:31:1
14
+
--> $DIR/suggestions.rs:41:1
15
15
|
16
-
31 | #[no_debug] // should suggest removal of deprecated attribute
16
+
41 | #[no_debug] // should suggest removal of deprecated attribute
17
17
| ^^^^^^^^^^^ help: remove this attribute
18
18
|
19
19
= note: #[warn(deprecated)] on by default
20
20
21
21
warning: variable does not need to be mutable
22
-
--> $DIR/suggestions.rs:36:13
22
+
--> $DIR/suggestions.rs:46:13
23
23
|
24
-
36 | let mut a = (1); // should suggest no `mut`, no parens
24
+
46 | let mut a = (1); // should suggest no `mut`, no parens
25
25
| ---^^
26
26
| |
27
27
| help: remove this `mut`
@@ -72,18 +72,30 @@ warning: function is marked #[no_mangle], but not exported
72
72
|
73
73
= note: #[warn(private_no_mangle_fns)] on by default
74
74
75
+
warning: static is marked #[no_mangle], but not exported
0 commit comments