]> git.lizzy.rs Git - rust.git/blob - src/test/ui/traits/trait-test-2.stderr
9b750d382ec962b227c4b4735ef48b1932ca9632
[rust.git] / src / test / ui / traits / trait-test-2.stderr
1 error[E0107]: wrong number of type arguments: expected 0, found 1
2   --> $DIR/trait-test-2.rs:9:14
3    |
4 LL |     10.dup::<i32>();
5    |              ^^^ unexpected type argument
6
7 error[E0107]: wrong number of type arguments: expected 1, found 2
8   --> $DIR/trait-test-2.rs:10:20
9    |
10 LL |     10.blah::<i32, i32>();
11    |                    ^^^ unexpected type argument
12
13 error[E0038]: the trait `bar` cannot be made into an object
14   --> $DIR/trait-test-2.rs:11:16
15    |
16 LL | 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 ...
21 LL |     (box 10 as Box<dyn bar>).dup();
22    |                ^^^^^^^^^^^^ the trait `bar` cannot be made into an object
23
24 error[E0038]: the trait `bar` cannot be made into an object
25   --> $DIR/trait-test-2.rs:11:6
26    |
27 LL | 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 ...
32 LL |     (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
38 error: aborting due to 4 previous errors
39
40 Some errors have detailed explanations: E0038, E0107.
41 For more information about an error, try `rustc --explain E0038`.