diff options
| author | Oli Scherer <github333195615777966@oli-obk.de> | 2025-01-07 12:03:28 +0000 |
|---|---|---|
| committer | Oli Scherer <github333195615777966@oli-obk.de> | 2025-01-09 08:48:00 +0000 |
| commit | 787af97babcb911f2ce70d3d28959cdccc7901bd (patch) | |
| tree | cb5cb979ec76b891287d3a7f8e821034ed3568cf /compiler/rustc_hir_analysis/src/hir_ty_lowering | |
| parent | 7833cf7a4703099d32012848f682c1e7decc0f51 (diff) | |
| download | rust-787af97babcb911f2ce70d3d28959cdccc7901bd.tar.gz rust-787af97babcb911f2ce70d3d28959cdccc7901bd.zip | |
Use error constant instead of explicit error handling
Diffstat (limited to 'compiler/rustc_hir_analysis/src/hir_ty_lowering')
| -rw-r--r-- | compiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/compiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs b/compiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs index 0a41dad0dd8..5a65d5bafee 100644 --- a/compiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs +++ b/compiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs @@ -2456,9 +2456,6 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ { LitToConstInput { lit: &lit.node, ty, neg: negated }; let ct = match tcx.lit_to_const(lit_input) { Ok(c) => c, - Err(LitToConstError::Reported(err)) => { - ty::Const::new_error(tcx, err) - } Err(LitToConstError::TypeError) => todo!(), }; (ct, ty) |
