]>
Commit | Line | Data |
---|---|---|
8faf50e0 | 1 | error[E0277]: the size for values of type `str` cannot be known at compilation time |
0731742a | 2 | --> $DIR/issue-14366.rs:2:14 |
8faf50e0 | 3 | | |
dc9dc135 | 4 | LL | let _x = "test" as &dyn (::std::any::Any); |
8faf50e0 XL |
5 | | ^^^^^^ doesn't have a size known at compile-time |
6 | | | |
1b1a35ee | 7 | = help: the trait `Sized` is not implemented for `str` |
064997fb | 8 | = note: required for the cast from `str` to the object type `dyn Any` |
04454e1e FG |
9 | help: consider borrowing the value, since `&str` can be coerced into `dyn Any` |
10 | | | |
11 | LL | let _x = &"test" as &dyn (::std::any::Any); | |
12 | | + | |
8faf50e0 XL |
13 | |
14 | error: aborting due to previous error | |
15 | ||
16 | For more information about this error, try `rustc --explain E0277`. |