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