Skip to content

Remove #[rustc_reservation_impl] - #160871

Merged
rust-bors[bot] merged 5 commits into
rust-lang:mainfrom
WaffleLapkin:remove_rustc_reservation_impl
Aug 25, 2026
Merged

Remove #[rustc_reservation_impl]#160871
rust-bors[bot] merged 5 commits into
rust-lang:mainfrom
WaffleLapkin:remove_rustc_reservation_impl

Conversation

@WaffleLapkin

@WaffleLapkin WaffleLapkin commented Aug 10, 2026

Copy link
Copy Markdown
Member

Based on #160705.

There was only ever one reservation impl and it got (/is being) removed in #160705. I don't think there is a reason to keep the machinery, given how specific and tricky the semantics of it are (see #64631).

Closes #64631.

cc @clarfonthey since you seem to have found another use for the attribute (#64631 (comment)) (I haven't looked into it, so not sure if it might be worth keeping the attribute for that use case).

r? types

@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-rustdoc-json Area: Rustdoc JSON backend S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Aug 10, 2026
@rust-log-analyzer

This comment has been minimized.

@WaffleLapkin
WaffleLapkin force-pushed the remove_rustc_reservation_impl branch from dc47214 to 5bb1e02 Compare August 10, 2026 18:59
@clarfonthey

clarfonthey commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

The use case I described for rustc_reservation_impl seems relatively different from the semantics being applied for the never reservation. I don't think they'd share too much in common since the intent would be to allow reserving impls in, e.g. core to later be implemented in std as a way of making incoherent impls for traits that don't completely bork the solver.

I think it's fine to remove this specific hack and later replace it with something else if it happens to use the same name.

@rust-bors

This comment has been minimized.

@oli-obk oli-obk 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.

r=me once the From<!> PR lands

View changes since this review

@rust-bors

This comment has been minimized.

@WaffleLapkin
WaffleLapkin force-pushed the remove_rustc_reservation_impl branch from 15f38ce to 7c1e726 Compare August 25, 2026 12:31
@WaffleLapkin
WaffleLapkin marked this pull request as ready for review August 25, 2026 12:43
@rustbot

rustbot commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

This PR changes rustc_public

cc @oli-obk, @celinval, @ouz-a, @makai410

Some changes occurred in compiler/rustc_attr_parsing

cc @jdonszelmann, @JonathanBrouwer

Some changes occurred in compiler/rustc_passes/src/check_attr.rs

cc @jdonszelmann, @JonathanBrouwer

Some changes occurred in compiler/rustc_attr_ir

cc @jdonszelmann, @JonathanBrouwer

@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 Aug 25, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Member

I also took a look at this before realizing Oli already had, oops
@bors r=oli-okb,JonathanBrouwer rollup

@rust-bors

rust-bors Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 7c1e726 has been approved by oli-okb,JonathanBrouwer

It is now in the queue for this repository.

⚠️ The following reviewer(s) could not be found: oli-okb

@rust-bors rust-bors Bot added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Aug 25, 2026
@rust-bors rust-bors Bot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 25, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Member

@bors r=oli-obk,JonathanBrouwer

@rust-bors

rust-bors Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 7c1e726 has been approved by oli-obk,JonathanBrouwer

It is now in the queue for this repository.

rust-bors Bot pushed a commit that referenced this pull request Aug 25, 2026
…uwer

Rollup of 13 pull requests

Successful merges:

 - #158874 (hir_ty_lowering: fix anon const type recovery)
 - #161443 (add internal DSL for testing binders)
 - #161617 (Add custom allocators to `(try_)map` on `Box`, `Rc`, `Arc`)
 - #161726 (Fix debugger visualizer tuple child ordering w/ PDB debug info)
 - #161729 (miri subtree update)
 - #161745 (make trivial ABI check resilient against new repr)
 - #160871 (Remove `#[rustc_reservation_impl]`)
 - #161180 (Detect missing binding available: add a MaybeIncorrect suggestion)
 - #161522 (test `f16::mul_add` not double-rounding the result)
 - #161631 (Add two comments relating to new-solver performance)
 - #161724 (Add codegen test for static table search loop unrolling)
 - #161740 (do not compress debuginfo for Cygwin)
 - #161750 (vector ABI check: reword so it makes more sense for non-obviously-vector types)
@rust-bors
rust-bors Bot merged commit 844b744 into rust-lang:main Aug 25, 2026
13 checks passed
@rustbot rustbot added this to the 1.100.0 milestone Aug 25, 2026
rust-bors Bot pushed a commit that referenced this pull request Aug 25, 2026
Rollup merge of #160871 - WaffleLapkin:remove_rustc_reservation_impl, r=oli-obk,JonathanBrouwer

Remove `#[rustc_reservation_impl]`

Based on #160705.

There was only ever one reservation impl and it got (/is being) removed in #160705. I don't think there is a reason to keep the machinery, given how specific and tricky the semantics of it are (see #64631).

Closes #64631.

cc @clarfonthey since you seem to have found another use for the attribute (#64631 (comment)) (I haven't looked into it, so not sure if it might be worth keeping the attribute for that use case).

r? types
pull Bot pushed a commit to LeeeeeeM/miri that referenced this pull request Aug 26, 2026
…uwer

Rollup of 13 pull requests

Successful merges:

 - rust-lang/rust#158874 (hir_ty_lowering: fix anon const type recovery)
 - rust-lang/rust#161443 (add internal DSL for testing binders)
 - rust-lang/rust#161617 (Add custom allocators to `(try_)map` on `Box`, `Rc`, `Arc`)
 - rust-lang/rust#161726 (Fix debugger visualizer tuple child ordering w/ PDB debug info)
 - rust-lang/rust#161729 (miri subtree update)
 - rust-lang/rust#161745 (make trivial ABI check resilient against new repr)
 - rust-lang/rust#160871 (Remove `#[rustc_reservation_impl]`)
 - rust-lang/rust#161180 (Detect missing binding available: add a MaybeIncorrect suggestion)
 - rust-lang/rust#161522 (test `f16::mul_add` not double-rounding the result)
 - rust-lang/rust#161631 (Add two comments relating to new-solver performance)
 - rust-lang/rust#161724 (Add codegen test for static table search loop unrolling)
 - rust-lang/rust#161740 (do not compress debuginfo for Cygwin)
 - rust-lang/rust#161750 (vector ABI check: reword so it makes more sense for non-obviously-vector types)
@WaffleLapkin
WaffleLapkin deleted the remove_rustc_reservation_impl branch August 26, 2026 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) A-rustdoc-json Area: Rustdoc JSON backend 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. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tracking issue for rustc_reservation_impl attribute

6 participants