]> git.lizzy.rs Git - rust.git/commitdiff
Replace `is_global` call on data with call on predicate
authorMatthew Jasper <mjjasper1@gmail.com>
Wed, 10 Jun 2020 08:38:13 +0000 (09:38 +0100)
committerMatthew Jasper <mjjasper1@gmail.com>
Sun, 21 Jun 2020 09:22:21 +0000 (10:22 +0100)
src/librustc_trait_selection/traits/fulfill.rs

index 106753ed809a5944fe365b3513fb8e7eac9419a6..32ab63458e7528aa65a9b2a72cf98ccc9ad2ca33 100644 (file)
@@ -321,7 +321,7 @@ fn process_obligation(
             ty::PredicateKind::Trait(ref data, _) => {
                 let trait_obligation = obligation.with(*data);
 
-                if data.is_global() {
+                if obligation.predicate.is_global() {
                     // no type variables present, can use evaluation for better caching.
                     // FIXME: consider caching errors too.
                     if infcx.predicate_must_hold_considering_regions(&obligation) {