rust/src/test/ui/lint/unused_braces.stderr

45 lines
1.2 KiB
Plaintext
Raw Normal View History

2020-03-27 20:56:58 +00:00
warning: unnecessary parentheses around assigned value
2020-07-02 05:32:12 +00:00
--> $DIR/unused_braces.rs:10:13
2020-03-27 20:56:58 +00:00
|
LL | let _ = (7);
| ^^^ help: remove these parentheses
|
note: the lint level is defined here
2020-07-02 05:32:12 +00:00
--> $DIR/unused_braces.rs:4:24
2020-03-27 20:56:58 +00:00
|
LL | #![warn(unused_braces, unused_parens)]
| ^^^^^^^^^^^^^
warning: unnecessary braces around `if` condition
2020-07-02 05:32:12 +00:00
--> $DIR/unused_braces.rs:26:8
2020-03-27 20:56:58 +00:00
|
LL | if { true } {
| ^^^^^^^^ help: remove these braces
2020-03-27 20:56:58 +00:00
|
note: the lint level is defined here
2020-07-02 05:32:12 +00:00
--> $DIR/unused_braces.rs:4:9
2020-03-27 20:56:58 +00:00
|
LL | #![warn(unused_braces, unused_parens)]
| ^^^^^^^^^^^^^
warning: unnecessary braces around `while` condition
2020-07-02 05:32:12 +00:00
--> $DIR/unused_braces.rs:30:11
2020-03-27 20:56:58 +00:00
|
LL | while { false } {
| ^^^^^^^^^ help: remove these braces
2020-03-27 20:56:58 +00:00
warning: unnecessary braces around const expression
2020-07-02 05:32:12 +00:00
--> $DIR/unused_braces.rs:34:17
2020-03-27 20:56:58 +00:00
|
LL | let _: [u8; { 3 }];
| ^^^^^ help: remove these braces
warning: unnecessary braces around function argument
2020-07-02 05:32:12 +00:00
--> $DIR/unused_braces.rs:37:13
|
LL | consume({ 7 });
| ^^^^^ help: remove these braces
warning: 5 warnings emitted