]>
Commit | Line | Data |
---|---|---|
416331ca | 1 | warning: denote infinite loops with `loop { ... }` |
74b04a01 | 2 | --> $DIR/suggestions.rs:42:5 |
416331ca XL |
3 | | |
4 | LL | while true { | |
5 | | ^^^^^^^^^^ help: use `loop` | |
6 | | | |
7 | = note: `#[warn(while_true)]` on by default | |
8 | ||
ea8adc8c | 9 | warning: unnecessary parentheses around assigned value |
74b04a01 | 10 | --> $DIR/suggestions.rs:45:31 |
ea8adc8c | 11 | | |
0bf4aa26 XL |
12 | LL | let mut registry_no = (format!("NX-{}", 74205)); |
13 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove these parentheses | |
ea8adc8c | 14 | | |
74b04a01 | 15 | note: the lint level is defined here |
0731742a | 16 | --> $DIR/suggestions.rs:3:21 |
abe05a73 | 17 | | |
0531ce1d | 18 | LL | #![warn(unused_mut, unused_parens)] // UI tests pass `-A unused`—see Issue #43896 |
abe05a73 | 19 | | ^^^^^^^^^^^^^ |
ea8adc8c | 20 | |
abe05a73 | 21 | warning: variable does not need to be mutable |
74b04a01 | 22 | --> $DIR/suggestions.rs:45:13 |
abe05a73 | 23 | | |
0bf4aa26 XL |
24 | LL | let mut registry_no = (format!("NX-{}", 74205)); |
25 | | ----^^^^^^^^^^^ | |
abe05a73 XL |
26 | | | |
27 | | help: remove this `mut` | |
28 | | | |
74b04a01 | 29 | note: the lint level is defined here |
0731742a | 30 | --> $DIR/suggestions.rs:3:9 |
abe05a73 | 31 | | |
0531ce1d | 32 | LL | #![warn(unused_mut, unused_parens)] // UI tests pass `-A unused`—see Issue #43896 |
abe05a73 XL |
33 | | ^^^^^^^^^^ |
34 | ||
2c00a5a8 | 35 | warning: variable does not need to be mutable |
74b04a01 | 36 | --> $DIR/suggestions.rs:51:13 |
2c00a5a8 | 37 | | |
0531ce1d | 38 | LL | let mut |
2c00a5a8 XL |
39 | | _____________^ |
40 | | |_____________| | |
41 | | || | |
0531ce1d | 42 | LL | || b = 1; |
2c00a5a8 XL |
43 | | ||____________-^ |
44 | | |____________| | |
45 | | help: remove this `mut` | |
46 | ||
416331ca | 47 | error: const items should never be `#[no_mangle]` |
74b04a01 | 48 | --> $DIR/suggestions.rs:5:14 |
abe05a73 | 49 | | |
8faf50e0 | 50 | LL | #[no_mangle] const DISCOVERY: usize = 1; |
abe05a73 XL |
51 | | -----^^^^^^^^^^^^^^^^^^^^^^ |
52 | | | | |
53 | | help: try a static value: `pub static` | |
54 | | | |
416331ca | 55 | = note: `#[deny(no_mangle_const_items)]` on by default |
abe05a73 | 56 | |
9fa01778 | 57 | warning: functions generic over types or consts must be mangled |
74b04a01 | 58 | --> $DIR/suggestions.rs:11:1 |
abe05a73 | 59 | | |
8faf50e0 | 60 | LL | #[no_mangle] |
abe05a73 | 61 | | ------------ help: remove this attribute |
532ac7d7 | 62 | LL | |
0531ce1d | 63 | LL | pub fn defiant<T>(_t: T) {} |
abe05a73 XL |
64 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
65 | | | |
416331ca | 66 | = note: `#[warn(no_mangle_generic_items)]` on by default |
532ac7d7 XL |
67 | |
68 | warning: the `warp_factor:` in this pattern is redundant | |
74b04a01 | 69 | --> $DIR/suggestions.rs:57:23 |
532ac7d7 XL |
70 | | |
71 | LL | Equinox { warp_factor: warp_factor } => {} | |
dfeec247 | 72 | | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use shorthand field pattern: `warp_factor` |
532ac7d7 | 73 | | |
416331ca | 74 | = note: `#[warn(non_shorthand_field_patterns)]` on by default |
532ac7d7 | 75 | |
416331ca | 76 | error: const items should never be `#[no_mangle]` |
74b04a01 | 77 | --> $DIR/suggestions.rs:21:18 |
abe05a73 | 78 | | |
0bf4aa26 XL |
79 | LL | #[no_mangle] pub const DAUNTLESS: bool = true; |
80 | | ---------^^^^^^^^^^^^^^^^^^^^^^^^ | |
81 | | | | |
82 | | help: try a static value: `pub static` | |
abe05a73 | 83 | |
9fa01778 | 84 | warning: functions generic over types or consts must be mangled |
74b04a01 | 85 | --> $DIR/suggestions.rs:24:18 |
8faf50e0 | 86 | | |
0bf4aa26 XL |
87 | LL | #[no_mangle] pub fn val_jean<T>() {} |
88 | | ------------ ^^^^^^^^^^^^^^^^^^^^^^^ | |
89 | | | | |
90 | | help: remove this attribute | |
2c00a5a8 | 91 | |
416331ca | 92 | error: const items should never be `#[no_mangle]` |
74b04a01 | 93 | --> $DIR/suggestions.rs:29:18 |
2c00a5a8 | 94 | | |
0bf4aa26 XL |
95 | LL | #[no_mangle] pub(crate) const VETAR: bool = true; |
96 | | ----------------^^^^^^^^^^^^^^^^^^^^ | |
8faf50e0 | 97 | | | |
0bf4aa26 | 98 | | help: try a static value: `pub static` |
8faf50e0 | 99 | |
9fa01778 | 100 | warning: functions generic over types or consts must be mangled |
74b04a01 | 101 | --> $DIR/suggestions.rs:32:18 |
8faf50e0 | 102 | | |
0bf4aa26 XL |
103 | LL | #[no_mangle] pub(crate) fn crossfield<T>() {} |
104 | | ------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
105 | | | | |
106 | | help: remove this attribute | |
2c00a5a8 | 107 | |
0bf4aa26 | 108 | error: aborting due to 3 previous errors |
ea8adc8c | 109 |