diff options
Diffstat (limited to 'tests/ui/const-generics/generic_const_exprs/auxiliary/anon_const_non_local.rs')
-rw-r--r-- | tests/ui/const-generics/generic_const_exprs/auxiliary/anon_const_non_local.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/ui/const-generics/generic_const_exprs/auxiliary/anon_const_non_local.rs b/tests/ui/const-generics/generic_const_exprs/auxiliary/anon_const_non_local.rs new file mode 100644 index 000000000..97be07493 --- /dev/null +++ b/tests/ui/const-generics/generic_const_exprs/auxiliary/anon_const_non_local.rs @@ -0,0 +1,8 @@ +#![feature(generic_const_exprs)] +#![allow(incomplete_features)] + +pub struct Foo<const N: usize>; + +pub fn foo<const N: usize>() -> Foo<{ N + 1 }> { + Foo +} |