diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2022-09-12 22:47:14 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-09-12 22:47:14 +0200 |
| commit | 57273313ae0a2f3be31caf2cf4c4da219e1115ba (patch) | |
| tree | 03f23a294e4838fa20c0cedaa02c1d86c3764218 | |
| parent | 7fc3183520bfc20c40bdc1718376378df05716c7 (diff) | |
| parent | 2126622887e5447610e5d14803e52aa51bc9dd44 (diff) | |
| download | rust-57273313ae0a2f3be31caf2cf4c4da219e1115ba.tar.gz rust-57273313ae0a2f3be31caf2cf4c4da219e1115ba.zip | |
Rollup merge of #101677 - winxpqq955:issue-101211, r=fee1-dead
Add test for #101211 Closes #101211
| -rw-r--r-- | src/test/ui/proc-macro/dollar-crate-issue-101211.rs | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/test/ui/proc-macro/dollar-crate-issue-101211.rs b/src/test/ui/proc-macro/dollar-crate-issue-101211.rs new file mode 100644 index 00000000000..fc1acfd32d2 --- /dev/null +++ b/src/test/ui/proc-macro/dollar-crate-issue-101211.rs @@ -0,0 +1,29 @@ +// check-pass +// edition:2021 +// aux-build:test-macros.rs + +#![no_std] // Don't load unnecessary hygiene information from std +extern crate std; + +#[macro_use] +extern crate test_macros; + +macro_rules! foo { + ($($path:ident)::*) => ( + test_macros::recollect!( + $($path)::* + ) + ) +} + +macro_rules! baz { + () => ( + foo!($crate::BAR) + ) +} + +pub const BAR: u32 = 19; + +fn main(){ + std::println!("{}", baz!()); +} |
