|
1 | 1 | warning: unnecessary parentheses around assigned value
|
2 |
| - --> $DIR/suggestions.rs:46:21 |
| 2 | + --> $DIR/suggestions.rs:48:21 |
3 | 3 | |
|
4 |
| -46 | let mut a = (1); // should suggest no `mut`, no parens |
| 4 | +48 | 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
|
8 |
| - --> $DIR/suggestions.rs:11:21 |
| 8 | + --> $DIR/suggestions.rs:13:21 |
9 | 9 | |
|
10 |
| -11 | #![warn(unused_mut, unused_parens)] // UI tests pass `-A unused`—see Issue #43896 |
| 10 | +13 | #![warn(unused_mut, unused_parens)] // UI tests pass `-A unused`—see Issue #43896 |
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:41:1 |
| 14 | + --> $DIR/suggestions.rs:43:1 |
15 | 15 | |
|
16 |
| -41 | #[no_debug] // should suggest removal of deprecated attribute |
| 16 | +43 | #[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:46:13 |
| 22 | + --> $DIR/suggestions.rs:48:13 |
23 | 23 | |
|
24 |
| -46 | let mut a = (1); // should suggest no `mut`, no parens |
25 |
| - | ---^^ |
| 24 | +48 | let mut a = (1); // should suggest no `mut`, no parens |
| 25 | + | ----^ |
26 | 26 | | |
|
27 | 27 | | help: remove this `mut`
|
28 | 28 | |
|
29 | 29 | note: lint level defined here
|
30 |
| - --> $DIR/suggestions.rs:11:9 |
| 30 | + --> $DIR/suggestions.rs:13:9 |
31 | 31 | |
|
32 |
| -11 | #![warn(unused_mut, unused_parens)] // UI tests pass `-A unused`—see Issue #43896 |
| 32 | +13 | #![warn(unused_mut, unused_parens)] // UI tests pass `-A unused`—see Issue #43896 |
33 | 33 | | ^^^^^^^^^^
|
34 | 34 |
|
| 35 | +warning: variable does not need to be mutable |
| 36 | + --> $DIR/suggestions.rs:52:13 |
| 37 | + | |
| 38 | +52 | let mut |
| 39 | + | _____________^ |
| 40 | + | |_____________| |
| 41 | + | || |
| 42 | +53 | || b = 1; |
| 43 | + | ||____________-^ |
| 44 | + | |____________| |
| 45 | + | help: remove this `mut` |
| 46 | + |
35 | 47 | warning: static is marked #[no_mangle], but not exported
|
36 |
| - --> $DIR/suggestions.rs:14:14 |
| 48 | + --> $DIR/suggestions.rs:16:14 |
37 | 49 | |
|
38 |
| -14 | #[no_mangle] static SHENZHOU: usize = 1; // should suggest `pub` |
| 50 | +16 | #[no_mangle] static SHENZHOU: usize = 1; // should suggest `pub` |
39 | 51 | | -^^^^^^^^^^^^^^^^^^^^^^^^^^
|
40 | 52 | | |
|
41 | 53 | | help: try making it public: `pub`
|
42 | 54 | |
|
43 | 55 | = note: #[warn(private_no_mangle_statics)] on by default
|
44 | 56 |
|
45 | 57 | error: const items should never be #[no_mangle]
|
46 |
| - --> $DIR/suggestions.rs:16:14 |
| 58 | + --> $DIR/suggestions.rs:18:14 |
47 | 59 | |
|
48 |
| -16 | #[no_mangle] const DISCOVERY: usize = 1; // should suggest `pub static` rather than `const` |
| 60 | +18 | #[no_mangle] const DISCOVERY: usize = 1; // should suggest `pub static` rather than `const` |
49 | 61 | | -----^^^^^^^^^^^^^^^^^^^^^^
|
50 | 62 | | |
|
51 | 63 | | help: try a static value: `pub static`
|
52 | 64 | |
|
53 | 65 | = note: #[deny(no_mangle_const_items)] on by default
|
54 | 66 |
|
55 | 67 | warning: functions generic over types must be mangled
|
56 |
| - --> $DIR/suggestions.rs:20:1 |
| 68 | + --> $DIR/suggestions.rs:22:1 |
57 | 69 | |
|
58 |
| -19 | #[no_mangle] // should suggest removal (generics can't be no-mangle) |
| 70 | +21 | #[no_mangle] // should suggest removal (generics can't be no-mangle) |
59 | 71 | | ------------ help: remove this attribute
|
60 |
| -20 | pub fn defiant<T>(_t: T) {} |
| 72 | +22 | pub fn defiant<T>(_t: T) {} |
61 | 73 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
62 | 74 | |
|
63 | 75 | = note: #[warn(no_mangle_generic_items)] on by default
|
64 | 76 |
|
65 | 77 | warning: function is marked #[no_mangle], but not exported
|
66 |
| - --> $DIR/suggestions.rs:24:1 |
| 78 | + --> $DIR/suggestions.rs:26:1 |
67 | 79 | |
|
68 |
| -24 | fn rio_grande() {} // should suggest `pub` |
| 80 | +26 | fn rio_grande() {} // should suggest `pub` |
69 | 81 | | -^^^^^^^^^^^^^^^^^
|
70 | 82 | | |
|
71 | 83 | | help: try making it public: `pub`
|
72 | 84 | |
|
73 | 85 | = note: #[warn(private_no_mangle_fns)] on by default
|
74 | 86 |
|
75 | 87 | warning: static is marked #[no_mangle], but not exported
|
76 |
| - --> $DIR/suggestions.rs:31:18 |
| 88 | + --> $DIR/suggestions.rs:33:18 |
77 | 89 | |
|
78 |
| -31 | #[no_mangle] pub static DAUNTLESS: bool = true; |
| 90 | +33 | #[no_mangle] pub static DAUNTLESS: bool = true; |
79 | 91 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
80 | 92 |
|
81 | 93 | warning: function is marked #[no_mangle], but not exported
|
82 |
| - --> $DIR/suggestions.rs:33:18 |
| 94 | + --> $DIR/suggestions.rs:35:18 |
83 | 95 | |
|
84 |
| -33 | #[no_mangle] pub fn val_jean() {} |
| 96 | +35 | #[no_mangle] pub fn val_jean() {} |
85 | 97 | | ^^^^^^^^^^^^^^^^^^^^
|
86 | 98 |
|
87 | 99 | warning: denote infinite loops with `loop { ... }`
|
88 |
| - --> $DIR/suggestions.rs:44:5 |
| 100 | + --> $DIR/suggestions.rs:46:5 |
89 | 101 | |
|
90 |
| -44 | while true { // should suggest `loop` |
| 102 | +46 | while true { // should suggest `loop` |
91 | 103 | | ^^^^^^^^^^ help: use `loop`
|
92 | 104 | |
|
93 | 105 | = note: #[warn(while_true)] on by default
|
94 | 106 |
|
95 | 107 | warning: the `warp_factor:` in this pattern is redundant
|
96 |
| - --> $DIR/suggestions.rs:51:23 |
| 108 | + --> $DIR/suggestions.rs:57:23 |
97 | 109 | |
|
98 |
| -51 | Equinox { warp_factor: warp_factor } => {} // should suggest shorthand |
| 110 | +57 | Equinox { warp_factor: warp_factor } => {} // should suggest shorthand |
99 | 111 | | ------------^^^^^^^^^^^^
|
100 | 112 | | |
|
101 | 113 | | help: remove this
|
|
0 commit comments