fork/rust

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

borsAuto merge of #69854 - pietroalbini:stable-next, r=Centrilb8cedc00407

1.42.0
3.7 KiB117 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   |                       ^^^^^^^^^^^^^^^^^^^^^^^^ help: use shorthand field pattern: `warp_factor`
81   |
82   = note: `#[warn(non_shorthand_field_patterns)]` on by default
83
84error: const items should never be `#[no_mangle]`
85  --> $DIR/suggestions.rs:22:18
86   |
87LL |     #[no_mangle] pub const DAUNTLESS: bool = true;
88   |                  ---------^^^^^^^^^^^^^^^^^^^^^^^^
89   |                  |
90   |                  help: try a static value: `pub static`
91
92warning: functions generic over types or consts must be mangled
93  --> $DIR/suggestions.rs:25:18
94   |
95LL |     #[no_mangle] pub fn val_jean<T>() {}
96   |     ------------ ^^^^^^^^^^^^^^^^^^^^^^^
97   |     |
98   |     help: remove this attribute
99
100error: const items should never be `#[no_mangle]`
101  --> $DIR/suggestions.rs:30:18
102   |
103LL |     #[no_mangle] pub(crate) const VETAR: bool = true;
104   |                  ----------------^^^^^^^^^^^^^^^^^^^^
105   |                  |
106   |                  help: try a static value: `pub static`
107
108warning: functions generic over types or consts must be mangled
109  --> $DIR/suggestions.rs:33:18
110   |
111LL |     #[no_mangle] pub(crate) fn crossfield<T>() {}
112   |     ------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
113   |     |
114   |     help: remove this attribute
115
116error: aborting due to 3 previous errors
117