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