rust/src/test/ui/rfc-2632-const-trait-impl/cross-crate.stocknc.stderr

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

20 lines
886 B
Plaintext
Raw Normal View History

2022-07-25 03:17:00 -05:00
error[E0277]: the trait bound `cross_crate::NonConst: cross_crate::MyTrait` is not satisfied
--> $DIR/cross-crate.rs:17:14
|
LL | NonConst.func();
| ^^^^ the trait `~const cross_crate::MyTrait` is not implemented for `cross_crate::NonConst`
|
note: the trait `cross_crate::MyTrait` is implemented for `cross_crate::NonConst`, but that implementation is not `const`
--> $DIR/cross-crate.rs:17:14
|
LL | NonConst.func();
| ^^^^
help: consider introducing a `where` clause, but there might be an alternative better way to express this requirement
|
LL | const fn const_context() where cross_crate::NonConst: ~const cross_crate::MyTrait {
| ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
error: aborting due to previous error
For more information about this error, try `rustc --explain E0277`.