enable using the evaluation cache on predicates with LBRs

There is no reason not to do it.
This commit is contained in:
Ariel Ben-Yehuda 2018-09-28 23:20:16 +03:00
parent 53a4b39909
commit 9d44e9eb7c

View File

@ -292,7 +292,7 @@ fn process_obligation(&mut self,
ty::Predicate::Trait(ref data) => {
let trait_obligation = obligation.with(data.clone());
if data.is_global() && !data.has_late_bound_regions() {
if data.is_global() {
// no type variables present, can use evaluation for better caching.
// FIXME: consider caching errors too.
if self.selcx.infcx().predicate_must_hold(&obligation) {