fork/rust

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

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

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