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

Use LazyLock to lazily resolve backtraces #109075

Merged
merged 2 commits into from
Jul 31, 2023

Conversation

joboet
Copy link
Member

@joboet joboet commented Mar 13, 2023

By using TAIT to name the initializing closure, LazyLock can be used to replace the current LazilyResolvedCapture.

@rustbot
Copy link
Collaborator

rustbot commented Mar 13, 2023

r? @joshtriplett

(rustbot has picked a reviewer for you, use r? to override)

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

rustbot commented Mar 13, 2023

Hey! It looks like you've submitted a new PR for the library teams!

If this PR contains changes to any rust-lang/rust public library APIs then please comment with @rustbot label +T-libs-api -T-libs to tag it appropriately. If this PR contains changes to any unstable APIs please edit the PR description to add a link to the relevant API Change Proposal or create one if you haven't already. If you're unsure where your change falls no worries, just leave it as is and the reviewer will take a look and make a decision to forward on if necessary.

Examples of T-libs-api changes:

  • Stabilizing library features
  • Introducing insta-stable changes such as new implementations of existing stable traits on existing stable types
  • Introducing new or changing existing unstable library APIs (excluding permanently unstable features / features without a tracking issue)
  • Changing public documentation in ways that create new stability guarantees
  • Changing observable runtime behavior of library APIs

@joboet joboet force-pushed the lazylock_backtrace branch from 7dfec9e to e9e5af3 Compare March 13, 2023 15:32
Copy link
Member

@WaffleLapkin WaffleLapkin left a comment

Choose a reason for hiding this comment

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

LGTM, but still probably needs T-libs approval ❤️

@bors
Copy link
Contributor

bors commented Apr 25, 2023

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

@joboet joboet force-pushed the lazylock_backtrace branch from e9e5af3 to 6776af5 Compare April 27, 2023 07:33
@workingjubilee
Copy link
Member

Soon™
r? @workingjubilee

@joboet
Copy link
Member Author

joboet commented Jul 26, 2023

@rustbot author
TC pointed out that I could add a Send bound to the TAIT to allow moving the test back.

@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 Jul 26, 2023
@joboet
Copy link
Member Author

joboet commented Jul 26, 2023

@rustbot ready
It worked 🎉

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 26, 2023
@workingjubilee
Copy link
Member

Neat! Looks good to me.
@bors r+ rollup

@bors
Copy link
Contributor

bors commented Jul 31, 2023

📌 Commit 29e3f8b has been approved by workingjubilee

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 Jul 31, 2023
workingjubilee added a commit to workingjubilee/rustc that referenced this pull request Jul 31, 2023
…ngjubilee

Use `LazyLock` to lazily resolve backtraces

By using TAIT to name the initializing closure, `LazyLock` can be used to replace the current `LazilyResolvedCapture`.
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 31, 2023
…kingjubilee

Rollup of 4 pull requests

Successful merges:

 - rust-lang#95965 (Stabilize const-weak-new)
 - rust-lang#109075 (Use `LazyLock` to lazily resolve backtraces)
 - rust-lang#113741 (Don't install default projection bound for return-position `impl Trait` in trait methods with no body)
 - rust-lang#114268 (Fix empty_write since rust version attribute)

r? `@ghost`
`@rustbot` modify labels: rollup
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-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants