fork/rust
git clone https://git.julia.blue/fork/rust
f3e1a954d2e
1.41.1
1error[E0107]: wrong number of type arguments: expected 0, found 1 2 --> $DIR/trait-test-2.rs:9:14 3 | 4LL | 10.dup::<i32>(); 5 | ^^^ unexpected type argument 6 7error[E0107]: wrong number of type arguments: expected 1, found 2 8 --> $DIR/trait-test-2.rs:10:20 9 | 10LL | 10.blah::<i32, i32>(); 11 | ^^^ unexpected type argument 12 13error[E0038]: the trait `bar` cannot be made into an object 14 --> $DIR/trait-test-2.rs:11:16 15 | 16LL | trait bar { fn dup(&self) -> Self; fn blah<X>(&self); } 17 | --- ---- method `blah` has generic type parameters 18 | | 19 | method `dup` references the `Self` type in its parameters or return type 20... 21LL | (box 10 as Box<dyn bar>).dup(); 22 | ^^^^^^^^^^^^ the trait `bar` cannot be made into an object 23 24error[E0038]: the trait `bar` cannot be made into an object 25 --> $DIR/trait-test-2.rs:11:6 26 | 27LL | trait bar { fn dup(&self) -> Self; fn blah<X>(&self); } 28 | --- ---- method `blah` has generic type parameters 29 | | 30 | method `dup` references the `Self` type in its parameters or return type 31... 32LL | (box 10 as Box<dyn bar>).dup(); 33 | ^^^^^^ the trait `bar` cannot be made into an object 34 | 35 = note: required because of the requirements on the impl of `std::ops::CoerceUnsized<std::boxed::Box<dyn bar>>` for `std::boxed::Box<{integer}>` 36 = note: required by cast to type `std::boxed::Box<dyn bar>` 37 38error: aborting due to 4 previous errors 39 40Some errors have detailed explanations: E0038, E0107. 41For more information about an error, try `rustc --explain E0038`.