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

Create elided lifetime parameters for function-like types #98279

Merged
merged 11 commits into from
Jun 22, 2022

Conversation

cjgillot
Copy link
Contributor

Split from #97720

This PR refactor lifetime generic parameters in bare function types and parenthesized traits to introduce the additional required lifetimes as fresh parameters in a for<> bound.

This PR does the same to lifetimes appearing in closure signatures, and as-if introducing for<> bounds on closures (without the associated change in semantics).

r? @petrochenkov

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Jun 20, 2022
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 20, 2022
@cjgillot cjgillot marked this pull request as ready for review June 20, 2022 05:26
@rust-log-analyzer

This comment has been minimized.

src/test/ui/generator/resume-arg-late-bound.base.stderr Outdated Show resolved Hide resolved
compiler/rustc_resolve/src/late.rs Outdated Show resolved Hide resolved
compiler/rustc_resolve/src/late.rs Outdated Show resolved Hide resolved
@petrochenkov petrochenkov 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-review Status: Awaiting review from the assignee but also interested parties. labels Jun 20, 2022
@cjgillot
Copy link
Contributor Author

@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 Jun 20, 2022
@bors
Copy link
Contributor

bors commented Jun 20, 2022

⌛ Trying commit e49333e590f21257975b6d81fc1de82a4aed9629 with merge 01800f2df4359b120dfa9201183417f1c55064b4...

@bors

This comment was marked as resolved.

@rust-log-analyzer

This comment has been minimized.

@cjgillot
Copy link
Contributor Author

@bors try @rust-timer queue

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion.

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

@bors
Copy link
Contributor

bors commented Jun 20, 2022

⌛ Trying commit e69d32ea3d242b67ff06a5253b9d59e7f70587c0 with merge 0a2ea8992940f2dabe3c3624452caf797c7aa11c...

@bors
Copy link
Contributor

bors commented Jun 20, 2022

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

@rust-timer
Copy link
Collaborator

Queued 0a2ea8992940f2dabe3c3624452caf797c7aa11c with parent b12708f, future comparison URL.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (0a2ea8992940f2dabe3c3624452caf797c7aa11c): comparison url.

Instruction count

  • Primary benchmarks: no relevant changes found
  • Secondary benchmarks: 😿 relevant regression found
mean1 max count2
Regressions 😿
(primary)
N/A N/A 0
Regressions 😿
(secondary)
0.9% 0.9% 1
Improvements 🎉
(primary)
N/A N/A 0
Improvements 🎉
(secondary)
N/A N/A 0
All 😿🎉 (primary) N/A N/A 0

Max RSS (memory usage)

Results
  • Primary benchmarks: 😿 relevant regressions found
  • Secondary benchmarks: mixed results
mean1 max count2
Regressions 😿
(primary)
1.6% 2.4% 2
Regressions 😿
(secondary)
2.7% 4.4% 8
Improvements 🎉
(primary)
N/A N/A 0
Improvements 🎉
(secondary)
-2.2% -3.3% 3
All 😿🎉 (primary) 1.6% 2.4% 2

Cycles

Results
  • Primary benchmarks: no relevant changes found
  • Secondary benchmarks: 😿 relevant regression found
mean1 max count2
Regressions 😿
(primary)
N/A N/A 0
Regressions 😿
(secondary)
2.7% 2.7% 1
Improvements 🎉
(primary)
N/A N/A 0
Improvements 🎉
(secondary)
N/A N/A 0
All 😿🎉 (primary) N/A N/A 0

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

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

Footnotes

  1. the arithmetic mean of the percent change 2 3

  2. number of relevant changes 2 3

@petrochenkov
Copy link
Contributor

r=me with #98279 (comment) addressed and history cleaned up.
@rustbot author

@rustbot rustbot 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-review Status: Awaiting review from the assignee but also interested parties. labels Jun 21, 2022
@cjgillot
Copy link
Contributor Author

Perf: there is a small (<1%) on a single secondary benchmark, with no discernible trend among non-relevant benchmarks. I considering this is noise-related.

@bors r=petrochenkov

@bors
Copy link
Contributor

bors commented Jun 21, 2022

📌 Commit 576661c has been approved by petrochenkov

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jun 21, 2022
@bors
Copy link
Contributor

bors commented Jun 22, 2022

⌛ Testing commit 576661c with merge 10f4ce3...

@bors
Copy link
Contributor

bors commented Jun 22, 2022

☀️ Test successful - checks-actions
Approved by: petrochenkov
Pushing 10f4ce3 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jun 22, 2022
@bors bors merged commit 10f4ce3 into rust-lang:master Jun 22, 2022
@rustbot rustbot added this to the 1.63.0 milestone Jun 22, 2022
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (10f4ce3): comparison url.

Instruction count

  • Primary benchmarks: no relevant changes found
  • Secondary benchmarks: mixed results
mean1 max count2
Regressions 😿
(primary)
N/A N/A 0
Regressions 😿
(secondary)
0.4% 0.8% 4
Improvements 🎉
(primary)
N/A N/A 0
Improvements 🎉
(secondary)
-0.3% -0.3% 1
All 😿🎉 (primary) N/A N/A 0

Max RSS (memory usage)

Results
  • Primary benchmarks: 😿 relevant regressions found
  • Secondary benchmarks: 😿 relevant regressions found
mean1 max count2
Regressions 😿
(primary)
2.2% 2.5% 2
Regressions 😿
(secondary)
2.9% 5.2% 9
Improvements 🎉
(primary)
N/A N/A 0
Improvements 🎉
(secondary)
-3.3% -3.3% 1
All 😿🎉 (primary) 2.2% 2.5% 2

Cycles

Results
  • Primary benchmarks: no relevant changes found
  • Secondary benchmarks: 😿 relevant regression found
mean1 max count2
Regressions 😿
(primary)
N/A N/A 0
Regressions 😿
(secondary)
2.1% 2.1% 1
Improvements 🎉
(primary)
N/A N/A 0
Improvements 🎉
(secondary)
N/A N/A 0
All 😿🎉 (primary) N/A N/A 0

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

@rustbot label: -perf-regression

Footnotes

  1. the arithmetic mean of the percent change 2 3

  2. number of relevant changes 2 3

@cjgillot cjgillot deleted the all-fresh-nofn branch June 22, 2022 16:10
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Oct 15, 2022
resolve: Some cleanup, asserts and tests for lifetime ribs

Follow up to rust-lang#98279 and friends.
r? `@cjgillot`
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Oct 15, 2022
resolve: Some cleanup, asserts and tests for lifetime ribs

Follow up to rust-lang#98279 and friends.
r? ``@cjgillot``
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. 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.

7 participants