diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:13 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:13 +0000 |
commit | 218caa410aa38c29984be31a5229b9fa717560ee (patch) | |
tree | c54bd55eeb6e4c508940a30e94c0032fbd45d677 /tests/ui/lint/unused_braces.stderr | |
parent | Releasing progress-linux version 1.67.1+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-218caa410aa38c29984be31a5229b9fa717560ee.tar.xz rustc-218caa410aa38c29984be31a5229b9fa717560ee.zip |
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | tests/ui/lint/unused_braces.stderr | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/tests/ui/lint/unused_braces.stderr b/tests/ui/lint/unused_braces.stderr new file mode 100644 index 000000000..0b4a1c321 --- /dev/null +++ b/tests/ui/lint/unused_braces.stderr @@ -0,0 +1,84 @@ +warning: unnecessary parentheses around assigned value + --> $DIR/unused_braces.rs:10:13 + | +LL | let _ = (7); + | ^ ^ + | +note: the lint level is defined here + --> $DIR/unused_braces.rs:4:24 + | +LL | #![warn(unused_braces, unused_parens)] + | ^^^^^^^^^^^^^ +help: remove these parentheses + | +LL - let _ = (7); +LL + let _ = 7; + | + +warning: unnecessary braces around `if` condition + --> $DIR/unused_braces.rs:26:8 + | +LL | if { true } { + | ^^ ^^ + | +note: the lint level is defined here + --> $DIR/unused_braces.rs:4:9 + | +LL | #![warn(unused_braces, unused_parens)] + | ^^^^^^^^^^^^^ +help: remove these braces + | +LL - if { true } { +LL + if true { + | + +warning: unnecessary braces around `while` condition + --> $DIR/unused_braces.rs:30:11 + | +LL | while { false } { + | ^^ ^^ + | +help: remove these braces + | +LL - while { false } { +LL + while false { + | + +warning: unnecessary braces around const expression + --> $DIR/unused_braces.rs:34:17 + | +LL | let _: [u8; { 3 }]; + | ^^ ^^ + | +help: remove these braces + | +LL - let _: [u8; { 3 }]; +LL + let _: [u8; 3]; + | + +warning: unnecessary braces around function argument + --> $DIR/unused_braces.rs:37:13 + | +LL | consume({ 7 }); + | ^^ ^^ + | +help: remove these braces + | +LL - consume({ 7 }); +LL + consume(7); + | + +warning: unnecessary braces around `return` value + --> $DIR/unused_braces.rs:55:12 + | +LL | return { println!("!") }; + | ^^ ^^ + | +help: remove these braces + | +LL - return { println!("!") }; +LL + return println!("!"); + | + +warning: 6 warnings emitted + |