Skip to content
This repository was archived by the owner on Apr 5, 2024. It is now read-only.

Commit eb61d77

Browse files
authored
Merge pull request #122 from JohnTitor/const-equate
Rustup to the latest nightly
2 parents 1c7200f + 128f744 commit eb61d77

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

src/translate.rs

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -362,8 +362,8 @@ impl<'a, 'tcx> TranslationContext<'a, 'tcx> {
362362
predicate: Predicate<'tcx>,
363363
) -> Option<Predicate<'tcx>> {
364364
use rustc_middle::ty::{
365-
Binder, /*EquatePredicate,*/ OutlivesPredicate, ProjectionPredicate, ProjectionTy,
366-
SubtypePredicate, TraitPredicate,
365+
Binder, OutlivesPredicate, ProjectionPredicate, ProjectionTy, SubtypePredicate,
366+
TraitPredicate,
367367
};
368368

369369
Some(match predicate {
@@ -386,13 +386,6 @@ impl<'a, 'tcx> TranslationContext<'a, 'tcx> {
386386
),
387387
constness,
388388
),
389-
/*Predicate::Equate(equate_predicate) => {
390-
Predicate::Equate(equate_predicate.map_bound(|e_pred| {
391-
let l = self.translate(index_map, &e_pred.0);
392-
let r = self.translate(index_map, &e_pred.1);
393-
EquatePredicate(l, r)
394-
}))
395-
},*/
396389
Predicate::RegionOutlives(region_outlives_predicate) => {
397390
Predicate::RegionOutlives(region_outlives_predicate.map_bound(|r_pred| {
398391
let l = self.translate_region(r_pred.0);
@@ -451,6 +444,10 @@ impl<'a, 'tcx> TranslationContext<'a, 'tcx> {
451444
return None;
452445
}
453446
}
447+
Predicate::ConstEquate(c1, c2) => Predicate::ConstEquate(
448+
self.translate(index_map, &c1),
449+
self.translate(index_map, &c2),
450+
),
454451
})
455452
}
456453

0 commit comments

Comments
 (0)