Make rustc build with new chalk
This commit is contained in:
parent
6de5f6277e
commit
36a106891a
6 changed files with 21 additions and 114 deletions
|
@ -142,6 +142,8 @@ impl<'tcx> chalk_solve::RustIrDatabase<RustInterner<'tcx>> for RustIrDatabase<'t
|
|||
Some(CoerceUnsized)
|
||||
} else if lang_items.dispatch_from_dyn_trait() == Some(def_id) {
|
||||
Some(DispatchFromDyn)
|
||||
} else if lang_items.tuple_trait() == Some(def_id) {
|
||||
Some(Tuple)
|
||||
} else {
|
||||
None
|
||||
};
|
||||
|
@ -570,6 +572,7 @@ impl<'tcx> chalk_solve::RustIrDatabase<RustInterner<'tcx>> for RustIrDatabase<'t
|
|||
CoerceUnsized => lang_items.coerce_unsized_trait(),
|
||||
DiscriminantKind => lang_items.discriminant_kind_trait(),
|
||||
DispatchFromDyn => lang_items.dispatch_from_dyn_trait(),
|
||||
Tuple => lang_items.tuple_trait(),
|
||||
};
|
||||
def_id.map(chalk_ir::TraitId)
|
||||
}
|
||||
|
|
|
@ -507,9 +507,6 @@ impl<'tcx> LowerInto<'tcx, Region<'tcx>> for &chalk_ir::Lifetime<RustInterner<'t
|
|||
name: ty::BoundRegionKind::BrAnon(p.idx as u32, None),
|
||||
}),
|
||||
chalk_ir::LifetimeData::Static => return interner.tcx.lifetimes.re_static,
|
||||
chalk_ir::LifetimeData::Empty(_) => {
|
||||
bug!("Chalk should not have been passed an empty lifetime.")
|
||||
}
|
||||
chalk_ir::LifetimeData::Erased => return interner.tcx.lifetimes.re_erased,
|
||||
chalk_ir::LifetimeData::Phantom(void, _) => match *void {},
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue