fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #66089 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4560ea788cb

1.39.0
1.6 KiB40 linesraw
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
37error: aborting due to 4 previous errors
38
39Some errors have detailed explanations: E0038, E0107.
40For more information about an error, try `rustc --explain E0038`.