diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:13 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:13 +0000 |
commit | 218caa410aa38c29984be31a5229b9fa717560ee (patch) | |
tree | c54bd55eeb6e4c508940a30e94c0032fbd45d677 /tests/ui/macros/macro-expanded-include | |
parent | Releasing progress-linux version 1.67.1+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-218caa410aa38c29984be31a5229b9fa717560ee.tar.xz rustc-218caa410aa38c29984be31a5229b9fa717560ee.zip |
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/macros/macro-expanded-include')
-rw-r--r-- | tests/ui/macros/macro-expanded-include/file.txt | 0 | ||||
-rw-r--r-- | tests/ui/macros/macro-expanded-include/foo/mod.rs | 9 | ||||
-rw-r--r-- | tests/ui/macros/macro-expanded-include/test.rs | 13 |
3 files changed, 22 insertions, 0 deletions
diff --git a/tests/ui/macros/macro-expanded-include/file.txt b/tests/ui/macros/macro-expanded-include/file.txt new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/tests/ui/macros/macro-expanded-include/file.txt diff --git a/tests/ui/macros/macro-expanded-include/foo/mod.rs b/tests/ui/macros/macro-expanded-include/foo/mod.rs new file mode 100644 index 000000000..cff110470 --- /dev/null +++ b/tests/ui/macros/macro-expanded-include/foo/mod.rs @@ -0,0 +1,9 @@ +// ignore-test + +macro_rules! m { + () => { include!("file.txt"); } +} + +macro_rules! n { + () => { unsafe { core::arch::asm!(include_str!("file.txt")); } } +} diff --git a/tests/ui/macros/macro-expanded-include/test.rs b/tests/ui/macros/macro-expanded-include/test.rs new file mode 100644 index 000000000..20da58a7e --- /dev/null +++ b/tests/ui/macros/macro-expanded-include/test.rs @@ -0,0 +1,13 @@ +// needs-asm-support +// build-pass (FIXME(62277): could be check-pass?) +#![allow(unused)] + +#[macro_use] +mod foo; + +m!(); +fn f() { + n!(); +} + +fn main() {} |