From 787af97babcb911f2ce70d3d28959cdccc7901bd Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Tue, 7 Jan 2025 12:03:28 +0000 Subject: Use error constant instead of explicit error handling --- compiler/rustc_ty_utils/src/consts.rs | 1 - 1 file changed, 1 deletion(-) (limited to 'compiler/rustc_ty_utils/src') diff --git a/compiler/rustc_ty_utils/src/consts.rs b/compiler/rustc_ty_utils/src/consts.rs index 637e239a570..406e23eb879 100644 --- a/compiler/rustc_ty_utils/src/consts.rs +++ b/compiler/rustc_ty_utils/src/consts.rs @@ -120,7 +120,6 @@ fn recurse_build<'tcx>( let sp = node.span; match tcx.at(sp).lit_to_const(LitToConstInput { lit: &lit.node, ty: node.ty, neg }) { Ok(c) => c, - Err(LitToConstError::Reported(guar)) => ty::Const::new_error(tcx, guar), Err(LitToConstError::TypeError) => { bug!("encountered type error in lit_to_const") } -- cgit 1.4.1-3-g733a5