]> git.lizzy.rs Git - rust.git/blob - src/test/ui/rfc-2632-const-trait-impl/cross-crate.stocknc.stderr
Rollup merge of #99651 - compiler-errors:fn-and-raw-ptr-in-const-generics, r=oli-obk
[rust.git] / src / test / ui / rfc-2632-const-trait-impl / cross-crate.stocknc.stderr
1 error[E0277]: the trait bound `cross_crate::NonConst: cross_crate::MyTrait` is not satisfied
2   --> $DIR/cross-crate.rs:17:14
3    |
4 LL |     NonConst.func();
5    |              ^^^^ the trait `~const cross_crate::MyTrait` is not implemented for `cross_crate::NonConst`
6    |
7 note: the trait `cross_crate::MyTrait` is implemented for `cross_crate::NonConst`, but that implementation is not `const`
8   --> $DIR/cross-crate.rs:17:14
9    |
10 LL |     NonConst.func();
11    |              ^^^^
12 help: consider introducing a `where` clause, but there might be an alternative better way to express this requirement
13    |
14 LL | const fn const_context() where cross_crate::NonConst: ~const cross_crate::MyTrait {
15    |                          ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16
17 error: aborting due to previous error
18
19 For more information about this error, try `rustc --explain E0277`.