1 error[E0107]: this associated function takes 0 type arguments but 1 type argument was supplied
5 | ^^^------- help: remove these generics
7 | expected 0 type arguments
9 note: associated function defined here, with 0 type parameters
10 --> $DIR/test-2.rs:4:16
12 LL | trait bar { fn dup(&self) -> Self; fn blah<X>(&self); }
15 error[E0107]: this associated function takes 1 type argument but 2 type arguments were supplied
16 --> $DIR/test-2.rs:11:8
18 LL | 10.blah::<i32, i32>();
19 | ^^^^ ----- help: remove this type argument
21 | expected 1 type argument
23 note: associated function defined here, with 1 type parameter: `X`
24 --> $DIR/test-2.rs:4:39
26 LL | trait bar { fn dup(&self) -> Self; fn blah<X>(&self); }
29 error[E0038]: the trait `bar` cannot be made into an object
30 --> $DIR/test-2.rs:13:16
32 LL | (box 10 as Box<dyn bar>).dup();
33 | ^^^^^^^^^^^^ `bar` cannot be made into an object
35 = help: consider moving `dup` to another trait
36 = help: consider moving `blah` to another trait
37 note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
38 --> $DIR/test-2.rs:4:30
40 LL | trait bar { fn dup(&self) -> Self; fn blah<X>(&self); }
41 | --- ^^^^ ^^^^ ...because method `blah` has generic type parameters
43 | | ...because method `dup` references the `Self` type in its return type
44 | this trait cannot be made into an object...
46 error[E0038]: the trait `bar` cannot be made into an object
47 --> $DIR/test-2.rs:13:6
49 LL | (box 10 as Box<dyn bar>).dup();
50 | ^^^^^^ `bar` cannot be made into an object
52 = help: consider moving `dup` to another trait
53 = help: consider moving `blah` to another trait
54 note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
55 --> $DIR/test-2.rs:4:30
57 LL | trait bar { fn dup(&self) -> Self; fn blah<X>(&self); }
58 | --- ^^^^ ^^^^ ...because method `blah` has generic type parameters
60 | | ...because method `dup` references the `Self` type in its return type
61 | this trait cannot be made into an object...
62 = note: required because of the requirements on the impl of `CoerceUnsized<Box<dyn bar>>` for `Box<{integer}>`
63 = note: required by cast to type `Box<dyn bar>`
65 error: aborting due to 4 previous errors
67 Some errors have detailed explanations: E0038, E0107.
68 For more information about an error, try `rustc --explain E0038`.