]> git.lizzy.rs Git - rust.git/blob - src/test/ui/traits/trait-object-safety.stderr
028e9eedd641a227cd11e60ee2bf952c260d8aa0
[rust.git] / src / test / ui / traits / trait-object-safety.stderr
1 error[E0038]: the trait `Tr` cannot be made into an object
2   --> $DIR/trait-object-safety.rs:15:22
3    |
4 LL |     fn foo();
5    |        --- associated function `foo` has no `self` parameter
6 ...
7 LL |     let _: &dyn Tr = &St;
8    |                      ^^^ the trait `Tr` cannot be made into an object
9    |
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`
12
13 error[E0038]: the trait `Tr` cannot be made into an object
14   --> $DIR/trait-object-safety.rs:15:12
15    |
16 LL |     fn foo();
17    |        --- associated function `foo` has no `self` parameter
18 ...
19 LL |     let _: &dyn Tr = &St;
20    |            ^^^^^^^ the trait `Tr` cannot be made into an object
21
22 error: aborting due to 2 previous errors
23
24 For more information about this error, try `rustc --explain E0038`.