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);
|
2021-09-09 14:22:24 +00:00
|
|
|
| ^ ^
|
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)]
|
|
|
|
| ^^^^^^^^^^^^^
|
2021-09-09 14:22:24 +00:00
|
|
|
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
|
|
|
|
2020-04-04 20:40:31 +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
|
|
|
|
|
2020-04-04 20:40:31 +00:00
|
|
|
LL | if { true } {
|
2021-09-09 14:22:24 +00:00
|
|
|
| ^^ ^^
|
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)]
|
|
|
|
| ^^^^^^^^^^^^^
|
2021-09-09 14:22:24 +00:00
|
|
|
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
|
|
|
|
2020-04-04 20:40:31 +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
|
|
|
|
|
2020-04-04 20:40:31 +00:00
|
|
|
LL | while { false } {
|
2021-09-09 14:22:24 +00:00
|
|
|
| ^^ ^^
|
|
|
|
|
|
|
|
|
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 }];
|
2021-09-09 14:22:24 +00:00
|
|
|
| ^^ ^^
|
|
|
|
|
|
|
|
|
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
|
|
|
|
2020-04-04 20:40:31 +00:00
|
|
|
warning: unnecessary braces around function argument
|
2020-07-02 05:32:12 +00:00
|
|
|
--> $DIR/unused_braces.rs:37:13
|
2020-04-04 20:40:31 +00:00
|
|
|
|
|
|
|
|
LL | consume({ 7 });
|
2021-09-09 14:22:24 +00:00
|
|
|
| ^^ ^^
|
|
|
|
|
|
|
|
|
help: remove these braces
|
|
|
|
|
|
|
|
|
LL - consume({ 7 });
|
|
|
|
LL + consume(7);
|
2022-06-08 17:34:57 +00:00
|
|
|
|
|
2020-04-04 20:40:31 +00:00
|
|
|
|
2023-01-15 05:06:33 +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
|
2020-03-11 15:30:09 +00:00
|
|
|
|