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