Skip to content

Conversation

cjgillot
Copy link
Contributor

@cjgillot cjgillot commented May 8, 2022

This PR rewrites single_use_lifetime and unused_lifetime lints to be based on the AST.
We have more information at our disposal, so we can reduce the amount of false positives.

Remaining false positive: single-use lifetimes in argument-position impl-trait.
I'm waiting for #96529 to be fixed to have a clean and proper solution here.

Closes #54079
Closes #55057
Closes #55058
Closes #60554
Closes #69952

r? @petrochenkov

@cjgillot cjgillot added the S-blocked Status: Blocked on something else such as an RFC or other implementation work. label May 8, 2022
@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label May 8, 2022
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 8, 2022
@petrochenkov petrochenkov removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 8, 2022
@cjgillot cjgillot force-pushed the ast-lifetimes-single branch from c4ce5f5 to 64c8663 Compare May 10, 2022 19:30
@cjgillot cjgillot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-blocked Status: Blocked on something else such as an RFC or other implementation work. labels May 10, 2022
@rust-log-analyzer

This comment has been minimized.

@bors

This comment was marked as resolved.

@cjgillot cjgillot force-pushed the ast-lifetimes-single branch from b4cbf5e to f629d7d Compare May 15, 2022 15:41
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@cjgillot cjgillot force-pushed the ast-lifetimes-single branch from 4799029 to 69b9166 Compare May 15, 2022 18:16
@petrochenkov petrochenkov added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels May 19, 2022
@petrochenkov
Copy link
Contributor

r=me after squashing review commits into main commits.
@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 May 19, 2022
@cjgillot cjgillot force-pushed the ast-lifetimes-single branch from a7e8836 to 563916d Compare May 20, 2022 11:39
@cjgillot
Copy link
Contributor Author

@bors r=petrochenkov

@bors
Copy link
Collaborator

bors commented May 20, 2022

📌 Commit 563916d 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 May 20, 2022
@bors
Copy link
Collaborator

bors commented May 20, 2022

⌛ Testing commit 563916d with merge b5caa5a...

@bors
Copy link
Collaborator

bors commented May 20, 2022

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

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (b5caa5a): comparison url.

Instruction count

  • Primary benchmarks: no relevant changes found
  • Secondary benchmarks: 🎉 relevant improvement found
Regressions 😿
(primary)
Regressions 😿
(secondary)
Improvements 🎉
(primary)
Improvements 🎉
(secondary)
All 😿 🎉
(primary)
count1 0 0 0 1 0
mean2 N/A N/A N/A -0.6% N/A
max N/A N/A N/A -0.6% N/A

Max RSS (memory usage)

Results
  • Primary benchmarks: mixed results
  • Secondary benchmarks: 😿 relevant regression found
Regressions 😿
(primary)
Regressions 😿
(secondary)
Improvements 🎉
(primary)
Improvements 🎉
(secondary)
All 😿 🎉
(primary)
count1 1 1 2 0 3
mean2 2.4% 3.6% -2.4% N/A -0.8%
max 2.4% 3.6% -2.5% N/A -2.5%

Cycles

Results
  • Primary benchmarks: mixed results
  • Secondary benchmarks: mixed results
Regressions 😿
(primary)
Regressions 😿
(secondary)
Improvements 🎉
(primary)
Improvements 🎉
(secondary)
All 😿 🎉
(primary)
count1 1 2 2 2 3
mean2 3.4% 1.8% -2.2% -1.9% -0.3%
max 3.4% 2.3% -2.6% -2.7% 3.4%

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

@rustbot label: -perf-regression

Footnotes

  1. number of relevant changes 2 3

  2. the arithmetic mean of the percent change 2 3

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
7 participants