1 error[E0107]: this associated function takes 0 generic arguments but 1 generic argument was supplied
5 | ^^^------- help: remove these generics
7 | expected 0 generic arguments
9 note: associated function defined here, with 0 generic 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 generic argument but 2 generic arguments were supplied
16 --> $DIR/test-2.rs:11:8
18 LL | 10.blah::<i32, i32>();
19 | ^^^^ --- help: remove this generic argument
21 | expected 1 generic argument
23 note: associated function defined here, with 1 generic 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:22
32 LL | (Box::new(10) as Box<dyn bar>).dup();
33 | ^^^^^^^^^^^^ `bar` cannot be made into an object
35 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>
36 --> $DIR/test-2.rs:4:30
38 LL | trait bar { fn dup(&self) -> Self; fn blah<X>(&self); }
39 | --- ^^^^ ^^^^ ...because method `blah` has generic type parameters
41 | | ...because method `dup` references the `Self` type in its return type
42 | this trait cannot be made into an object...
43 = help: consider moving `dup` to another trait
44 = help: consider moving `blah` to another trait
46 error[E0038]: the trait `bar` cannot be made into an object
47 --> $DIR/test-2.rs:13:5
49 LL | (Box::new(10) as Box<dyn bar>).dup();
50 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `bar` cannot be made into an object
52 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>
53 --> $DIR/test-2.rs:4:30
55 LL | trait bar { fn dup(&self) -> Self; fn blah<X>(&self); }
56 | --- ^^^^ ^^^^ ...because method `blah` has generic type parameters
58 | | ...because method `dup` references the `Self` type in its return type
59 | this trait cannot be made into an object...
60 = help: consider moving `dup` to another trait
61 = help: consider moving `blah` to another trait
63 error[E0038]: the trait `bar` cannot be made into an object
64 --> $DIR/test-2.rs:13:6
66 LL | (Box::new(10) as Box<dyn bar>).dup();
67 | ^^^^^^^^^^^^ `bar` cannot be made into an object
69 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>
70 --> $DIR/test-2.rs:4:30
72 LL | trait bar { fn dup(&self) -> Self; fn blah<X>(&self); }
73 | --- ^^^^ ^^^^ ...because method `blah` has generic type parameters
75 | | ...because method `dup` references the `Self` type in its return type
76 | this trait cannot be made into an object...
77 = help: consider moving `dup` to another trait
78 = help: consider moving `blah` to another trait
79 = note: required for `Box<{integer}>` to implement `CoerceUnsized<Box<dyn bar>>`
80 = note: required by cast to type `Box<dyn bar>`
82 error: aborting due to 5 previous errors
84 Some errors have detailed explanations: E0038, E0107.
85 For more information about an error, try `rustc --explain E0038`.