Skip to content

Use LazyLock to lazily resolve backtraces#109075

Merged
bors merged 2 commits into
rust-lang:masterfrom
joboet:lazylock_backtrace
Jul 31, 2023
Merged

Use LazyLock to lazily resolve backtraces#109075
bors merged 2 commits into
rust-lang:masterfrom
joboet:lazylock_backtrace

Conversation

@joboet

@joboet joboet commented Mar 13, 2023

Copy link
Copy Markdown
Member

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

@rustbot

rustbot commented Mar 13, 2023

Copy link
Copy Markdown
Collaborator

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

rustbot commented Mar 13, 2023

Copy link
Copy Markdown
Collaborator

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

Comment thread library/std/src/sync/lazy_lock.rs Outdated
@joboet joboet force-pushed the lazylock_backtrace branch from 7dfec9e to e9e5af3 Compare March 13, 2023 15:32

@WaffleLapkin WaffleLapkin left a comment

Copy link
Copy Markdown
Member

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

bors commented Apr 25, 2023

Copy link
Copy Markdown
Collaborator

☔ 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
Copy Markdown
Member

Soon™
r? @workingjubilee

@joboet

joboet commented Jul 26, 2023

Copy link
Copy Markdown
Member Author

@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

joboet commented Jul 26, 2023

Copy link
Copy Markdown
Member Author

@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
Copy Markdown
Member

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

@bors

bors commented Jul 31, 2023

Copy link
Copy Markdown
Collaborator

📌 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