We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
format!
1 parent 5337252 commit 89d9dd6Copy full SHA for 89d9dd6
compiler/rustc_smir/src/rustc_smir/alloc.rs
@@ -27,7 +27,7 @@ pub(crate) fn new_allocation<'tcx>(
27
tables: &mut Tables<'tcx>,
28
) -> Allocation {
29
try_new_allocation(ty, const_value, tables)
30
- .expect(&format!("Failed to convert: {const_value:?} to {ty:?}"))
+ .unwrap_or_else(|_| panic!("Failed to convert: {const_value:?} to {ty:?}"))
31
}
32
33
#[allow(rustc::usage_of_qualified_ty)]
0 commit comments