1- error[E0277]: the trait bound `T: ~const Bar` is not satisfied
2- --> $DIR/trait-where-clause.rs:13:5
3- |
4- LL | T::b();
5- | ^^^^ the trait `~const Bar` is not implemented for `T`
6- |
7- note: the trait `Bar` is implemented for `T`, but that implementation is not `const`
8- --> $DIR/trait-where-clause.rs:13:5
9- |
10- LL | T::b();
11- | ^^^^
12- note: required by a bound in `Foo::b`
13- --> $DIR/trait-where-clause.rs:7:24
14- |
15- LL | fn b() where Self: ~const Bar;
16- | ^^^^^^^^^^ required by this bound in `Foo::b`
17- help: consider further restricting this bound
18- |
19- LL | const fn test1<T: ~const Foo + Bar + ~const Bar>() {
20- | ++++++++++++
21-
22- error[E0277]: the trait bound `T: ~const Bar` is not satisfied
23- --> $DIR/trait-where-clause.rs:15:12
24- |
25- LL | T::c::<T>();
26- | ^ the trait `~const Bar` is not implemented for `T`
27- |
28- note: the trait `Bar` is implemented for `T`, but that implementation is not `const`
29- --> $DIR/trait-where-clause.rs:15:12
30- |
31- LL | T::c::<T>();
32- | ^
33- note: required by a bound in `Foo::c`
34- --> $DIR/trait-where-clause.rs:8:13
35- |
36- LL | fn c<T: ~const Bar>();
37- | ^^^^^^^^^^ required by this bound in `Foo::c`
38- help: consider further restricting this bound
39- |
40- LL | const fn test1<T: ~const Foo + Bar + ~const Bar>() {
41- | ++++++++++++
42-
431error[E0277]: the trait bound `T: Bar` is not satisfied
44- --> $DIR/trait-where-clause.rs:27 :5
2+ --> $DIR/trait-where-clause.rs:13 :5
453 |
464LL | T::b();
475 | ^^^^ the trait `Bar` is not implemented for `T`
@@ -53,11 +11,11 @@ LL | fn b() where Self: ~const Bar;
5311 | ^^^^^^^^^^ required by this bound in `Foo::b`
5412help: consider further restricting this bound
5513 |
56- LL | fn test3 <T: Foo + Bar>() {
14+ LL | fn test1 <T: Foo + Bar>() {
5715 | +++++
5816
5917error[E0277]: the trait bound `T: Bar` is not satisfied
60- --> $DIR/trait-where-clause.rs:29 :12
18+ --> $DIR/trait-where-clause.rs:15 :12
6119 |
6220LL | T::c::<T>();
6321 | ^ the trait `Bar` is not implemented for `T`
@@ -69,9 +27,9 @@ LL | fn c<T: ~const Bar>();
6927 | ^^^^^^^^^^ required by this bound in `Foo::c`
7028help: consider further restricting this bound
7129 |
72- LL | fn test3 <T: Foo + Bar>() {
30+ LL | fn test1 <T: Foo + Bar>() {
7331 | +++++
7432
75- error: aborting due to 4 previous errors
33+ error: aborting due to 2 previous errors
7634
7735For more information about this error, try `rustc --explain E0277`.
0 commit comments