2017-09-30 01:52:51 -05:00
warning: unnecessary parentheses around assigned value
2017-10-12 02:42:52 -05:00
--> $DIR/suggestions.rs:30:21
2017-09-30 01:52:51 -05:00
|
2017-10-12 02:42:52 -05:00
30 | let mut a = (1); // should suggest no `mut`, no parens
2017-09-30 01:52:51 -05:00
| ^^^ help: remove these parentheses
|
= note: #[warn(unused_parens)] on by default
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
2017-10-12 02:42:52 -05:00
--> $DIR/suggestions.rs:27:1
2017-09-30 01:52:51 -05:00
|
2017-10-12 02:42:52 -05:00
27 | #[no_debug] // should suggest removal of deprecated attribute
2017-09-30 01:52:51 -05:00
| ^^^^^^^^^^^ help: remove this attribute
|
= note: #[warn(deprecated)] on by default
2017-09-15 14:49:10 -05:00
warning: variable does not need to be mutable
2017-10-12 02:42:52 -05:00
--> $DIR/suggestions.rs:30:13
2017-09-15 14:49:10 -05:00
|
2017-10-12 02:42:52 -05:00
30 | let mut a = (1); // should suggest no `mut`, no parens
2017-09-15 14:49:10 -05:00
| ---^^
| |
| help: remove this `mut`
|
note: lint level defined here
--> $DIR/suggestions.rs:11:9
|
11 | #![warn(unused_mut)] // UI tests pass `-A unused`—see Issue #43896
| ^^^^^^^^^^
2017-10-12 02:42:52 -05:00
warning: static is marked #[no_mangle], but not exported
--> $DIR/suggestions.rs:14:14
|
14 | #[no_mangle] static SHENZHOU: usize = 1; // should suggest `pub`
| -^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| help: try making it public: `pub `
|
= note: #[warn(private_no_mangle_statics)] on by default
error: const items should never be #[no_mangle]
--> $DIR/suggestions.rs:15:14
|
15 | #[no_mangle] const DISCOVERY: usize = 1; // should suggest `pub static` rather than `const`
| -----^^^^^^^^^^^^^^^^^^^^^^
| |
| help: try a static value: `pub static`
|
= note: #[deny(no_mangle_const_items)] on by default
warning: functions generic over types must be mangled
--> $DIR/suggestions.rs:18:1
|
17 | #[no_mangle] // should suggest removal (generics can't be no-mangle)
| ------------ help: remove this attribute
18 | pub fn defiant<T>(_t: T) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: #[warn(no_mangle_generic_items)] on by default
warning: function is marked #[no_mangle], but not exported
--> $DIR/suggestions.rs:21:1
|
21 | fn rio_grande() {} // should suggest `pub`
| -^^^^^^^^^^^^^^^^^
| |
| help: try making it public: `pub `
|
= note: #[warn(private_no_mangle_fns)] on by default
2017-09-30 01:52:51 -05:00
warning: denote infinite loops with `loop { ... }`
2017-10-12 02:42:52 -05:00
--> $DIR/suggestions.rs:29:5
2017-09-30 01:52:51 -05:00
|
2017-10-12 02:42:52 -05:00
29 | while true { // should suggest `loop`
2017-09-30 01:52:51 -05:00
| ^---------
| |
| _____help: use `loop`
| |
2017-10-12 02:42:52 -05:00
30 | | let mut a = (1); // should suggest no `mut`, no parens
31 | | let d = Equinox { warp_factor: 9.975 };
32 | | match d {
... |
35 | | println!("{}", a);
36 | | }
2017-09-30 01:52:51 -05:00
| |_____^
|
= note: #[warn(while_true)] on by default
2017-10-12 02:42:52 -05:00
warning: the `warp_factor:` in this pattern is redundant
--> $DIR/suggestions.rs:33:23
|
33 | Equinox { warp_factor: warp_factor } => {} // should suggest shorthand
| ------------^^^^^^^^^^^^
| |
| help: remove this
|
= note: #[warn(non_shorthand_field_patterns)] on by default
error: aborting due to previous error