]> git.lizzy.rs Git - rust.git/blob - tests/ui/missing/missing-items/missing-type-parameter2.rs
Rollup merge of #106638 - RalfJung:realstd, r=thomcc
[rust.git] / tests / ui / missing / missing-items / missing-type-parameter2.rs
1 struct X<const N: u8>();
2
3 impl X<N> {}
4 //~^ ERROR cannot find type `N` in this scope
5 //~| ERROR unresolved item provided when a constant was expected
6 impl<T, const A: u8 = 2> X<N> {}
7 //~^ ERROR cannot find type `N` in this scope
8 //~| ERROR defaults for const parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions
9 //~| ERROR unresolved item provided when a constant was expected
10
11 fn foo(_: T) where T: Send {}
12 //~^ ERROR cannot find type `T` in this scope
13 //~| ERROR cannot find type `T` in this scope
14
15 fn bar<const N: u8>(_: A) {}
16 //~^ ERROR cannot find type `A` in this scope
17
18 fn main() {
19 }