From 4e1a5968f13b19f16b88a52de1aa9fade94d469a Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Fri, 20 Aug 2021 13:56:54 +0000 Subject: [PATCH] Found suspicious comparison of constants --- compiler/rustc_borrowck/src/type_check/relate_tys.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/compiler/rustc_borrowck/src/type_check/relate_tys.rs b/compiler/rustc_borrowck/src/type_check/relate_tys.rs index cc3fe0a123c55..0b5171680ad52 100644 --- a/compiler/rustc_borrowck/src/type_check/relate_tys.rs +++ b/compiler/rustc_borrowck/src/type_check/relate_tys.rs @@ -117,6 +117,9 @@ impl<'tcx> TypeRelatingDelegate<'tcx> for NllTypeRelatingDelegate<'_, '_, 'tcx> // We don't have to worry about the equality of consts during borrow checking // as consts always have a static lifetime. + // FIXME(oli-obk): is this really true? We can at least have HKL and with + // inline consts we may have further lifetimes that may be unsound to treat as + // 'static. fn const_equate(&mut self, _a: &'tcx Const<'tcx>, _b: &'tcx Const<'tcx>) {} fn normalization() -> NormalizationStrategy {