rust/tests/ui/lint/unused_braces.stderr
2023-01-11 09:32:08 +00:00

73 lines
1.4 KiB
Plaintext

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: 5 warnings emitted