fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #71365 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4fb7144ed15

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