1
Fork 0

add note suggesting that predicate is satisfied but is not const

This commit is contained in:
Michael Goulet 2022-01-26 19:09:44 -08:00
parent 009c1d0248
commit 1ab97dbc52
9 changed files with 71 additions and 0 deletions

View file

@ -4,6 +4,11 @@ error[E0277]: the trait bound `T: ~const Bar` is not satisfied
LL | T::b();
| ^^^^ the trait `~const Bar` is not implemented for `T`
|
note: the trait `Bar` is implemented for `T`, but that implementation is not `const`
--> $DIR/trait-where-clause.rs:14:5
|
LL | T::b();
| ^^^^
note: required by a bound in `Foo::b`
--> $DIR/trait-where-clause.rs:8:24
|
@ -20,6 +25,11 @@ error[E0277]: the trait bound `T: ~const Bar` is not satisfied
LL | T::c::<T>();
| ^^^^^^^^^ the trait `~const Bar` is not implemented for `T`
|
note: the trait `Bar` is implemented for `T`, but that implementation is not `const`
--> $DIR/trait-where-clause.rs:16:5
|
LL | T::c::<T>();
| ^^^^^^^^^
note: required by a bound in `Foo::c`
--> $DIR/trait-where-clause.rs:9:13
|