]> git.proxmox.com Git - rustc.git/blame - tests/ui/traits/new-solver/const-param-placeholder.rs
Merge 1.70 into proxmox/bookworm
[rustc.git] / tests / ui / traits / new-solver / const-param-placeholder.rs
CommitLineData
353b0b11
FG
1// compile-flags: -Ztrait-solver=next
2// revisions: pass fail
3//[pass] check-pass
4
5struct Wrapper<T, const N: usize>([T; N]);
6
7trait Foo {}
8fn needs_foo<F: Foo>() {}
9
10#[cfg(fail)]
11impl<T> Foo for [T; 1] {}
12
13#[cfg(pass)]
14impl<T, const N: usize> Foo for [T; N] {}
15
16fn test<T, const N: usize>() {
17 needs_foo::<[T; N]>();
18 //[fail]~^ ERROR the trait bound `[T; N]: Foo` is not satisfied
19}
20
21fn main() {}