]> git.lizzy.rs Git - rust.git/blob - src/test/ui/rfc-2632-const-trait-impl/const-default-method-bodies.stderr
Rollup merge of #99818 - aliemjay:fix-closure-normalize, r=jackh726
[rust.git] / src / test / ui / rfc-2632-const-trait-impl / const-default-method-bodies.stderr
1 error[E0277]: the trait bound `NonConstImpl: ~const ConstDefaultFn` is not satisfied
2   --> $DIR/const-default-method-bodies.rs:24:5
3    |
4 LL |     NonConstImpl.a();
5    |     ^^^^^^^^^^^^ - required by a bound introduced by this call
6    |     |
7    |     the trait `~const ConstDefaultFn` is not implemented for `NonConstImpl`
8    |
9 note: the trait `ConstDefaultFn` is implemented for `NonConstImpl`, but that implementation is not `const`
10   --> $DIR/const-default-method-bodies.rs:24:5
11    |
12 LL |     NonConstImpl.a();
13    |     ^^^^^^^^^^^^
14 help: consider introducing a `where` clause, but there might be an alternative better way to express this requirement
15    |
16 LL | const fn test() where NonConstImpl: ~const ConstDefaultFn {
17    |                 +++++++++++++++++++++++++++++++++++++++++
18
19 error: aborting due to previous error
20
21 For more information about this error, try `rustc --explain E0277`.