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
in which the private no-mangle lints receive a valued lesson in humility
The incompetent fool who added these suggestions in 38e5a96 apparently
thought it was safe to assume that, because the offending function or
static was unreachable, it would therefore have not have any existing
visibility modifiers, making it safe for us to unconditionally suggest
inserting `pub`. This isn't true.
This resolvesrust-lang#47383.
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