Skip to content

Commit 50a296f

Browse files
committed
avoid ICE on invalid param-env normalization
1 parent 0bf3d11 commit 50a296f

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

  • compiler/rustc_trait_selection/src/traits

compiler/rustc_trait_selection/src/traits/mod.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -308,11 +308,10 @@ fn do_normalize_predicates<'tcx>(
308308
//
309309
// @lcnr: Let's still ICE here for now. I want a test case
310310
// for that.
311-
span_bug!(
311+
Err(tcx.dcx().span_delayed_bug(
312312
span,
313-
"inference variables in normalized parameter environment: {}",
314-
fixup_err
315-
);
313+
format!("inference variables in normalized parameter environment: {fixup_err}"),
314+
))
316315
}
317316
}
318317
}

0 commit comments

Comments
 (0)