]> git.lizzy.rs Git - rust.git/blob - src/test/ui/typeck/typeck-builtin-bound-type-parameters.rs
Rollup merge of #84880 - jyn514:cleanup-itemkind, r=GuillaumeGomez
[rust.git] / src / test / ui / typeck / typeck-builtin-bound-type-parameters.rs
1 fn foo1<T:Copy<U>, U>(x: T) {}
2 //~^ ERROR this trait takes 0 generic arguments but 1 generic argument was supplied
3
4 trait Trait: Copy<dyn Send> {}
5 //~^ ERROR this trait takes 0 generic arguments but 1 generic argument was supplied
6
7 struct MyStruct1<T: Copy<T>>;
8 //~^ ERROR this trait takes 0 generic arguments but 1 generic argument was supplied
9
10 struct MyStruct2<'a, T: Copy<'a>>;
11 //~^ ERROR this trait takes 0 lifetime arguments but 1 lifetime argument was supplied
12
13 fn foo2<'a, T:Copy<'a, U>, U>(x: T) {}
14 //~^ ERROR this trait takes 0 lifetime arguments but 1 lifetime argument was supplied
15 //~| ERROR this trait takes 0 generic arguments but 1 generic argument was supplied
16
17 fn main() { }