Skip to content

Commit d0cd9a9

Browse files
committed
1 parent 1ed57b8 commit d0cd9a9

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

rust-toolchain

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# NOTE: Keep in sync with nightly date on README
22
[toolchain]
3-
channel = "nightly-2022-01-17"
3+
channel = "nightly-2022-01-19"
44
components = ["llvm-tools-preview", "rustc-dev"]

src/translate.rs

+6-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use rustc_infer::infer::InferCtxt;
88
use rustc_middle::ty::{
99
fold::{BottomUpFolder, TypeFoldable, TypeFolder},
1010
subst::{GenericArg, InternalSubsts, SubstsRef},
11-
GenericParamDefKind, ParamEnv, Predicate, Region, TraitRef, Ty, TyCtxt, Unevaluated,
11+
GenericParamDefKind, ParamEnv, Predicate, Region, Term, TraitRef, Ty, TyCtxt, Unevaluated,
1212
};
1313
use std::collections::HashMap;
1414

@@ -261,7 +261,7 @@ impl<'a, 'tcx> TranslationContext<'a, 'tcx> {
261261
substs: self
262262
.tcx
263263
.intern_substs(&target_substs[1..]),
264-
ty,
264+
term: Term::Ty(ty),
265265
})
266266
} else {
267267
success.set(false);
@@ -420,7 +420,10 @@ impl<'a, 'tcx> TranslationContext<'a, 'tcx> {
420420
substs: target_substs,
421421
item_def_id: target_def_id,
422422
},
423-
ty: self.translate(index_map, pred.ty),
423+
term: match pred.term {
424+
Term::Ty(ty) => Term::Ty(self.translate(index_map, ty)),
425+
Term::Const(_) => pred.term,
426+
},
424427
}
425428
} else {
426429
return None;

0 commit comments

Comments
 (0)