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 /src/test/ui/macros/issue-26322.rs | |
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 'src/test/ui/macros/issue-26322.rs')
-rw-r--r-- | src/test/ui/macros/issue-26322.rs | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/src/test/ui/macros/issue-26322.rs b/src/test/ui/macros/issue-26322.rs deleted file mode 100644 index c1dc80eb7..000000000 --- a/src/test/ui/macros/issue-26322.rs +++ /dev/null @@ -1,30 +0,0 @@ -// run-pass -#![allow(non_camel_case_types)] -#![allow(non_snake_case)] - -macro_rules! columnline { - () => ( - (column!(), line!()) - ) -} - -macro_rules! indirectcolumnline { - () => ( - (||{ columnline!() })() - ) -} - -fn main() { - let closure = || { - columnline!() - }; - let iflet = if let Some(_) = Some(0) { - columnline!() - } else { (0, 0) }; - let cl = columnline!(); - assert_eq!(closure(), (9, 19)); - assert_eq!(iflet, (9, 22)); - assert_eq!(cl, (14, 24)); - let indirect = indirectcolumnline!(); - assert_eq!(indirect, (20, 28)); -} |