diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2024-06-26 13:00:51 +0300 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2024-07-06 15:36:30 +0300 |
| commit | 83cf471361ed8e5d07111312a80b29b6ecb3290b (patch) | |
| tree | 19c5435f5c007cc8d661de2f65509ee86befd84d /tests/ui | |
| parent | 28cc0b643d6c07e2e0ba24a85f397963961b4c0d (diff) | |
| download | rust-83cf471361ed8e5d07111312a80b29b6ecb3290b.tar.gz rust-83cf471361ed8e5d07111312a80b29b6ecb3290b.zip | |
out_of_scope_macro_calls: Detect calls inside attributes more precisely
Diffstat (limited to 'tests/ui')
| -rw-r--r-- | tests/ui/macros/out-of-scope-calls-false-positives.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/ui/macros/out-of-scope-calls-false-positives.rs b/tests/ui/macros/out-of-scope-calls-false-positives.rs new file mode 100644 index 00000000000..8d696c177e4 --- /dev/null +++ b/tests/ui/macros/out-of-scope-calls-false-positives.rs @@ -0,0 +1,10 @@ +//@ check-pass +//@ needs-asm-support + +macro_rules! mac { () => { "" } } +macro_rules! mac2 { () => { "auxiliary/issue-40469.rs" } } + +std::arch::global_asm!(mac!()); // OK +include!(mac2!()); // OK + +fn main() {} |
