From 3ba10e216aa07fcf5a30b097affcc776374222d9 Mon Sep 17 00:00:00 2001 From: Ali MJ Al-Nasrawy Date: Wed, 23 Nov 2022 07:40:04 +0300 Subject: [PATCH] quick fixes --- compiler/rustc_hir_typeck/src/fn_ctxt/_impl.rs | 1 - compiler/rustc_traits/src/chalk/lowering.rs | 5 ++++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/compiler/rustc_hir_typeck/src/fn_ctxt/_impl.rs b/compiler/rustc_hir_typeck/src/fn_ctxt/_impl.rs index 2b1a0386a5abe..aaf0782fadfce 100644 --- a/compiler/rustc_hir_typeck/src/fn_ctxt/_impl.rs +++ b/compiler/rustc_hir_typeck/src/fn_ctxt/_impl.rs @@ -1011,7 +1011,6 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { hir_id: hir::HirId, ) -> (Ty<'tcx>, Res) { let tcx = self.tcx; - assert_eq!(res.ns(), Some(rustc_hir::def::Namespace::ValueNS)); let path_segs = match res { Res::Local(_) | Res::SelfCtor(_) => vec![], diff --git a/compiler/rustc_traits/src/chalk/lowering.rs b/compiler/rustc_traits/src/chalk/lowering.rs index 06a42a95d6061..716ca9053b347 100644 --- a/compiler/rustc_traits/src/chalk/lowering.rs +++ b/compiler/rustc_traits/src/chalk/lowering.rs @@ -191,7 +191,10 @@ impl<'tcx> LowerInto<'tcx, chalk_ir::GoalData>> for ty::Predi GenericArgKind::Const(..) => { chalk_ir::GoalData::All(chalk_ir::Goals::empty(interner)) } - GenericArgKind::Lifetime(lt) => bug!("unexpected well formed predicate: {:?}", lt), + // Lifetimes are unconditionally well-formed. + GenericArgKind::Lifetime(_) => { + chalk_ir::GoalData::All(chalk_ir::Goals::empty(interner)) + } }, ty::PredicateKind::ObjectSafe(t) => chalk_ir::GoalData::DomainGoal(