Files
rust/tests/ui/rfcs/rfc-2632-const-trait-impl/const-default-method-bodies.stderr

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

23 lines
880 B
Plaintext
Raw Normal View History

error[E0277]: the trait bound `NonConstImpl: ~const ConstDefaultFn` is not satisfied
--> $DIR/const-default-method-bodies.rs:26:18
|
LL | NonConstImpl.a();
| ^ the trait `ConstDefaultFn` is not implemented for `NonConstImpl`
2022-02-10 20:22:54 +11:00
|
2024-06-25 09:50:01 +00:00
note: required by a bound in `ConstDefaultFn::a`
--> $DIR/const-default-method-bodies.rs:5:1
2024-06-25 09:50:01 +00:00
|
LL | #[const_trait]
| ^^^^^^^^^^^^^^ required by this bound in `ConstDefaultFn::a`
...
LL | fn a(self) {
| - required by a bound in this associated function
help: consider introducing a `where` clause, but there might be an alternative better way to express this requirement
|
LL | const fn test() where NonConstImpl: ConstDefaultFn {
| ++++++++++++++++++++++++++++++++++
2021-07-10 15:17:09 +08:00
error: aborting due to 1 previous error
2021-07-10 15:17:09 +08:00
2023-08-06 13:20:55 +00:00
For more information about this error, try `rustc --explain E0277`.