2019-01-08 22:14:04 +01:00
|
|
|
error[E0038]: the trait `Bar` cannot be made into an object
|
|
|
|
--> $DIR/object-safety-associated-consts.rs:14:5
|
|
|
|
|
|
2020-01-31 16:47:00 -08:00
|
|
|
LL | trait Bar {
|
|
|
|
| --- this trait cannot be made into an object...
|
2019-01-08 22:14:04 +01:00
|
|
|
LL | const X: usize;
|
2020-02-03 10:43:45 -08:00
|
|
|
| - ...because it contains this associated `const`
|
2019-01-08 22:14:04 +01:00
|
|
|
...
|
|
|
|
LL | t
|
|
|
|
| ^ the trait `Bar` cannot be made into an object
|
|
|
|
|
|
2020-01-31 16:47:00 -08:00
|
|
|
= help: consider moving `X` to another trait
|
2020-09-02 10:40:56 +03:00
|
|
|
= note: required because of the requirements on the impl of `CoerceUnsized<&dyn Bar>` for `&T`
|
2019-01-08 22:14:04 +01:00
|
|
|
= note: required by cast to type `&dyn Bar`
|
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0038`.
|