Skip to content

Commit

Permalink
Fix breakage due to rust-lang/rust#73978
Browse files Browse the repository at this point in the history
  • Loading branch information
Xanewok committed Nov 18, 2020
1 parent 0c23bf0 commit 2611917
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1 @@
nightly-2020-07-07
nightly-2020-07-15
11 changes: 6 additions & 5 deletions src/translate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -494,11 +494,12 @@ impl<'a, 'tcx> TranslationContext<'a, 'tcx> {
orig_def_id: DefId,
param_env: ParamEnv<'tcx>,
) -> Option<ParamEnv<'tcx>> {
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.
Expand Down
2 changes: 1 addition & 1 deletion src/traverse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 2611917

Please sign in to comment.