Skip to content

Guard types with unstable Allocator params ahead of partial stabilization - #162960

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
maxdexh:allocator-nightly-bound
Sep 19, 2026
Merged

rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
maxdexh:allocator-nightly-bound

Conversation

@maxdexh

@maxdexh maxdexh commented Sep 18, 2026

Copy link
Copy Markdown
Member

View all comments

Guard APIs that allow the construction of #[unstable] A: Allocator param types with A != Global, that will not be stabilized by #156882

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Sep 18, 2026
@rust-log-analyzer

This comment has been minimized.

@maxdexh
maxdexh force-pushed the allocator-nightly-bound branch from 3f4b49f to c086565 Compare September 18, 2026 12:28
@rust-log-analyzer

This comment has been minimized.

@maxdexh
maxdexh force-pushed the allocator-nightly-bound branch from c086565 to 6f6b418 Compare September 18, 2026 12:44
@rust-log-analyzer

This comment has been minimized.

@maxdexh
maxdexh force-pushed the allocator-nightly-bound branch 2 times, most recently from b2cd82e to 26b1e02 Compare September 18, 2026 13:21
@maxdexh

maxdexh commented Sep 18, 2026

Copy link
Copy Markdown
Member Author

r? clarfonthey

@maxdexh
maxdexh marked this pull request as ready for review September 18, 2026 14:20
@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 Sep 18, 2026
#[marker]
#[unstable(feature = "allocator_api", issue = "32838")]
#[doc(hidden)]
pub trait AllocatorNightly: Allocator {}

@clarfonthey clarfonthey Sep 18, 2026

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 feels picky but I would explicitly name this something clearer like StableAllocatorBound.

View changes since the review

@maxdexh maxdexh Sep 18, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

But it's a bound that can only be satisfied on nightly. To me that name is so much less clear

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.

You mean, on nightly or beta with the unstable allocator_api feature, or instead in all cases where the allocator bound is stable (on Global)?

I dunno, I would say it's ambiguous.

Comment thread library/alloc/src/alloc.rs
Comment thread library/alloc/src/alloc.rs
Comment thread library/alloc/src/rc.rs
@maxdexh
maxdexh force-pushed the allocator-nightly-bound branch from 26b1e02 to e727033 Compare September 18, 2026 14:37
@clarfonthey

Copy link
Copy Markdown
Contributor

@bors r+ rollup

If Nia has any better ideas for AllocatorNightly, she can rename it when she rebases the stabilisation over this.

@rust-bors

rust-bors Bot commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

📌 Commit e727033 has been approved by clarfonthey

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 Sep 18, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Sep 18, 2026
…=clarfonthey

Guard types with unstable `Allocator` params ahead of partial stabilization

Guard APIs that allow the construction of `#[unstable] A: Allocator` param types with `A != Global`, that will not be stabilized by rust-lang#156882
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Sep 18, 2026
…=clarfonthey

Guard types with unstable `Allocator` params ahead of partial stabilization

Guard APIs that allow the construction of `#[unstable] A: Allocator` param types with `A != Global`, that will not be stabilized by rust-lang#156882
rust-bors Bot pushed a commit that referenced this pull request Sep 18, 2026
…uwer

Rollup of 20 pull requests

Successful merges:

 - #160401 (sparc: make ABI consistent with clang)
 - #162715 (don't calculate dtors if the self ty has impossible bounds)
 - #162740 (stdarch subtree update)
 - #162824 (link Enzyme and the offload with in-tree lld if possible)
 - #162946 (Simplify query stack printing)
 - #161005 (fix: unfulfilled nested dead code lint)
 - #161246 (Normalize non-rigid aliases in ty_known_to_outlive)
 - #161803 (Fix docs of make_ascii_lowercase/make_ascii_upercase)
 - #162256 (Add mentions to sync back `RELEASES.md` to the `main` branch)
 - #162661 (simplify `Target::GenericParam`)
 - #162666 (Tidy footnote in `platform-support.md`)
 - #162803 (docs(num): add documentation for `NonZero::from_str`)
 - #162879 (use u64 limbs in core::num::bignum)
 - #162903 (PassWrapper: adapt to LLVM reading exception model from module flag)
 - #162905 (c-variadic: add checks for windows i686)
 - #162906 (Move more `rustdoc-html` tests in the right location)
 - #162922 (An assortment of polonius tweaks)
 - #162929 (Update unicode_data to Unicode version 18.0.0)
 - #162930 (Use niche length type for strlen to guarantee `isize::MAX` bound)
 - #162960 (Guard types with unstable `Allocator` params ahead of partial stabilization)
rust-bors Bot pushed a commit that referenced this pull request Sep 18, 2026
…uwer

Rollup of 19 pull requests

Successful merges:

 - #160401 (sparc: make ABI consistent with clang)
 - #162715 (don't calculate dtors if the self ty has impossible bounds)
 - #162740 (stdarch subtree update)
 - #162946 (Simplify query stack printing)
 - #161005 (fix: unfulfilled nested dead code lint)
 - #161246 (Normalize non-rigid aliases in ty_known_to_outlive)
 - #161803 (Fix docs of make_ascii_lowercase/make_ascii_upercase)
 - #162256 (Add mentions to sync back `RELEASES.md` to the `main` branch)
 - #162661 (simplify `Target::GenericParam`)
 - #162666 (Tidy footnote in `platform-support.md`)
 - #162803 (docs(num): add documentation for `NonZero::from_str`)
 - #162879 (use u64 limbs in core::num::bignum)
 - #162903 (PassWrapper: adapt to LLVM reading exception model from module flag)
 - #162905 (c-variadic: add checks for windows i686)
 - #162906 (Move more `rustdoc-html` tests in the right location)
 - #162922 (An assortment of polonius tweaks)
 - #162929 (Update unicode_data to Unicode version 18.0.0)
 - #162930 (Use niche length type for strlen to guarantee `isize::MAX` bound)
 - #162960 (Guard types with unstable `Allocator` params ahead of partial stabilization)
rust-bors Bot pushed a commit that referenced this pull request Sep 18, 2026
…uwer

Rollup of 19 pull requests

Successful merges:

 - #160401 (sparc: make ABI consistent with clang)
 - #162715 (don't calculate dtors if the self ty has impossible bounds)
 - #162740 (stdarch subtree update)
 - #162946 (Simplify query stack printing)
 - #161005 (fix: unfulfilled nested dead code lint)
 - #161246 (Normalize non-rigid aliases in ty_known_to_outlive)
 - #161803 (Fix docs of make_ascii_lowercase/make_ascii_upercase)
 - #162256 (Add mentions to sync back `RELEASES.md` to the `main` branch)
 - #162661 (simplify `Target::GenericParam`)
 - #162666 (Tidy footnote in `platform-support.md`)
 - #162803 (docs(num): add documentation for `NonZero::from_str`)
 - #162879 (use u64 limbs in core::num::bignum)
 - #162903 (PassWrapper: adapt to LLVM reading exception model from module flag)
 - #162905 (c-variadic: add checks for windows i686)
 - #162906 (Move more `rustdoc-html` tests in the right location)
 - #162922 (An assortment of polonius tweaks)
 - #162929 (Update unicode_data to Unicode version 18.0.0)
 - #162930 (Use niche length type for strlen to guarantee `isize::MAX` bound)
 - #162960 (Guard types with unstable `Allocator` params ahead of partial stabilization)
@rust-bors
rust-bors Bot merged commit bf41f01 into rust-lang:main Sep 19, 2026
13 checks passed
@rustbot rustbot added this to the 1.100.0 milestone Sep 19, 2026
rust-bors Bot pushed a commit that referenced this pull request Sep 19, 2026
Rollup merge of #162960 - maxdexh:allocator-nightly-bound, r=clarfonthey

Guard types with unstable `Allocator` params ahead of partial stabilization

Guard APIs that allow the construction of `#[unstable] A: Allocator` param types with `A != Global`, that will not be stabilized by #156882
pull Bot pushed a commit to LeeeeeeM/miri that referenced this pull request Sep 19, 2026
…uwer

Rollup of 19 pull requests

Successful merges:

 - rust-lang/rust#160401 (sparc: make ABI consistent with clang)
 - rust-lang/rust#162715 (don't calculate dtors if the self ty has impossible bounds)
 - rust-lang/rust#162740 (stdarch subtree update)
 - rust-lang/rust#162946 (Simplify query stack printing)
 - rust-lang/rust#161005 (fix: unfulfilled nested dead code lint)
 - rust-lang/rust#161246 (Normalize non-rigid aliases in ty_known_to_outlive)
 - rust-lang/rust#161803 (Fix docs of make_ascii_lowercase/make_ascii_upercase)
 - rust-lang/rust#162256 (Add mentions to sync back `RELEASES.md` to the `main` branch)
 - rust-lang/rust#162661 (simplify `Target::GenericParam`)
 - rust-lang/rust#162666 (Tidy footnote in `platform-support.md`)
 - rust-lang/rust#162803 (docs(num): add documentation for `NonZero::from_str`)
 - rust-lang/rust#162879 (use u64 limbs in core::num::bignum)
 - rust-lang/rust#162903 (PassWrapper: adapt to LLVM reading exception model from module flag)
 - rust-lang/rust#162905 (c-variadic: add checks for windows i686)
 - rust-lang/rust#162906 (Move more `rustdoc-html` tests in the right location)
 - rust-lang/rust#162922 (An assortment of polonius tweaks)
 - rust-lang/rust#162929 (Update unicode_data to Unicode version 18.0.0)
 - rust-lang/rust#162930 (Use niche length type for strlen to guarantee `isize::MAX` bound)
 - rust-lang/rust#162960 (Guard types with unstable `Allocator` params ahead of partial stabilization)
@maxdexh
maxdexh deleted the allocator-nightly-bound branch September 19, 2026 22:27
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.

5 participants