rust/tests/ui/lint/unused_braces.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

85 lines
1.7 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);
| ^ ^
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:24
2020-03-27 20:56:58 +00:00
|
LL | #![warn(unused_braces, unused_parens)]
| ^^^^^^^^^^^^^
help: remove these parentheses
|
LL - let _ = (7);
LL + let _ = 7;
2022-06-08 17:34:57 +00:00
|
2020-03-27 20:56:58 +00:00
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 } {
| ^^ ^^
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)]
| ^^^^^^^^^^^^^
help: remove these braces
|
LL - if { true } {
LL + if true {
2022-06-08 17:34:57 +00:00
|
2020-03-27 20:56:58 +00:00
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
|
LL - while { false } {
LL + while false {
2022-06-08 17:34:57 +00:00
|
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
|
LL - let _: [u8; { 3 }];
LL + let _: [u8; 3];
2022-06-08 17:34:57 +00:00
|
2020-03-27 20:56:58 +00:00
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
|
LL - consume({ 7 });
LL + consume(7);
2022-06-08 17:34:57 +00:00
|
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