]> git.proxmox.com Git - rustc.git/blob - src/test/ui/const-generics/defaults/type-default-const-param-name.rs
New upstream version 1.56.0~beta.4+dfsg1
[rustc.git] / src / test / ui / const-generics / defaults / type-default-const-param-name.rs
1 // check-pass
2 #![feature(const_generics_defaults)]
3
4 struct N;
5
6 struct Foo<const N: usize = 1, T = N>(T);
7
8 impl Foo {
9 fn new() -> Self {
10 Foo(N)
11 }
12 }
13
14 fn main() {
15 let Foo::<1, N>(N) = Foo::new();
16 }