-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.
Description
This code snippet (playground)
fn main() {
let _ = (format!("Test"));
}
results in the following lint output:
warning: unnecessary parentheses around assigned value
--> src/main.rs:2:13
|
2 | let _ = (format!("Test"));
| ^^^^^^^^^^^^^^^^^
|
= note: #[warn(unused_parens)] on by default
help: remove these parentheses
|
2 | let _ = ::fmt::format(::std::fmt::Arguments::new_v1(&["Test"],
3 | &match () { () => [], }));
|
Finished dev [unoptimized + debuginfo] target(s) in 0.56s
Running `target/debug/playground`
The help: remove these parentheses
should contain the literal string format!
, not the expanded macro that it repreesnts.
scottmcm
Metadata
Metadata
Assignees
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.