]> git.proxmox.com Git - rustc.git/blob - src/test/ui/lint/suggestions.stderr
New upstream version 1.25.0+dfsg1
[rustc.git] / src / test / ui / lint / suggestions.stderr
1 warning: unnecessary parentheses around assigned value
2 --> $DIR/suggestions.rs:48:21
3 |
4 48 | let mut a = (1); // should suggest no `mut`, no parens
5 | ^^^ help: remove these parentheses
6 |
7 note: lint level defined here
8 --> $DIR/suggestions.rs:13:21
9 |
10 13 | #![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:43:1
15 |
16 43 | #[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:48:13
23 |
24 48 | let mut a = (1); // should suggest no `mut`, no parens
25 | ----^
26 | |
27 | help: remove this `mut`
28 |
29 note: lint level defined here
30 --> $DIR/suggestions.rs:13:9
31 |
32 13 | #![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:52:13
37 |
38 52 | let mut
39 | _____________^
40 | |_____________|
41 | ||
42 53 | || b = 1;
43 | ||____________-^
44 | |____________|
45 | help: remove this `mut`
46
47 warning: static is marked #[no_mangle], but not exported
48 --> $DIR/suggestions.rs:16:14
49 |
50 16 | #[no_mangle] static SHENZHOU: usize = 1; // should suggest `pub`
51 | -^^^^^^^^^^^^^^^^^^^^^^^^^^
52 | |
53 | help: try making it public: `pub`
54 |
55 = note: #[warn(private_no_mangle_statics)] on by default
56
57 error: const items should never be #[no_mangle]
58 --> $DIR/suggestions.rs:18:14
59 |
60 18 | #[no_mangle] const DISCOVERY: usize = 1; // should suggest `pub static` rather than `const`
61 | -----^^^^^^^^^^^^^^^^^^^^^^
62 | |
63 | help: try a static value: `pub static`
64 |
65 = note: #[deny(no_mangle_const_items)] on by default
66
67 warning: functions generic over types must be mangled
68 --> $DIR/suggestions.rs:22:1
69 |
70 21 | #[no_mangle] // should suggest removal (generics can't be no-mangle)
71 | ------------ help: remove this attribute
72 22 | pub fn defiant<T>(_t: T) {}
73 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
74 |
75 = note: #[warn(no_mangle_generic_items)] on by default
76
77 warning: function is marked #[no_mangle], but not exported
78 --> $DIR/suggestions.rs:26:1
79 |
80 26 | fn rio_grande() {} // should suggest `pub`
81 | -^^^^^^^^^^^^^^^^^
82 | |
83 | help: try making it public: `pub`
84 |
85 = note: #[warn(private_no_mangle_fns)] on by default
86
87 warning: static is marked #[no_mangle], but not exported
88 --> $DIR/suggestions.rs:33:18
89 |
90 33 | #[no_mangle] pub static DAUNTLESS: bool = true;
91 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
92
93 warning: function is marked #[no_mangle], but not exported
94 --> $DIR/suggestions.rs:35:18
95 |
96 35 | #[no_mangle] pub fn val_jean() {}
97 | ^^^^^^^^^^^^^^^^^^^^
98
99 warning: denote infinite loops with `loop { ... }`
100 --> $DIR/suggestions.rs:46:5
101 |
102 46 | while true { // should suggest `loop`
103 | ^^^^^^^^^^ help: use `loop`
104 |
105 = note: #[warn(while_true)] on by default
106
107 warning: the `warp_factor:` in this pattern is redundant
108 --> $DIR/suggestions.rs:57:23
109 |
110 57 | Equinox { warp_factor: warp_factor } => {} // should suggest shorthand
111 | ------------^^^^^^^^^^^^
112 | |
113 | help: remove this
114 |
115 = note: #[warn(non_shorthand_field_patterns)] on by default
116
117 error: aborting due to previous error
118