Auto merge of #8838 - tamaroning:fix_dbg, r=Jarcho,xFrednet

[dbg_macro] tolerates use of `dbg!` in items which have `#[cfg(test)]` attribute

fix: #8758
changelog: [dbg_macro] tolerates use of `dbg!` in items with `#[cfg(test)]` attribute
This commit is contained in:
bors 2022-05-19 15:46:35 +00:00
commit ea96091331
3 changed files with 35 additions and 2 deletions

View file

@ -46,3 +46,15 @@ mod issue7274 {
pub fn issue8481() {
dbg!(1);
}
#[cfg(test)]
fn foo2() {
dbg!(1);
}
#[cfg(test)]
mod mod1 {
fn func() {
dbg!(1);
}
}