Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
dario23 committed May 4, 2022
1 parent 1ed57b8 commit d0cd9a9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# NOTE: Keep in sync with nightly date on README
[toolchain]
channel = "nightly-2022-01-17"
channel = "nightly-2022-01-19"
components = ["llvm-tools-preview", "rustc-dev"]
9 changes: 6 additions & 3 deletions src/translate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use rustc_infer::infer::InferCtxt;
use rustc_middle::ty::{
fold::{BottomUpFolder, TypeFoldable, TypeFolder},
subst::{GenericArg, InternalSubsts, SubstsRef},
GenericParamDefKind, ParamEnv, Predicate, Region, TraitRef, Ty, TyCtxt, Unevaluated,
GenericParamDefKind, ParamEnv, Predicate, Region, Term, TraitRef, Ty, TyCtxt, Unevaluated,
};
use std::collections::HashMap;

Expand Down Expand Up @@ -261,7 +261,7 @@ impl<'a, 'tcx> TranslationContext<'a, 'tcx> {
substs: self
.tcx
.intern_substs(&target_substs[1..]),
ty,
term: Term::Ty(ty),
})
} else {
success.set(false);
Expand Down Expand Up @@ -420,7 +420,10 @@ impl<'a, 'tcx> TranslationContext<'a, 'tcx> {
substs: target_substs,
item_def_id: target_def_id,
},
ty: self.translate(index_map, pred.ty),
term: match pred.term {
Term::Ty(ty) => Term::Ty(self.translate(index_map, ty)),
Term::Const(_) => pred.term,
},
}
} else {
return None;
Expand Down

0 comments on commit d0cd9a9

Please sign in to comment.