summaryrefslogtreecommitdiffstats
path: root/tests/ui/lint/suggestions.stderr
blob: 4caee777a131bb830da6ba797b298b03da760e3f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
warning: denote infinite loops with `loop { ... }`
  --> $DIR/suggestions.rs:45:5
   |
LL |     while true {
   |     ^^^^^^^^^^ help: use `loop`
   |
   = note: `#[warn(while_true)]` on by default

warning: unnecessary parentheses around assigned value
  --> $DIR/suggestions.rs:48:31
   |
LL |         let mut registry_no = (format!("NX-{}", 74205));
   |                               ^                       ^
   |
note: the lint level is defined here
  --> $DIR/suggestions.rs:4:21
   |
LL | #![warn(unused_mut, unused_parens)] // UI tests pass `-A unused`—see Issue #43896
   |                     ^^^^^^^^^^^^^
help: remove these parentheses
   |
LL -         let mut registry_no = (format!("NX-{}", 74205));
LL +         let mut registry_no = format!("NX-{}", 74205);
   |

warning: variable does not need to be mutable
  --> $DIR/suggestions.rs:48:13
   |
LL |         let mut registry_no = (format!("NX-{}", 74205));
   |             ----^^^^^^^^^^^
   |             |
   |             help: remove this `mut`
   |
note: the lint level is defined here
  --> $DIR/suggestions.rs:4:9
   |
LL | #![warn(unused_mut, unused_parens)] // UI tests pass `-A unused`—see Issue #43896
   |         ^^^^^^^^^^

warning: variable does not need to be mutable
  --> $DIR/suggestions.rs:54:13
   |
LL |            let mut
   |  ______________^
   | | _____________|
   | ||
LL | ||             b = 1;
   | ||____________-^
   | |_____________|
   |               help: remove this `mut`

error: const items should never be `#[no_mangle]`
  --> $DIR/suggestions.rs:6:14
   |
LL | #[no_mangle] const DISCOVERY: usize = 1;
   |              -----^^^^^^^^^^^^^^^^^^^^^^
   |              |
   |              help: try a static value: `pub static`
   |
   = note: `#[deny(no_mangle_const_items)]` on by default

warning: functions generic over types or consts must be mangled
  --> $DIR/suggestions.rs:12:1
   |
LL | #[no_mangle]
   | ------------ help: remove this attribute
LL |
LL | pub fn defiant<T>(_t: T) {}
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: `#[warn(no_mangle_generic_items)]` on by default

warning: the `warp_factor:` in this pattern is redundant
  --> $DIR/suggestions.rs:61:23
   |
LL |             Equinox { warp_factor: warp_factor } => {}
   |                       ^^^^^^^^^^^^^^^^^^^^^^^^ help: use shorthand field pattern: `warp_factor`
   |
   = note: `#[warn(non_shorthand_field_patterns)]` on by default

error: const items should never be `#[no_mangle]`
  --> $DIR/suggestions.rs:22:18
   |
LL |     #[no_mangle] pub const DAUNTLESS: bool = true;
   |                  ---------^^^^^^^^^^^^^^^^^^^^^^^^
   |                  |
   |                  help: try a static value: `pub static`

warning: functions generic over types or consts must be mangled
  --> $DIR/suggestions.rs:26:18
   |
LL |     #[no_mangle] pub fn val_jean<T>() {}
   |     ------------ ^^^^^^^^^^^^^^^^^^^^^^^
   |     |
   |     help: remove this attribute

error: const items should never be `#[no_mangle]`
  --> $DIR/suggestions.rs:31:18
   |
LL |     #[no_mangle] pub(crate) const VETAR: bool = true;
   |                  ----------------^^^^^^^^^^^^^^^^^^^^
   |                  |
   |                  help: try a static value: `pub static`

warning: functions generic over types or consts must be mangled
  --> $DIR/suggestions.rs:35:18
   |
LL |     #[no_mangle] pub(crate) fn crossfield<T>() {}
   |     ------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |     |
   |     help: remove this attribute

error: aborting due to 3 previous errors; 8 warnings emitted