blocks_in_conditions: do not warn if condition comes from macro
This commit is contained in:
parent
4b3a9c09f3
commit
c6079a6880
3 changed files with 33 additions and 0 deletions
|
|
@ -85,4 +85,18 @@ fn block_in_match_expr(num: i32) -> i32 {
|
|||
}
|
||||
}
|
||||
|
||||
// issue #12162
|
||||
macro_rules! timed {
|
||||
($name:expr, $body:expr $(,)?) => {{
|
||||
let __scope = ();
|
||||
$body
|
||||
}};
|
||||
}
|
||||
|
||||
fn issue_12162() {
|
||||
if timed!("check this!", false) {
|
||||
println!();
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
|
|
|||
|
|
@ -85,4 +85,18 @@ fn block_in_match_expr(num: i32) -> i32 {
|
|||
}
|
||||
}
|
||||
|
||||
// issue #12162
|
||||
macro_rules! timed {
|
||||
($name:expr, $body:expr $(,)?) => {{
|
||||
let __scope = ();
|
||||
$body
|
||||
}};
|
||||
}
|
||||
|
||||
fn issue_12162() {
|
||||
if timed!("check this!", false) {
|
||||
println!();
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue