diff options
| author | bors <bors@rust-lang.org> | 2022-05-19 15:46:35 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-05-19 15:46:35 +0000 |
| commit | ea960913316b5638d99a73febadfbf7ff8ca2c7d (patch) | |
| tree | 621fb63060e27c4e6a24d92b5989a9a935a23a1d /tests | |
| parent | 6f8d18fe691d3197009d352bd4aa03600b8c28c5 (diff) | |
| parent | db41df112aded9ecbbbba421189f28f6eb326554 (diff) | |
| download | rust-ea960913316b5638d99a73febadfbf7ff8ca2c7d.tar.gz rust-ea960913316b5638d99a73febadfbf7ff8ca2c7d.zip | |
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
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ui/dbg_macro.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/ui/dbg_macro.rs b/tests/ui/dbg_macro.rs index baf01174b67..25294e8c766 100644 --- a/tests/ui/dbg_macro.rs +++ b/tests/ui/dbg_macro.rs @@ -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); + } +} |
