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