2024-10-02 19:42:06 +08:00
|
|
|
error[E0277]: the trait bound `NonConstImpl: ~const ConstDefaultFn` is not satisfied
|
|
|
|
|
--> $DIR/const-default-method-bodies.rs:26:18
|
2022-01-28 21:57:29 +11:00
|
|
|
|
|
|
|
|
|
LL | NonConstImpl.a();
|
2024-10-02 19:42:06 +08:00
|
|
|
| ^ 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`
|
2024-10-02 19:42:06 +08:00
|
|
|
--> $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
|
2024-10-02 19:42:06 +08:00
|
|
|
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
|
|
|
|
2024-10-02 19:42:06 +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`.
|