23 lines
868 B
Plaintext
23 lines
868 B
Plaintext
error[E0277]: the trait bound `u32: ~const Plus` is not satisfied
|
|
--> $DIR/call-const-trait-method-fail.rs:27:5
|
|
|
|
|
LL | a.plus(b)
|
|
| ^ the trait `Plus` is not implemented for `u32`
|
|
|
|
|
note: required by a bound in `Plus::plus`
|
|
--> $DIR/call-const-trait-method-fail.rs:5:1
|
|
|
|
|
LL | #[const_trait]
|
|
| ^^^^^^^^^^^^^^ required by this bound in `Plus::plus`
|
|
LL | pub trait Plus {
|
|
LL | fn plus(self, rhs: Self) -> 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 | pub const fn add_u32(a: u32, b: u32) -> u32 where u32: Plus {
|
|
| +++++++++++++++
|
|
|
|
error: aborting due to 1 previous error
|
|
|
|
For more information about this error, try `rustc --explain E0277`.
|