]> git.lizzy.rs Git - rust.git/commitdiff
add FIXME for things that I couldn't find ways to trigger
authorBoxy <supbscripter@gmail.com>
Tue, 22 Nov 2022 12:20:05 +0000 (12:20 +0000)
committerkadmin <julianknodt@gmail.com>
Fri, 25 Nov 2022 09:28:44 +0000 (09:28 +0000)
compiler/rustc_trait_selection/src/traits/const_evaluatable.rs
compiler/rustc_trait_selection/src/traits/wf.rs

index d72e5c7a11c4b02d3aae432a1216dfeb1098057f..a2f82841e40f2d1a812f9566a417ad9689419b6a 100644 (file)
@@ -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(_, _)
index 74f6850c2b81534722ea11615f6497b188dcdea4..8becc476acf5978ffcf0ea79fb61d7d644d701f6 100644 (file)
@@ -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(_)