diff options
| author | bors <bors@rust-lang.org> | 2022-11-20 01:16:52 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-11-20 01:16:52 +0000 |
| commit | 7477c1f4f7d6bef037d523099b240d22aa1b63a0 (patch) | |
| tree | 8e972867a85f5c1a7f9dc7ffa4d52b1a7ecc19c6 /compiler/rustc_traits/src | |
| parent | cd1f782b742f2c83d91648efae35dfd0d79cec08 (diff) | |
| parent | 99f7e9494e137c56fdb34ad76280386ce3b60703 (diff) | |
| download | rust-7477c1f4f7d6bef037d523099b240d22aa1b63a0.tar.gz rust-7477c1f4f7d6bef037d523099b240d22aa1b63a0.zip | |
Auto merge of #104522 - RalfJung:try_normalize_after_erasing_regions, r=oli-obk
try_normalize_after_erasing_regions: promote an assertion to always run In https://github.com/rust-lang/miri/issues/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.
Diffstat (limited to 'compiler/rustc_traits/src')
| -rw-r--r-- | compiler/rustc_traits/src/normalize_erasing_regions.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/rustc_traits/src/normalize_erasing_regions.rs b/compiler/rustc_traits/src/normalize_erasing_regions.rs index 2da64d73d34..f1835d317e8 100644 --- a/compiler/rustc_traits/src/normalize_erasing_regions.rs +++ b/compiler/rustc_traits/src/normalize_erasing_regions.rs @@ -34,7 +34,9 @@ fn try_normalize_after_erasing_regions<'tcx, T: TypeFoldable<'tcx> + PartialEq + // We don't care about the `obligations`; they are // always only region relations, and we are about to // erase those anyway: - debug_assert_eq!( + // This has been seen to fail in RL, so making it a non-debug assertion to better catch + // those cases. + assert_eq!( normalized_obligations.iter().find(|p| not_outlives_predicate(p.predicate)), None, ); |
