Skip to content

Nuke Unique (and ptr_internals) - #164146

Open
maxdexh wants to merge 1 commit into
rust-lang:mainfrom
maxdexh:nuke-unique
Open

maxdexh wants to merge 1 commit into
rust-lang:mainfrom
maxdexh:nuke-unique

Conversation

@maxdexh

@maxdexh maxdexh commented Oct 11, 2026

Copy link
Copy Markdown
Member

No description provided.

@rustbot rustbot added A-tidy Area: The tidy tool S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rust-analyzer Relevant to the rust-analyzer team, which will review and decide on the PR/issue. labels Oct 11, 2026
@maxdexh

maxdexh commented Oct 11, 2026

Copy link
Copy Markdown
Member Author

Let's see which debuggers break this time
@bors try jobs=test-aarch64-apple-1,test-x86_64-msvc-1

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Oct 11, 2026
Nuke Unique


try-job: test-aarch64-apple-1
try-job: test-x86_64-msvc-1
@maxdexh maxdexh changed the title Nuke Unique Nuke Unique (and ptr_internals) Oct 11, 2026
@maxdexh maxdexh removed the T-rust-analyzer Relevant to the rust-analyzer team, which will review and decide on the PR/issue. label Oct 11, 2026
@maxdexh

maxdexh commented Oct 11, 2026 •

Copy link
Copy Markdown
Member Author

rust-analyzer has a lint for ptr_internals at src/tools/rust-analyzer/crates/ide-db/src/generated/lints.rs.
I initially edited this file by hand, before noticing it was generated.

The command at the top to regenerate the file doesn't work, I filed an issue at rust-lang/rust-analyzer#23501. If CI works without changing the file, then I'm in favor of just ignoring it, since idk if the lint would actually get auto-removed from us deleting the relevant parts of std, or if it's generated independently.

@rust-bors

rust-bors Bot commented Oct 11, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: c8fe77b (c8fe77b7437b924c8e505c82cf5b0249df15de02)
Base parent: 7211ea5 (7211ea594cbf137ef6118b1752b959dea7cb9088)

@maxdexh

maxdexh commented Oct 11, 2026

Copy link
Copy Markdown
Member Author

r? hanna-kruppe

@maxdexh
maxdexh marked this pull request as ready for review October 11, 2026 13:22
@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 Oct 11, 2026

@hanna-kruppe hanna-kruppe 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.

Good riddance!

I almost want to wait a little longer because I'm fully expecting someone to show up with a regression that forces us to revert the previous PRs that made this possible. But I guess if we have to revert those, reverting this as well will be trivial. So let's go ahead and flush out the remaining uses of Unique in the ecosystem :)

@bors r+ rollup

View changes since this review

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.

This looks like a genuine regression test that just happened to use Unique and which we might want to keep. But it turns out the issue = "0" thing has been removed long ago (see #41260 and the PRs referencing it), so we don’t need this test any more.

@rust-bors

rust-bors Bot commented Oct 11, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 32fd83f has been approved by hanna-kruppe

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 Oct 11, 2026
@hanna-kruppe

Copy link
Copy Markdown
Contributor

@bors rollup

@hanna-kruppe

hanna-kruppe commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

btw there are some lingering references in debug visualizers:

The latter two might be are useful to keep around for a while since you can use a newer rust-{gdb,lldb} with a binary compiled with an older toolchain. But the first one we might as well remove now. Do you want to do this in this PR real quick?

@maxdexh

maxdexh commented Oct 11, 2026

Copy link
Copy Markdown
Member Author

Hmm, right, I only searched for ptr::Unique. I'd rather do one PR with all debuggers 😅 (totally not just plan continuation bias)

@mejrs

mejrs commented Oct 11, 2026

Copy link
Copy Markdown
Member

Does the removed feature need to be documented? We did make the unstable_removed attribute (for concat_idents) for that reason.

it's a very internal feature, I'm not sure whether it matters...

@maxdexh

maxdexh commented Oct 11, 2026

Copy link
Copy Markdown
Member Author

Do we document every ad-hoc internal feature that is later removed? Ofc, Unique is a little special due to how long it's been around, but I still think we shouldn't document this.

This branch has not been deployed

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

Labels

A-tidy Area: The tidy tool S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. 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.

4 participants