Skip to content

Shorten def_span of closures to just their header - #98482

Merged
bors merged 6 commits into
rust-lang:masterfrom
cjgillot:short-struct-span-closure
Jul 8, 2022
Merged

Shorten def_span of closures to just their header#98482
bors merged 6 commits into
rust-lang:masterfrom
cjgillot:short-struct-span-closure

Conversation

@cjgillot

Copy link
Copy Markdown
Contributor

Continuation of #93967.

@rust-highfive

Copy link
Copy Markdown
Contributor

Some changes occurred in src/tools/clippy.

cc @rust-lang/clippy

@rustbotrustbot added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Jun 25, 2022
@rust-highfive

Copy link
Copy Markdown
Contributor

r? @estebank

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 25, 2022
@rust-log-analyzer

This comment has been minimized.

@bors

This comment was marked as outdated.

@cjgillot
cjgillotforce-pushed the short-struct-span-closure branch from dc11e8f to 4fab055CompareJune 26, 2022 11:14
@rust-log-analyzer

This comment has been minimized.

@cjgillot
cjgillotforce-pushed the short-struct-span-closure branch from 4fab055 to 985c8a8CompareJune 26, 2022 11:34
@rust-log-analyzer

This comment has been minimized.

@bors

This comment was marked as outdated.

Comment on lines 4 to 11

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Interestingly, we should probably point at the first where clause in this error as the primary span, but that's out of scope.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Whould we also account for the where clause here when appropriate? (I think that type is the only case where you wouldn't want to due to syntactical ordering.)

Comment threadsrc/test/ui/borrowck/mutability-errors.stderr Outdated

@estebankestebank left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

r=me after rebasing and optionally addressing the regression in E0596 (or filing a follow up ticket). Make it rollup=never.

@cjgillot
cjgillotforce-pushed the short-struct-span-closure branch from 55a498f to 4dd3d6dCompareJune 27, 2022 19:02
@rust-log-analyzer

This comment has been minimized.

@bors

bors commented Jun 28, 2022

Copy link
Copy Markdown
Collaborator

☔ The latest upstream changes (presumably #98222) made this pull request unmergeable. Please resolve the merge conflicts.

@cjgillot
cjgillotforce-pushed the short-struct-span-closure branch from 4dd3d6d to 6784137CompareJune 28, 2022 19:55
@rustbot

Copy link
Copy Markdown
Collaborator

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

@cjgillot
cjgillotforce-pushed the short-struct-span-closure branch from 6784137 to 6be9f05CompareJune 28, 2022 19:59
@estebank

Copy link
Copy Markdown
Contributor

@bors r+ rollup=never

@bors

bors commented Jun 28, 2022

Copy link
Copy Markdown
Collaborator

📌 Commit 6be9f059cbb3a8ed350ba66b5392c028f875acef has been approved by estebank

@borsbors 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 Jun 28, 2022
@bors

bors commented Jun 29, 2022

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 6be9f059cbb3a8ed350ba66b5392c028f875acef with merge bd86f533a02ad2bd48343719b946f7dd70a56f28...

@bors

bors commented Jun 29, 2022

Copy link
Copy Markdown
Collaborator

💔 Test failed - checks-actions

@cjgillot
cjgillotforce-pushed the short-struct-span-closure branch from de0339e to d43fa93CompareJuly 7, 2022 07:28
@cjgillot

Copy link
Copy Markdown
ContributorAuthor

@bors r=estebank

@bors

bors commented Jul 7, 2022

Copy link
Copy Markdown
Collaborator

📌 Commit d43fa93 has been approved by estebank

It is now in the queue for this repository.

@borsbors 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 Jul 7, 2022
@bors

bors commented Jul 8, 2022

Copy link
Copy Markdown
Collaborator

⌛ Testing commit d43fa93 with merge eba361a...

@bors

bors commented Jul 8, 2022

Copy link
Copy Markdown
Collaborator

☀️ Test successful - checks-actions
Approved by: estebank
Pushing eba361a to master...

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (eba361a): comparison url.

Instruction count

  • Primary benchmarks: 😿 relevant regression found
  • Secondary benchmarks: 😿 relevant regressions found
mean1maxcount2
Regressions 😿
(primary)
0.7%0.7%1
Regressions 😿
(secondary)
1.6%2.4%9
Improvements 🎉
(primary)
N/AN/A0
Improvements 🎉
(secondary)
N/AN/A0
All 😿🎉 (primary)0.7%0.7%1

Max RSS (memory usage)

Results
  • Primary benchmarks: 😿 relevant regressions found
  • Secondary benchmarks: 🎉 relevant improvement found
mean1maxcount2
Regressions 😿
(primary)
1.3%2.4%2
Regressions 😿
(secondary)
N/AN/A0
Improvements 🎉
(primary)
N/AN/A0
Improvements 🎉
(secondary)
-1.0%-1.0%1
All 😿🎉 (primary)1.3%2.4%2

Cycles

Results
  • Primary benchmarks: 😿 relevant regression found
  • Secondary benchmarks: 😿 relevant regressions found
mean1maxcount2
Regressions 😿
(primary)
2.9%2.9%1
Regressions 😿
(secondary)
3.2%3.7%5
Improvements 🎉
(primary)
N/AN/A0
Improvements 🎉
(secondary)
N/AN/A0
All 😿🎉 (primary)2.9%2.9%1

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

Next Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please open an issue or create a new PR that fixes the regressions, add a comment linking to the newly created issue or PR, and then add the perf-regression-triaged label to this PR.

@rustbot label: +perf-regression

Footnotes

  1. the arithmetic mean of the percent change23

  2. number of relevant changes23

@rustbotrustbot added the perf-regression Performance regression. label Jul 8, 2022
@cjgillot

Copy link
Copy Markdown
ContributorAuthor

The regression is mostly in tt-muncher case. From the detailed view, it would be in expand_crate. I don't see how a change in error-reporting span can cause such a performance change.

@cjgillot
cjgillot deleted the short-struct-span-closure branch July 11, 2022 09:36
@Mark-SimulacrumMark-Simulacrum removed the perf-regression Performance regression. label Jul 12, 2022
@Mark-Simulacrum

Copy link
Copy Markdown
Member

tt-muncher has been noisy lately, so dropping the regression label; this delta is within that noise bound.

flip1995 pushed a commit to flip1995/rust that referenced this pull request Jul 18, 2022
…=estebank
Shorten def_span of closures to just their header
Continuation of rust-lang#93967.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-by-borsThis PR was explicitly merged by bors.S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants

@cjgillot@rust-highfive@rust-log-analyzer@bors@rustbot@estebank@rust-timer@Mark-Simulacrum@flip1995