deal with differing syntax contexts for subexpressions in check_proc_macro

This commit is contained in:
y21 2024-09-26 17:49:14 +02:00
parent c8725f70e7
commit 55834a362c
3 changed files with 83 additions and 56 deletions

View file

@ -1,5 +1,5 @@
#![warn(clippy::dbg_macro)]
#![allow(clippy::unnecessary_operation, clippy::no_effect)]
#![allow(clippy::unnecessary_operation, clippy::no_effect, clippy::unit_arg)]
fn foo(n: u32) -> u32 {
if let Some(n) = n.checked_sub(4) { n } else { n }

View file

@ -1,5 +1,5 @@
#![warn(clippy::dbg_macro)]
#![allow(clippy::unnecessary_operation, clippy::no_effect)]
#![allow(clippy::unnecessary_operation, clippy::no_effect, clippy::unit_arg)]
fn foo(n: u32) -> u32 {
if let Some(n) = dbg!(n.checked_sub(4)) { n } else { n }