fork/rust

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

borsAuto merge of #66089 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4560ea788cb

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