1 // Check that when there are vacuous predicates in the environment
2 // (which make a fn uncallable) we don't erroneously cache those and
3 // then consider them satisfied elsewhere. The current technique for
4 // doing this is to not use global caches when there is a chance that
5 // the environment contains such a predicate.
6 // We still error for `i32: Bar<u32>` pending #48214
8 trait Foo<X,Y>: Bar<X> {
13 // We don't always check where clauses for sanity, but in this case
14 // wfcheck does report an error here:
16 where i32: Foo<u32, A> //~ ERROR the trait bound `i32: Bar<u32>` is not satisfied
18 // ... the original intention was to check that we don't use that
19 // vacuous where clause (which could never be satisfied) to accept
20 // the following line and then mess up calls elsewhere.
21 require::<i32, u32>();
30 require::<i32, u32>();