Skip to content

Comments

Implement debuginfo for unsafe binder types#153017

Merged
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
makai410:di-unsafe-binder
Feb 25, 2026
Merged

Implement debuginfo for unsafe binder types#153017
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
makai410:di-unsafe-binder

Conversation

@makai410
Copy link
Member

@makai410 makai410 commented Feb 23, 2026

Fixes: #139462

This treats an unsafe binder like a struct with a single field. This way we'd have the binder's distinct type name while keeping the wrapped value accessible.

Tracking:

@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Feb 23, 2026
@rustbot
Copy link
Collaborator

rustbot commented Feb 23, 2026

r? @fee1-dead

rustbot has assigned @fee1-dead.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler, debuginfo
  • compiler, debuginfo expanded to 68 candidates
  • Random selection from 13 candidates

if cpp_like_debuginfo {
output.push_str("unsafe$<");
} else {
output.push_str("unsafe ");
Copy link
Member Author

Choose a reason for hiding this comment

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

Not sure what the type name should be here...

Copy link
Member

Choose a reason for hiding this comment

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

I think this is fine! 👍

@rust-log-analyzer

This comment has been minimized.

if cpp_like_debuginfo {
output.push_str("unsafe$<");
} else {
output.push_str("unsafe ");
Copy link
Member

Choose a reason for hiding this comment

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

I think this is fine! 👍

@wesleywiser
Copy link
Member

@bors r+

@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 24, 2026

📌 Commit b608343 has been approved by wesleywiser

It is now in the queue for this repository.

@rust-bors rust-bors bot 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 Feb 24, 2026
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Feb 24, 2026
…ywiser

Implement debuginfo for unsafe binder types

Fixes: rust-lang#139462

This treats an unsafe binder like a struct with a single field. This way we'd have the binder's distinct type name while keeping the wrapped value accessible.

Tracking:
- rust-lang#130516
rust-bors bot pushed a commit that referenced this pull request Feb 25, 2026
Rollup of 8 pull requests

Successful merges:

 - #149169 (ptr::replace: make calls on ZST null ptr not UB)
 - #150562 (Fix doc link used in suggestion for pinning self)
 - #152679 (rustc_expand: improve diagnostics for non-repeatable metavars)
 - #153017 (Implement debuginfo for unsafe binder types)
 - #152868 (delete some very old trivial `Box` tests)
 - #152922 (rustc_public: Make fields that shouldn't be exposed visible only in `rustc_public`)
 - #153029 (Rename `rustc::pass_by_value` lint as `rustc::disallowed_pass_by_ref`.)
 - #153051 (Migration of `LintDiagnostic` - part 3)
rust-bors bot pushed a commit that referenced this pull request Feb 25, 2026
Rollup of 12 pull requests

Successful merges:

 - #149169 (ptr::replace: make calls on ZST null ptr not UB)
 - #150562 (Fix doc link used in suggestion for pinning self)
 - #152418 (`BTreeMap::merge` optimized)
 - #152679 (rustc_expand: improve diagnostics for non-repeatable metavars)
 - #152952 (mGCA: improve ogca diagnostic message )
 - #152977 (Fix relative path handling for --extern-html-root-url)
 - #153017 (Implement debuginfo for unsafe binder types)
 - #152868 (delete some very old trivial `Box` tests)
 - #152922 (rustc_public: Make fields that shouldn't be exposed visible only in `rustc_public`)
 - #153032 (Fix attribute parser and kind names.)
 - #153051 (Migration of `LintDiagnostic` - part 3)
 - #153060 (Give a better error when updating a submodule fails)
@rust-bors rust-bors bot merged commit 989efb8 into rust-lang:main Feb 25, 2026
11 checks passed
@rustbot rustbot added this to the 1.95.0 milestone Feb 25, 2026
rust-timer added a commit that referenced this pull request Feb 25, 2026
Rollup merge of #153017 - makai410:di-unsafe-binder, r=wesleywiser

Implement debuginfo for unsafe binder types

Fixes: #139462

This treats an unsafe binder like a struct with a single field. This way we'd have the binder's distinct type name while keeping the wrapped value accessible.

Tracking:
- #130516
@Kobzol
Copy link
Member

Kobzol commented Feb 25, 2026

@rust-timer build 6051e59

For #153074.

@rust-timer
Copy link
Collaborator

Missing artifact for sha 6051e59917ee3125229d58ff922c85be4e1b2e7d (https://ci-artifacts.rust-lang.org/rustc-builds/6051e59917ee3125229d58ff922c85be4e1b2e7d/rustc-nightly-x86_64-unknown-linux-gnu.tar.xz); not built yet, try again later.

@JonathanBrouwer
Copy link
Contributor

@rust-timer build 6051e59

@rust-timer
Copy link
Collaborator

Queued 6051e59 with parent 11ad63a, future comparison URL.
There are currently 7 preceding artifacts in the queue.
It will probably take at least ~7.6 hours until the benchmark run finishes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. 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.

Unsafe binders unsupported in debug info

8 participants