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 b8f4d24 commit 2eec4e1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 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: 7 additions & 4 deletions src/translate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -494,10 +494,13 @@ 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),
)
})
}

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 2eec4e1

Please sign in to comment.