diff --git a/rust-toolchain b/rust-toolchain index 76dc5a3e..54654b2c 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -nightly-2020-07-07 +nightly-2020-07-15 diff --git a/src/translate.rs b/src/translate.rs index 008ff4b0..dbf7f892 100644 --- a/src/translate.rs +++ b/src/translate.rs @@ -494,11 +494,12 @@ impl<'a, 'tcx> TranslationContext<'a, 'tcx> { orig_def_id: DefId, param_env: ParamEnv<'tcx>, ) -> Option> { - self.translate_predicates(orig_def_id, param_env.caller_bounds) - .map(|target_preds| ParamEnv { - caller_bounds: self.tcx.intern_predicates(&target_preds), - ..param_env - }) + self.translate_predicates(orig_def_id, param_env.caller_bounds()) + .map(|target_preds| ParamEnv::new( + self.tcx.intern_predicates(&target_preds), + param_env.reveal(), + Some(orig_def_id), + )) } /// Translate a `TraitRef` in the context of an item. diff --git a/src/traverse.rs b/src/traverse.rs index 5969418c..4c35d538 100644 --- a/src/traverse.rs +++ b/src/traverse.rs @@ -591,7 +591,7 @@ fn diff_traits<'tcx>( let mut old_sealed = false; let old_param_env = tcx.param_env(old); - for bound in old_param_env.caller_bounds { + for bound in old_param_env.caller_bounds() { if let PredicateKind::Trait(pred, _) = *bound.kind() { let trait_ref = pred.skip_binder().trait_ref;