diff options
Diffstat (limited to 'tests/ui/const-generics/early/trivial-const-arg-macro.rs')
| -rw-r--r-- | tests/ui/const-generics/early/trivial-const-arg-macro.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ui/const-generics/early/trivial-const-arg-macro.rs b/tests/ui/const-generics/early/trivial-const-arg-macro.rs new file mode 100644 index 00000000000..a19d9abfdcb --- /dev/null +++ b/tests/ui/const-generics/early/trivial-const-arg-macro.rs @@ -0,0 +1,15 @@ +//@ check-pass + +// This is a regression test for #128016. + +macro_rules! len { + () => { + BAR + }; +} + +const BAR: usize = 0; + +fn main() { + let val: [bool; len!()] = []; +} |
