]> git.lizzy.rs Git - rust.git/blob - tests/ui/rfc-2632-const-trait-impl/call-generic-method-nonconst.stderr
Rollup merge of #106625 - Swatinem:ref/cov6, r=nagisa
[rust.git] / tests / ui / rfc-2632-const-trait-impl / call-generic-method-nonconst.stderr
1 error[E0277]: the trait bound `S: ~const Foo` is not satisfied
2   --> $DIR/call-generic-method-nonconst.rs:23:34
3    |
4 LL | pub const EQ: bool = equals_self(&S);
5    |                      ----------- ^^ the trait `~const Foo` is not implemented for `S`
6    |                      |
7    |                      required by a bound introduced by this call
8    |
9 note: the trait `Foo` is implemented for `S`, but that implementation is not `const`
10   --> $DIR/call-generic-method-nonconst.rs:23:34
11    |
12 LL | pub const EQ: bool = equals_self(&S);
13    |                                  ^^
14 note: required by a bound in `equals_self`
15   --> $DIR/call-generic-method-nonconst.rs:16:25
16    |
17 LL | const fn equals_self<T: ~const Foo>(t: &T) -> bool {
18    |                         ^^^^^^^^^^ required by this bound in `equals_self`
19
20 error: aborting due to previous error
21
22 For more information about this error, try `rustc --explain E0277`.