Skip to content

Commit 7477c1f

Browse files
committed
Auto merge of rust-lang#104522 - RalfJung:try_normalize_after_erasing_regions, r=oli-obk
try_normalize_after_erasing_regions: promote an assertion to always run In rust-lang/miri#2433 this assertion has been seen to trigger, so it might be worth actually checking this? Regressing debug assertions are very easy to miss until much later, and then they become quite hard to debug.
2 parents cd1f782 + 99f7e94 commit 7477c1f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: compiler/rustc_traits/src/normalize_erasing_regions.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ fn try_normalize_after_erasing_regions<'tcx, T: TypeFoldable<'tcx> + PartialEq +
3434
// We don't care about the `obligations`; they are
3535
// always only region relations, and we are about to
3636
// erase those anyway:
37-
debug_assert_eq!(
37+
// This has been seen to fail in RL, so making it a non-debug assertion to better catch
38+
// those cases.
39+
assert_eq!(
3840
normalized_obligations.iter().find(|p| not_outlives_predicate(p.predicate)),
3941
None,
4042
);

0 commit comments

Comments
 (0)