Make region equality emits Eq constraints#155258
Make region equality emits Eq constraints#155258rust-bors[bot] merged 1 commit intorust-lang:mainfrom
Conversation
|
r? lcnr |
|
Some changes occurred to the core trait solver cc @rust-lang/initiative-trait-system-refactor |
| //~| ERROR mismatched `self` parameter type | ||
| //~| NOTE expected struct `Foo<'a, 'b>` | ||
| //~| NOTE found struct `Foo<'b, 'a>` | ||
| //~| NOTE lifetime mismatch |
There was a problem hiding this comment.
Other tests are untouched but this has been affected somehow (I guess this might be due to having some duplication with both 'a: 'b, 'b: 'a and 'a == 'b)
I think this might be okay as it's unchanged anyway modulo diagnostics deduplication
There was a problem hiding this comment.
This somehow got returned back again while destructuring eq bounds 😂
This comment has been minimized.
This comment has been minimized.
49b0929 to
8d8e4f3
Compare
This comment has been minimized.
This comment has been minimized.
8d8e4f3 to
4119383
Compare
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Make region equality emits Eq constraints
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (52727e5): comparison URL. Overall result: ❌✅ regressions and improvements - please read:Benchmarking means the PR may be perf-sensitive. It's automatically marked not fit for rolling up. Overriding is possible but disadvised: it risks changing compiler perf. Next, please: If you can, justify the regressions found in this try perf run in writing along with @bors rollup=never Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (secondary -0.9%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary -2.4%, secondary -5.3%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis perf run didn't have relevant results for this metric. Bootstrap: 489.33s -> 490.845s (0.31%) |
|
Oh, looks like having less number of constraints by collapsing into Eq helps the perf a bit |
There was a problem hiding this comment.
I would keep assumptions as bidirectional outlives and never have Eq in there
can you make sure we always exhaustively match on ConstraintKind 🤔 I do dislike constraint kind as a concept and feel like we should just match on the actual region instead of separately storing that in the ConstraintKind
| /// - We want to uplift bidirectional constraints to the caller instead of unifying them | ||
| /// when solving nested goals, otherwise we often lose implied bounds. | ||
| /// - But we still want to know they are equal from the caller. This is crucial when we | ||
| /// are proving other nested goals which are sensitive to region equalities. |
There was a problem hiding this comment.
this comment is slightly confusing/unhelpful to me right now. It is hard to express why exactly we need this, because really, it is a hack required by the better solution not being possible
"otherwise we often lose implied bounds", what do you mean, what is often, link to a relevant example
I think the framing here isn't quite right. For me the issue is that having existential regions which aren't actually existential is not something which we can support.
Also, "know they are equal" seems slightly odd to me. Know they are equal means "unify existential regions with regions they are equal to, to resolve them to the same thing" here I think? Maybe make that more clear
I also think our conversation on zulip has been useful here, so maybe just link to that 😁
Okay, I'll keep them as they are.
Yeah, I also thought |
|
@bors p=6 |
This comment has been minimized.
This comment has been minimized.
Make region equality emits Eq constraints For context, see.. - The box named *coroutine witness Send lifetime requirements now considered by leakcheck* from [this roadmap](https://raw.githubusercontent.com/hexcatnl/roadmap/6f23e638f65249ef02af86a5454275103a71552d/next-solver.svg) - [#t-types/trait-system-refactor > A question on #251 @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/364551-t-types.2Ftrait-system-refactor/topic/A.20question.20on.20.23251/near/584166935) - Comments on `rustc_type_ir::predicate::RegionEqPredicate`
This comment has been minimized.
This comment has been minimized.
|
💔 Test for e297e30 failed: CI. Failed job:
|
|
I'm so cursed 🙃 |
69d9237 to
ace3aa3
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
@bors retry |
|
❗ You can only retry pull requests that are approved and have a previously failed auto build. |
|
@bors r=lcnr |
This comment has been minimized.
This comment has been minimized.
What is this?This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.Comparing 3142bea (parent) -> b2f1ccf (this PR) Test differencesShow 24 test diffs24 doctest diffs were found. These are ignored, as they are noisy. Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard b2f1ccf524a3a4cf9c34545167cc23b659cf1cbd --output-dir test-dashboardAnd then open Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
|
Finished benchmarking commit (b2f1ccf): comparison URL. Overall result: ✅ improvements - no action needed@rustbot label: -perf-regression Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary -6.3%, secondary 1.7%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary -7.7%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis perf run didn't have relevant results for this metric. Bootstrap: 492.552s -> 492.524s (-0.01%) |
View all comments
For context, see..
rustc_type_ir::predicate::RegionEqPredicate