]>
Commit | Line | Data |
---|---|---|
ff7c6d11 | 1 | error[E0038]: the trait `Bar` cannot be made into an object |
74b04a01 | 2 | --> $DIR/object-safety-associated-consts.rs:12:30 |
ff7c6d11 | 3 | | |
74b04a01 XL |
4 | LL | trait Bar { |
5 | | --- this trait cannot be made into an object... | |
e1599b0c | 6 | LL | const X: usize; |
74b04a01 | 7 | | - ...because it contains this associated `const` |
e1599b0c | 8 | ... |
dc9dc135 | 9 | LL | fn make_bar<T:Bar>(t: &T) -> &dyn Bar { |
74b04a01 XL |
10 | | ^^^^^^^^ the trait `Bar` cannot be made into an object |
11 | | | |
12 | = help: consider moving `X` to another trait | |
ff7c6d11 XL |
13 | |
14 | error: aborting due to previous error | |
15 | ||
0531ce1d | 16 | For more information about this error, try `rustc --explain E0038`. |