diff options
Diffstat (limited to 'tests/ui/const-generics/late-bound-vars/simple.rs')
-rw-r--r-- | tests/ui/const-generics/late-bound-vars/simple.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/ui/const-generics/late-bound-vars/simple.rs b/tests/ui/const-generics/late-bound-vars/simple.rs new file mode 100644 index 000000000..6da5395ef --- /dev/null +++ b/tests/ui/const-generics/late-bound-vars/simple.rs @@ -0,0 +1,16 @@ +// run-pass +#![feature(generic_const_exprs)] +#![allow(incomplete_features)] + +const fn inner<'a>() -> usize where &'a (): Sized { + 3 +} + +fn test<'a>() { + let _: [u8; inner::<'a>()]; + let _ = [0; inner::<'a>()]; +} + +fn main() { + test(); +} |