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_ty_utils/src | |
| parent | 7833cf7a4703099d32012848f682c1e7decc0f51 (diff) | |
| download | rust-787af97babcb911f2ce70d3d28959cdccc7901bd.tar.gz rust-787af97babcb911f2ce70d3d28959cdccc7901bd.zip | |
Use error constant instead of explicit error handling
Diffstat (limited to 'compiler/rustc_ty_utils/src')
| -rw-r--r-- | compiler/rustc_ty_utils/src/consts.rs | 1 |
1 files changed, 0 insertions, 1 deletions
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") } |
