|
| 1 | +warning: unnecessary parentheses around assigned value |
| 2 | + --> $DIR/suggestions.rs:17:21 |
| 3 | + | |
| 4 | +17 | let mut a = (1); // should suggest no `mut`, no parens |
| 5 | + | ^^^ help: remove these parentheses |
| 6 | + | |
| 7 | + = note: #[warn(unused_parens)] on by default |
| 8 | + |
| 9 | +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 |
| 10 | + --> $DIR/suggestions.rs:14:1 |
| 11 | + | |
| 12 | +14 | #[no_debug] // should suggest removal of deprecated attribute |
| 13 | + | ^^^^^^^^^^^ help: remove this attribute |
| 14 | + | |
| 15 | + = note: #[warn(deprecated)] on by default |
| 16 | + |
| 17 | +warning: denote infinite loops with `loop { ... }` |
| 18 | + --> $DIR/suggestions.rs:16:5 |
| 19 | + | |
| 20 | +16 | while true { // should suggest `loop` |
| 21 | + | ^--------- |
| 22 | + | | |
| 23 | + | _____help: use `loop` |
| 24 | + | | |
| 25 | +17 | | let mut a = (1); // should suggest no `mut`, no parens |
| 26 | +18 | | println!("{}", a); |
| 27 | +19 | | } |
| 28 | + | |_____^ |
| 29 | + | |
| 30 | + = note: #[warn(while_true)] on by default |
| 31 | + |
| 32 | +warning: variable does not need to be mutable |
| 33 | + --> $DIR/suggestions.rs:17:13 |
| 34 | + | |
| 35 | +17 | let mut a = (1); // should suggest no `mut`, no parens |
| 36 | + | ---^^ |
| 37 | + | | |
| 38 | + | help: remove this `mut` |
| 39 | + | |
| 40 | +note: lint level defined here |
| 41 | + --> $DIR/suggestions.rs:11:9 |
| 42 | + | |
| 43 | +11 | #![warn(unused_mut)] // UI tests pass `-A unused`—see Issue #43896 |
| 44 | + | ^^^^^^^^^^ |
| 45 | + |
0 commit comments