stop linting [blocks_in_conditions] on match on proc macros
This commit is contained in:
parent
92537a0e5b
commit
4cc7b7e092
3 changed files with 4 additions and 10 deletions
|
|
@ -104,7 +104,7 @@ fn issue_12162() {
|
|||
mod issue_12016 {
|
||||
#[proc_macro_attr::fake_desugar_await]
|
||||
pub async fn await_becomes_block() -> i32 {
|
||||
let res = await; match res {
|
||||
match Some(1).await {
|
||||
Some(1) => 2,
|
||||
Some(2) => 3,
|
||||
_ => 0,
|
||||
|
|
|
|||
|
|
@ -53,11 +53,5 @@ LL + opt
|
|||
LL ~ }; match res {
|
||||
|
|
||||
|
||||
error: in a `match` scrutinee, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a `let`
|
||||
--> $DIR/blocks_in_conditions.rs:107:9
|
||||
|
|
||||
LL | match Some(1).await {
|
||||
| ^^^^^^^^^^^^^^^^^^^ help: try: `let res = await; match res`
|
||||
|
||||
error: aborting due to 5 previous errors
|
||||
error: aborting due to 4 previous errors
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue