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

remove obsolete givens from regionck #109629

Merged
merged 5 commits into from
Mar 28, 2023
Merged

Conversation

aliemjay
Copy link
Member

@aliemjay aliemjay commented Mar 26, 2023

Revives #107376. The only change is the last commit (2a3177a) which should fix the regression.

Fixes #106567

r? @lcnr

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Mar 26, 2023
@compiler-errors
Copy link
Member

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

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

bors commented Mar 26, 2023

⌛ Trying commit 2a3177a with merge dfa82e8833199efd2cc0114fed03eab53614a221...

@bors
Copy link
Contributor

bors commented Mar 26, 2023

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

1 similar comment
@bors
Copy link
Contributor

bors commented Mar 26, 2023

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

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (dfa82e8833199efd2cc0114fed03eab53614a221): 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-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.

mean range count
Regressions ❌
(primary)
1.1% [1.1%, 1.1%] 1
Regressions ❌
(secondary)
4.0% [4.0%, 4.0%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.8% [-2.8%, -0.9%] 2
All ❌✅ (primary) 1.1% [1.1%, 1.1%] 1

Cycles

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

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

lcnr commented Mar 27, 2023

hmm, I would prefer to go ahead with landing #109482 instead 🤔

edit: or well, nevermind, i guess it's fine to drop implied bounds for region vars

@lcnr
Copy link
Contributor

lcnr commented Mar 27, 2023

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Mar 27, 2023

📌 Commit 2a3177a 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 Mar 27, 2023
@lqd
Copy link
Member

lqd commented Mar 27, 2023

How about we do a crater run this time, in case they are regressions like last time ?

@lcnr
Copy link
Contributor

lcnr commented Mar 27, 2023

good catch, yeah 😅 should do

@bors r-

@craterbot check

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 27, 2023
@craterbot
Copy link
Collaborator

👌 Experiment pr-109629 created and queued.
🤖 Automatically detected try build dfa82e8833199efd2cc0114fed03eab53614a221
🔍 You can check out the queue and this experiment's details.

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot craterbot added S-waiting-on-crater Status: Waiting on a crater run to be completed. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Mar 27, 2023
@craterbot
Copy link
Collaborator

🚧 Experiment pr-109629 is now running

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot
Copy link
Collaborator

🎉 Experiment pr-109629 is completed!
📊 1 regressed and 2 fixed (259698 total)
📰 Open the full report.

⚠️ If you notice any spurious failure please add them to the blacklist!
ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot craterbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-crater Status: Waiting on a crater run to be completed. labels Mar 28, 2023
@aliemjay
Copy link
Member Author

🎉 this is the least noisy crater report I've ever seen.
I think that's enough testament to how good this PR is 😄.

@lqd
Copy link
Member

lqd commented Mar 28, 2023

It's been a long time since I've seen so little noise as well 😅.

The single xpq "regression" looks like a spurious linking error, and doesn't reproduce locally anyway.

@bors r=lcnr rollup

@bors
Copy link
Contributor

bors commented Mar 28, 2023

📌 Commit 2a3177a 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 Mar 28, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 28, 2023
Rollup of 8 pull requests

Successful merges:

 - rust-lang#91793 (socket ancillary data implementation for FreeBSD (from 13 and above).)
 - rust-lang#92284 (Change advance(_back)_by to return the remainder instead of the number of processed elements)
 - rust-lang#102472 (stop special-casing `'static` in evaluation)
 - rust-lang#108480 (Use Rayon's TLV directly)
 - rust-lang#109321 (Erase impl regions when checking for impossible to eagerly monomorphize items)
 - rust-lang#109470 (Correctly substitute GAT's type used in `normalize_param_env` in `check_type_bounds`)
 - rust-lang#109562 (Update ar_archive_writer to 0.1.3)
 - rust-lang#109629 (remove obsolete `givens` from regionck)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 60ce19d into rust-lang:master Mar 28, 2023
@rustbot rustbot added this to the 1.70.0 milestone Mar 28, 2023
@aliemjay aliemjay deleted the remove-givens branch April 6, 2023 16:23
@@ -52,6 +53,10 @@ impl<'a, 'tcx: 'a> InferCtxtExt<'a, 'tcx> for InferCtxt<'tcx> {
body_id: LocalDefId,
ty: Ty<'tcx>,
) -> Vec<OutlivesBound<'tcx>> {
let ty = self.resolve_vars_if_possible(ty);
let ty = OpportunisticRegionResolver::new(self).fold_ty(ty);
Copy link
Member

@compiler-errors compiler-errors Sep 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to resolve region vars here? cc #112832

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to avoid any assumptions using inference vars. E.g. if you have 'a = '2 and then get an implied bound '2: 'b, then getting 'a: 'b from that requires us to know that 'a = '2 is something we can assume and not something we have to prove.

All region vars which are part of the tpye before calling implied_outlives_bounds are from candidates used while normalizing the ty, so we can assume that equality holds there.

We need to make sure that we don't use a region bound we have to prove to strengthen an assumption. Had an example for that at some point, would have to look for it though.

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-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

loss of implied bounds after normalization
8 participants