]> git.proxmox.com Git - rustc.git/blame - src/test/ui/rfc-2632-const-trait-impl/const-default-method-bodies.stderr
New upstream version 1.65.0+dfsg1
[rustc.git] / src / test / ui / rfc-2632-const-trait-impl / const-default-method-bodies.stderr
CommitLineData
5099ac24 1error[E0277]: the trait bound `NonConstImpl: ~const ConstDefaultFn` is not satisfied
f2b60f7d 2 --> $DIR/const-default-method-bodies.rs:24:5
136023e0
XL
3 |
4LL | NonConstImpl.a();
f2b60f7d
FG
5 | ^^^^^^^^^^^^ - required by a bound introduced by this call
6 | |
7 | the trait `~const ConstDefaultFn` is not implemented for `NonConstImpl`
5099ac24
FG
8 |
9note: the trait `ConstDefaultFn` is implemented for `NonConstImpl`, but that implementation is not `const`
f2b60f7d 10 --> $DIR/const-default-method-bodies.rs:24:5
5099ac24
FG
11 |
12LL | NonConstImpl.a();
f2b60f7d 13 | ^^^^^^^^^^^^
064997fb 14help: consider introducing a `where` clause, but there might be an alternative better way to express this requirement
5099ac24 15 |
064997fb
FG
16LL | const fn test() where NonConstImpl: ~const ConstDefaultFn {
17 | +++++++++++++++++++++++++++++++++++++++++
136023e0 18
064997fb 19error: aborting due to previous error
136023e0 20
064997fb 21For more information about this error, try `rustc --explain E0277`.