1 error[E0038]: the trait `Tr` cannot be made into an object
2 --> $DIR/trait-object-safety.rs:15:22
5 | --- associated function `foo` has no `self` parameter
7 LL | let _: &dyn Tr = &St;
8 | ^^^ the trait `Tr` cannot be made into an object
10 = note: required because of the requirements on the impl of `std::ops::CoerceUnsized<&dyn Tr>` for `&St`
11 = note: required by cast to type `&dyn Tr`
13 error[E0038]: the trait `Tr` cannot be made into an object
14 --> $DIR/trait-object-safety.rs:15:12
17 | --- associated function `foo` has no `self` parameter
19 LL | let _: &dyn Tr = &St;
20 | ^^^^^^^ the trait `Tr` cannot be made into an object
22 error: aborting due to 2 previous errors
24 For more information about this error, try `rustc --explain E0038`.