Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not register placeholder RegionOutlives obligations when considering_regions is false #102945

Merged
merged 1 commit into from
Oct 17, 2022

Conversation

compiler-errors
Copy link
Member

@compiler-errors compiler-errors commented Oct 12, 2022

NOTE: I'm kinda just putting this up for discussion. I'm not certain this is correct...?

This was introduced in 608625d.

Interestingly, we only check data.has_placeholders() for RegionOutlives, and not for TypeOutlives... why? For the record, that different treatment between RegionOutlives and TypeOutlives is why the fix "The compiling succeeds when all 'a : 'b are replaced with &'a () : 'b" in #100689 "works", but it seems like an implementation detail considering this.

Also, why do we care about placeholder regions being registered if considering_regions is false? It doesn't seem to affect any UI tests, for example.

r? @lcnr

Fixes #102899
Fixes #100689

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Oct 12, 2022
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 12, 2022
@compiler-errors compiler-errors added T-types Relevant to the types team, which will review and decide on the PR/issue. and removed T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Oct 12, 2022
@matthiaskrgr
Copy link
Member

Should we eventually beta-nominate the fix as well? The ice-code doesn't use any nightly only features as far as I seen and I was able to reproduce #102899 on beta too.

@lcnr
Copy link
Contributor

lcnr commented Oct 17, 2022

i think i added the special-case for placeholders because of the leak-check for which we have to care about placeholders, even when not doing regionck. Even when rewriting rustc to replace the leak-check, we will still have to care about placeholders.

However, fulfill currently doesn't rely on the leak-check right now, because it's never used in any place where the leak-check is used.

And even if we did use it, currently evaluate uses the leak check but it doesn't add region constraints for Outlives obligations, only when directly relating regions ✨ so anyways. So even if we were to use fulfill in some leak-checked snapshot, this would still differ from the behavior of evaluate.

So yeah, the current setup sucks but your PR doesn't make stuff worse. cc @nikomatsakis for the above comment.

r=me
@bors try @rust-timer queue

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion.

@rustbot label: +S-waiting-on-perf

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Oct 17, 2022
@bors
Copy link
Contributor

bors commented Oct 17, 2022

⌛ Trying commit 3021598 with merge 25fac99eb1c69846b65127999dd084d21bcfd8f8...

@bors
Copy link
Contributor

bors commented Oct 17, 2022

☀️ Try build successful - checks-actions
Build commit: 25fac99eb1c69846b65127999dd084d21bcfd8f8 (25fac99eb1c69846b65127999dd084d21bcfd8f8)

@rust-timer
Copy link
Collaborator

Queued 25fac99eb1c69846b65127999dd084d21bcfd8f8 with parent 1536ab1, future comparison URL.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (25fac99eb1c69846b65127999dd084d21bcfd8f8): comparison URL.

Overall result: no relevant changes - no action needed

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf.

@bors rollup=never
@rustbot label: +S-waiting-on-review -S-waiting-on-perf -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean1 range count2
Regressions ❌
(primary)
3.7% [3.7%, 3.7%] 1
Regressions ❌
(secondary)
2.9% [2.3%, 3.4%] 14
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 3.7% [3.7%, 3.7%] 1

Cycles

This benchmark run did not return any relevant results for this metric.

Footnotes

  1. the arithmetic mean of the percent change

  2. number of relevant changes

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Oct 17, 2022
@lcnr
Copy link
Contributor

lcnr commented Oct 17, 2022

@bors r+ rollup=always

@bors
Copy link
Contributor

bors commented Oct 17, 2022

📌 Commit 3021598 has been approved by lcnr

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 17, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 17, 2022
…iaskrgr

Rollup of 4 pull requests

Successful merges:

 - rust-lang#102454 (Suggest parentheses for possible range method calling)
 - rust-lang#102466 (only allow `ConstEquate` with `feature(gce)`)
 - rust-lang#102945 (Do not register placeholder `RegionOutlives` obligations when `considering_regions` is false)
 - rust-lang#103091 (rustdoc: remove unused HTML class `sidebar-title`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit d02a221 into rust-lang:master Oct 17, 2022
@rustbot rustbot added this to the 1.66.0 milestone Oct 17, 2022
@compiler-errors compiler-errors deleted the placeholder-region-outlives branch November 2, 2022 02:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-types Relevant to the types team, which will review and decide on the PR/issue.
Projects
None yet
7 participants