Files
rust/tests/ui/associated-item/issue-48027.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

29 lines
1.1 KiB
Plaintext
Raw Normal View History

error[E0038]: the trait `Bar` is not dyn compatible
2021-03-29 20:10:26 +02:00
--> $DIR/issue-48027.rs:6:6
|
LL | impl dyn Bar {}
| ^^^^^^^ `Bar` is not dyn compatible
2021-03-29 20:10:26 +02:00
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
2021-03-29 20:10:26 +02:00
--> $DIR/issue-48027.rs:2:11
|
LL | trait Bar {
| --- this trait is not dyn compatible...
2021-03-29 20:10:26 +02:00
LL | const X: usize;
| ^ ...because it contains this associated `const`
= help: consider moving `X` to another trait
2021-03-29 20:10:26 +02:00
error[E0790]: cannot refer to the associated constant on trait without specifying the corresponding `impl` type
2022-06-12 00:47:21 +02:00
--> $DIR/issue-48027.rs:3:32
|
LL | const X: usize;
| --------------- `Bar::X` defined here
2022-06-12 00:47:21 +02:00
LL | fn return_n(&self) -> [u8; Bar::X];
| ^^^^^^ cannot refer to the associated constant of trait
2022-06-12 00:47:21 +02:00
2019-10-14 10:47:14 +09:00
error: aborting due to 2 previous errors
Some errors have detailed explanations: E0038, E0790.
2019-10-14 10:47:14 +09:00
For more information about an error, try `rustc --explain E0038`.