We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
struct_tail_erasing_lifetimes
1 parent c3202af commit cacc082Copy full SHA for cacc082
compiler/rustc_middle/src/ty/layout.rs
@@ -338,13 +338,14 @@ impl<'tcx> SizeSkeleton<'tcx> {
338
pointee,
339
|ty| match tcx.try_normalize_erasing_regions(param_env, ty) {
340
Ok(ty) => ty,
341
- Err(_e) => {
342
- if let Some(guar) = tcx.dcx().has_errors() {
343
- Ty::new_error(tcx, guar)
344
- } else {
345
- bug!("normalization failed, but no errors reported");
346
- }
347
+ Err(e) => Ty::new_error_with_message(
+ tcx,
+ DUMMY_SP,
+ format!(
+ "normalization failed for {} but no errors reported",
+ e.get_type_for_failure()
+ ),
348
349
},
350
|| {},
351
);
0 commit comments