]> git.lizzy.rs Git - rust.git/blob - src/test/ui/lint/suggestions.stderr
Move parse-fail tests to UI
[rust.git] / src / test / ui / lint / suggestions.stderr
1 warning: unnecessary parentheses around assigned value
2   --> $DIR/suggestions.rs:59:21
3    |
4 LL |         let mut a = (1);
5    |                     ^^^ help: remove these parentheses
6    |
7 note: lint level defined here
8   --> $DIR/suggestions.rs:13:21
9    |
10 LL | #![warn(unused_mut, unused_parens)] // UI tests pass `-A unused`—see Issue #43896
11    |                     ^^^^^^^^^^^^^
12
13 warning: 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
14   --> $DIR/suggestions.rs:52:1
15    |
16 LL | #[no_debug] // should suggest removal of deprecated attribute
17    | ^^^^^^^^^^^ help: remove this attribute
18    |
19    = note: #[warn(deprecated)] on by default
20
21 warning: variable does not need to be mutable
22   --> $DIR/suggestions.rs:59:13
23    |
24 LL |         let mut a = (1);
25    |             ----^
26    |             |
27    |             help: remove this `mut`
28    |
29 note: lint level defined here
30   --> $DIR/suggestions.rs:13: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:65: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:16: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 must be mangled
58   --> $DIR/suggestions.rs:22:1
59    |
60 LL | #[no_mangle]
61    | ------------ help: remove this attribute
62 LL | //~^ HELP remove this attribute
63 LL | pub fn defiant<T>(_t: T) {}
64    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
65    |
66    = note: #[warn(no_mangle_generic_items)] on by default
67
68 error: const items should never be #[no_mangle]
69   --> $DIR/suggestions.rs:32:18
70    |
71 LL |     #[no_mangle] pub const DAUNTLESS: bool = true;
72    |                  ---------^^^^^^^^^^^^^^^^^^^^^^^^
73    |                  |
74    |                  help: try a static value: `pub static`
75
76 warning: functions generic over types must be mangled
77   --> $DIR/suggestions.rs:35:18
78    |
79 LL |     #[no_mangle] pub fn val_jean<T>() {}
80    |     ------------ ^^^^^^^^^^^^^^^^^^^^^^^
81    |     |
82    |     help: remove this attribute
83
84 error: const items should never be #[no_mangle]
85   --> $DIR/suggestions.rs:40:18
86    |
87 LL |     #[no_mangle] pub(crate) const VETAR: bool = true;
88    |                  ----------------^^^^^^^^^^^^^^^^^^^^
89    |                  |
90    |                  help: try a static value: `pub static`
91
92 warning: functions generic over types must be mangled
93   --> $DIR/suggestions.rs:43:18
94    |
95 LL |     #[no_mangle] pub(crate) fn crossfield<T>() {}
96    |     ------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
97    |     |
98    |     help: remove this attribute
99
100 warning: denote infinite loops with `loop { ... }`
101   --> $DIR/suggestions.rs:56:5
102    |
103 LL |     while true {
104    |     ^^^^^^^^^^ help: use `loop`
105    |
106    = note: #[warn(while_true)] on by default
107
108 warning: the `warp_factor:` in this pattern is redundant
109   --> $DIR/suggestions.rs:71:23
110    |
111 LL |             Equinox { warp_factor: warp_factor } => {}
112    |                       ------------^^^^^^^^^^^^
113    |                       |
114    |                       help: remove this
115    |
116    = note: #[warn(non_shorthand_field_patterns)] on by default
117
118 error: aborting due to 3 previous errors
119