From e58b932dafe9a3135bde39c229134d9ed2cd00d8 Mon Sep 17 00:00:00 2001 From: Boxy Date: Tue, 22 Nov 2022 12:20:05 +0000 Subject: [PATCH] add FIXME for things that I couldn't find ways to trigger --- .../rustc_trait_selection/src/traits/const_evaluatable.rs | 1 + compiler/rustc_trait_selection/src/traits/wf.rs | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/compiler/rustc_trait_selection/src/traits/const_evaluatable.rs b/compiler/rustc_trait_selection/src/traits/const_evaluatable.rs index d72e5c7a11c..a2f82841e40 100644 --- a/compiler/rustc_trait_selection/src/traits/const_evaluatable.rs +++ b/compiler/rustc_trait_selection/src/traits/const_evaluatable.rs @@ -31,6 +31,7 @@ pub fn is_const_evaluatable<'tcx>( let tcx = infcx.tcx; let uv = match ct.kind() { ty::ConstKind::Unevaluated(uv) => uv, + // FIXME(generic_const_exprs): this seems wrong but I couldn't find a way to get this to trigger ty::ConstKind::Expr(_) => bug!("unexpected expr in `is_const_evaluatable: {ct:?}"), ty::ConstKind::Param(_) | ty::ConstKind::Bound(_, _) diff --git a/compiler/rustc_trait_selection/src/traits/wf.rs b/compiler/rustc_trait_selection/src/traits/wf.rs index 74f6850c2b8..8becc476acf 100644 --- a/compiler/rustc_trait_selection/src/traits/wf.rs +++ b/compiler/rustc_trait_selection/src/traits/wf.rs @@ -476,9 +476,10 @@ fn compute(&mut self, arg: GenericArg<'tcx>) { ty::Binder::dummy(ty::PredicateKind::WellFormed(ct.into())), )); } - // FIXME(julianknodt): need to infer any nested consts here - // so walk and search recursively? - ty::ConstKind::Expr(_) => unimplemented!(), + // FIXME(generic_const_exprs): This seems wrong but I could not find a way to get this to trigger + ty::ConstKind::Expr(_) => { + bug!("checking wfness of `ConstKind::Expr` is unsupported") + } ty::ConstKind::Error(_) | ty::ConstKind::Param(_) -- 2.44.0