fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #72883 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum49cae55760d

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