]> git.lizzy.rs Git - rust.git/blob - src/test/ui/rfc-2632-const-trait-impl/call-const-trait-method-fail.stderr
Auto merge of #100845 - timvermeulen:iter_compare, r=scottmcm
[rust.git] / src / test / ui / rfc-2632-const-trait-impl / call-const-trait-method-fail.stderr
1 error[E0277]: the trait bound `u32: ~const Plus` is not satisfied
2   --> $DIR/call-const-trait-method-fail.rs:25:7
3    |
4 LL |     a.plus(b)
5    |       ^^^^ the trait `~const Plus` is not implemented for `u32`
6    |
7 note: the trait `Plus` is implemented for `u32`, but that implementation is not `const`
8   --> $DIR/call-const-trait-method-fail.rs:25:7
9    |
10 LL |     a.plus(b)
11    |       ^^^^
12 help: consider introducing a `where` clause, but there might be an alternative better way to express this requirement
13    |
14 LL | pub const fn add_u32(a: u32, b: u32) -> u32 where u32: ~const Plus {
15    |                                             ++++++++++++++++++++++
16
17 error: aborting due to previous error
18
19 For more information about this error, try `rustc --explain E0277`.