summaryrefslogtreecommitdiffstats
path: root/tests/ui/typeck/typeck-builtin-bound-type-parameters.rs
blob: c463a8ad0c75789f50f9db67f17a96fff71b83b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
fn foo1<T:Copy<U>, U>(x: T) {}
//~^ ERROR this trait takes 0 generic arguments but 1 generic argument was supplied

trait Trait: Copy<dyn Send> {}
//~^ ERROR this trait takes 0 generic arguments but 1 generic argument was supplied

struct MyStruct1<T: Copy<T>>;
//~^ ERROR this trait takes 0 generic arguments but 1 generic argument was supplied

struct MyStruct2<'a, T: Copy<'a>>;
//~^ ERROR this trait takes 0 lifetime arguments but 1 lifetime argument was supplied

fn foo2<'a, T:Copy<'a, U>, U>(x: T) {}
//~^ ERROR this trait takes 0 lifetime arguments but 1 lifetime argument was supplied
//~| ERROR this trait takes 0 generic arguments but 1 generic argument was supplied

fn main() { }