]>
Commit | Line | Data |
---|---|---|
e74abb32 XL |
1 | error[E0038]: the trait `Trait` cannot be made into an object |
2 | --> $DIR/wf-convert-unsafe-trait-obj.rs:16:25 | |
3 | | | |
74b04a01 XL |
4 | LL | trait Trait: Sized {} |
5 | | ----- ----- ...because it requires `Self: Sized` | |
6 | | | | |
7 | | this trait cannot be made into an object... | |
8 | ... | |
e74abb32 XL |
9 | LL | let t: &dyn Trait = &S; |
10 | | ^^ the trait `Trait` cannot be made into an object | |
11 | | | |
1b1a35ee | 12 | = note: required because of the requirements on the impl of `CoerceUnsized<&dyn Trait>` for `&S` |
e74abb32 XL |
13 | = note: required by cast to type `&dyn Trait` |
14 | ||
15 | error[E0038]: the trait `Trait` cannot be made into an object | |
16 | --> $DIR/wf-convert-unsafe-trait-obj.rs:17:17 | |
17 | | | |
74b04a01 XL |
18 | LL | trait Trait: Sized {} |
19 | | ----- ----- ...because it requires `Self: Sized` | |
20 | | | | |
21 | | this trait cannot be made into an object... | |
22 | ... | |
e74abb32 XL |
23 | LL | takes_trait(&S); |
24 | | ^^ the trait `Trait` cannot be made into an object | |
25 | | | |
1b1a35ee | 26 | = note: required because of the requirements on the impl of `CoerceUnsized<&dyn Trait>` for `&S` |
e74abb32 XL |
27 | = note: required by cast to type `&dyn Trait` |
28 | ||
29 | error[E0038]: the trait `Trait` cannot be made into an object | |
30 | --> $DIR/wf-convert-unsafe-trait-obj.rs:15:5 | |
31 | | | |
74b04a01 XL |
32 | LL | trait Trait: Sized {} |
33 | | ----- ----- ...because it requires `Self: Sized` | |
34 | | | | |
35 | | this trait cannot be made into an object... | |
36 | ... | |
e74abb32 XL |
37 | LL | &S as &dyn Trait; |
38 | | ^^ the trait `Trait` cannot be made into an object | |
39 | | | |
1b1a35ee | 40 | = note: required because of the requirements on the impl of `CoerceUnsized<&dyn Trait>` for `&S` |
e74abb32 XL |
41 | = note: required by cast to type `&dyn Trait` |
42 | ||
43 | error: aborting due to 3 previous errors | |
44 | ||
45 | For more information about this error, try `rustc --explain E0038`. |