Skip to content

allocator: refactor for stabilisation#157428

Open
nia-e wants to merge 8 commits into
rust-lang:mainfrom
nia-e:allocator-refactor
Open

allocator: refactor for stabilisation#157428
nia-e wants to merge 8 commits into
rust-lang:mainfrom
nia-e:allocator-refactor

Conversation

@nia-e
Copy link
Copy Markdown
Member

@nia-e nia-e commented Jun 4, 2026

Adds my current proposal per the doc in #156882 and follow-up Zulip conversations (notably for dyn-compat) unstably.

r? libs

@rustbot rustbot added 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. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jun 4, 2026
@nia-e nia-e added the A-allocators Area: Custom and system allocators label Jun 4, 2026
Comment thread library/core/src/alloc/mod.rs Outdated
@rust-log-analyzer

This comment has been minimized.

qaijuang

This comment was marked as resolved.

@rust-log-analyzer

This comment has been minimized.

@nia-e
Copy link
Copy Markdown
Member Author

nia-e commented Jun 4, 2026

Note that the no-panic bounds introduced close #156490 and #155746. However, if we want to relax them in the future, we may need to adjust our collection types to be more resilient.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer
Copy link
Copy Markdown
Collaborator

The job aarch64-gnu-llvm-21-2 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
##[endgroup]
[TIMING:end] tool::ToolBuild { build_compiler: Compiler { stage: 0, host: aarch64-unknown-linux-gnu, forced_compiler: false }, target: aarch64-unknown-linux-gnu, tool: "linkchecker", path: "src/tools/linkchecker", mode: ToolBootstrap, source_type: InTree, extra_features: [], allow_features: "", cargo_args: [], artifact_kind: Binary } -- 0.163
[TIMING:end] tool::Linkchecker { compiler: Compiler { stage: 0, host: aarch64-unknown-linux-gnu, forced_compiler: false }, target: aarch64-unknown-linux-gnu } -- 0.000
##[group]Testing stage1 Linkcheck (aarch64-unknown-linux-gnu)
alloc/sync/struct.Arc.html:1290: broken link fragment `#tymethod.__dyn_allocate` pointing to `alloc/alloc/trait.DynAllocator.html`
alloc/sync/struct.Arc.html:1290: broken link fragment `#tymethod.__dyn_allocate_zeroed` pointing to `alloc/alloc/trait.DynAllocator.html`
alloc/sync/struct.Arc.html:1293: broken link fragment `#tymethod.__dyn_deallocate` pointing to `alloc/alloc/trait.DynAllocator.html`
alloc/sync/struct.Arc.html:1293: broken link fragment `#tymethod.__dyn_grow` pointing to `alloc/alloc/trait.DynAllocator.html`
alloc/sync/struct.Arc.html:1298: broken link fragment `#tymethod.__dyn_grow_zeroed` pointing to `alloc/alloc/trait.DynAllocator.html`
alloc/sync/struct.Arc.html:1303: broken link fragment `#tymethod.__dyn_shrink` pointing to `alloc/alloc/trait.DynAllocator.html`
alloc/rc/struct.Rc.html:1017: broken link fragment `#tymethod.__dyn_allocate` pointing to `alloc/alloc/trait.DynAllocator.html`
alloc/rc/struct.Rc.html:1017: broken link fragment `#tymethod.__dyn_allocate_zeroed` pointing to `alloc/alloc/trait.DynAllocator.html`
alloc/rc/struct.Rc.html:1020: broken link fragment `#tymethod.__dyn_deallocate` pointing to `alloc/alloc/trait.DynAllocator.html`
alloc/rc/struct.Rc.html:1020: broken link fragment `#tymethod.__dyn_grow` pointing to `alloc/alloc/trait.DynAllocator.html`
alloc/rc/struct.Rc.html:1025: broken link fragment `#tymethod.__dyn_grow_zeroed` pointing to `alloc/alloc/trait.DynAllocator.html`
alloc/rc/struct.Rc.html:1030: broken link fragment `#tymethod.__dyn_shrink` pointing to `alloc/alloc/trait.DynAllocator.html`
alloc/boxed/struct.Box.html:1391: broken link fragment `#tymethod.__dyn_allocate` pointing to `alloc/alloc/trait.DynAllocator.html`
alloc/boxed/struct.Box.html:1391: broken link fragment `#tymethod.__dyn_allocate_zeroed` pointing to `alloc/alloc/trait.DynAllocator.html`
alloc/boxed/struct.Box.html:1394: broken link fragment `#tymethod.__dyn_deallocate` pointing to `alloc/alloc/trait.DynAllocator.html`
alloc/boxed/struct.Box.html:1394: broken link fragment `#tymethod.__dyn_grow` pointing to `alloc/alloc/trait.DynAllocator.html`
alloc/boxed/struct.Box.html:1399: broken link fragment `#tymethod.__dyn_grow_zeroed` pointing to `alloc/alloc/trait.DynAllocator.html`
alloc/boxed/struct.Box.html:1404: broken link fragment `#tymethod.__dyn_shrink` pointing to `alloc/alloc/trait.DynAllocator.html`
alloc/alloc/struct.Global.html:28: broken link fragment `#tymethod.__dyn_allocate` pointing to `alloc/alloc/trait.DynAllocator.html`
alloc/alloc/struct.Global.html:28: broken link fragment `#tymethod.__dyn_allocate_zeroed` pointing to `alloc/alloc/trait.DynAllocator.html`
alloc/alloc/struct.Global.html:31: broken link fragment `#tymethod.__dyn_deallocate` pointing to `alloc/alloc/trait.DynAllocator.html`
alloc/alloc/struct.Global.html:31: broken link fragment `#tymethod.__dyn_grow` pointing to `alloc/alloc/trait.DynAllocator.html`
alloc/alloc/struct.Global.html:36: broken link fragment `#tymethod.__dyn_grow_zeroed` pointing to `alloc/alloc/trait.DynAllocator.html`
alloc/alloc/struct.Global.html:41: broken link fragment `#tymethod.__dyn_shrink` pointing to `alloc/alloc/trait.DynAllocator.html`
std/sync/struct.Arc.html:1426: broken link fragment `#tymethod.__dyn_allocate` pointing to `std/alloc/trait.DynAllocator.html`
std/sync/struct.Arc.html:1426: broken link fragment `#tymethod.__dyn_allocate_zeroed` pointing to `std/alloc/trait.DynAllocator.html`
std/sync/struct.Arc.html:1429: broken link fragment `#tymethod.__dyn_deallocate` pointing to `std/alloc/trait.DynAllocator.html`
std/sync/struct.Arc.html:1429: broken link fragment `#tymethod.__dyn_grow` pointing to `std/alloc/trait.DynAllocator.html`
std/sync/struct.Arc.html:1434: broken link fragment `#tymethod.__dyn_grow_zeroed` pointing to `std/alloc/trait.DynAllocator.html`
std/sync/struct.Arc.html:1439: broken link fragment `#tymethod.__dyn_shrink` pointing to `std/alloc/trait.DynAllocator.html`
std/rc/struct.Rc.html:1109: broken link fragment `#tymethod.__dyn_allocate` pointing to `std/alloc/trait.DynAllocator.html`
std/rc/struct.Rc.html:1109: broken link fragment `#tymethod.__dyn_allocate_zeroed` pointing to `std/alloc/trait.DynAllocator.html`
std/rc/struct.Rc.html:1112: broken link fragment `#tymethod.__dyn_deallocate` pointing to `std/alloc/trait.DynAllocator.html`
std/rc/struct.Rc.html:1112: broken link fragment `#tymethod.__dyn_grow` pointing to `std/alloc/trait.DynAllocator.html`
std/rc/struct.Rc.html:1117: broken link fragment `#tymethod.__dyn_grow_zeroed` pointing to `std/alloc/trait.DynAllocator.html`
std/rc/struct.Rc.html:1122: broken link fragment `#tymethod.__dyn_shrink` pointing to `std/alloc/trait.DynAllocator.html`
std/boxed/struct.Box.html:1579: broken link fragment `#tymethod.__dyn_allocate` pointing to `std/alloc/trait.DynAllocator.html`
std/boxed/struct.Box.html:1579: broken link fragment `#tymethod.__dyn_allocate_zeroed` pointing to `std/alloc/trait.DynAllocator.html`
std/boxed/struct.Box.html:1582: broken link fragment `#tymethod.__dyn_deallocate` pointing to `std/alloc/trait.DynAllocator.html`
std/boxed/struct.Box.html:1582: broken link fragment `#tymethod.__dyn_grow` pointing to `std/alloc/trait.DynAllocator.html`
std/boxed/struct.Box.html:1587: broken link fragment `#tymethod.__dyn_grow_zeroed` pointing to `std/alloc/trait.DynAllocator.html`
std/boxed/struct.Box.html:1592: broken link fragment `#tymethod.__dyn_shrink` pointing to `std/alloc/trait.DynAllocator.html`
std/alloc/struct.Global.html:28: broken link fragment `#tymethod.__dyn_allocate` pointing to `std/alloc/trait.DynAllocator.html`
std/alloc/struct.Global.html:28: broken link fragment `#tymethod.__dyn_allocate_zeroed` pointing to `std/alloc/trait.DynAllocator.html`
std/alloc/struct.Global.html:31: broken link fragment `#tymethod.__dyn_deallocate` pointing to `std/alloc/trait.DynAllocator.html`
std/alloc/struct.Global.html:31: broken link fragment `#tymethod.__dyn_grow` pointing to `std/alloc/trait.DynAllocator.html`
std/alloc/struct.Global.html:36: broken link fragment `#tymethod.__dyn_grow_zeroed` pointing to `std/alloc/trait.DynAllocator.html`
std/alloc/struct.Global.html:41: broken link fragment `#tymethod.__dyn_shrink` pointing to `std/alloc/trait.DynAllocator.html`
std/alloc/struct.System.html:84: broken link fragment `#tymethod.__dyn_allocate` pointing to `std/alloc/trait.DynAllocator.html`
std/alloc/struct.System.html:84: broken link fragment `#tymethod.__dyn_allocate_zeroed` pointing to `std/alloc/trait.DynAllocator.html`
std/alloc/struct.System.html:87: broken link fragment `#tymethod.__dyn_deallocate` pointing to `std/alloc/trait.DynAllocator.html`
std/alloc/struct.System.html:87: broken link fragment `#tymethod.__dyn_grow` pointing to `std/alloc/trait.DynAllocator.html`
std/alloc/struct.System.html:92: broken link fragment `#tymethod.__dyn_grow_zeroed` pointing to `std/alloc/trait.DynAllocator.html`
std/alloc/struct.System.html:97: broken link fragment `#tymethod.__dyn_shrink` pointing to `std/alloc/trait.DynAllocator.html`
checked links in: 25.6s
number of HTML files scanned: 62217
number of HTML redirects found: 22168
number of links checked: 2921561
number of links ignored due to external: 180276
---
   2: <std::backtrace::Backtrace>::create
             at /rustc/0417c25868d6dfbd1c291dfeae950504faa6f790/library/std/src/backtrace.rs:331:13
   3: <bootstrap::utils::exec::DeferredCommand>::finish_process
             at /checkout/src/bootstrap/src/utils/exec.rs:939:17
   4: <bootstrap::utils::exec::DeferredCommand>::wait_for_output::<&bootstrap::utils::exec::ExecutionContext>
             at /checkout/src/bootstrap/src/utils/exec.rs:831:21
   5: <bootstrap::utils::exec::ExecutionContext>::run
             at /checkout/src/bootstrap/src/utils/exec.rs:741:45
   6: <bootstrap::utils::exec::BootstrapCommand>::run::<&bootstrap::core::builder::Builder>
             at /checkout/src/bootstrap/src/utils/exec.rs:339:27
   7: <bootstrap::core::build_steps::test::Linkcheck as bootstrap::core::builder::Step>::run
             at /checkout/src/bootstrap/src/core/build_steps/test.rs:191:77
   8: <bootstrap::core::builder::Builder>::ensure::<bootstrap::core::build_steps::test::Linkcheck>
             at /checkout/src/bootstrap/src/core/builder/mod.rs:1596:36
   9: <bootstrap::core::build_steps::test::Linkcheck as bootstrap::core::builder::Step>::make_run
             at /checkout/src/bootstrap/src/core/build_steps/test.rs:137:21
  10: <bootstrap::core::builder::StepDescription>::maybe_run
             at /checkout/src/bootstrap/src/core/builder/mod.rs:476:13
  11: bootstrap::core::builder::cli_paths::match_paths_to_steps_and_run
             at /checkout/src/bootstrap/src/core/builder/cli_paths.rs:141:22
  12: <bootstrap::core::builder::Builder>::run_step_descriptions
             at /checkout/src/bootstrap/src/core/builder/mod.rs:1139:9
  13: <bootstrap::core::builder::Builder>::execute_cli
             at /checkout/src/bootstrap/src/core/builder/mod.rs:1118:14
  14: <bootstrap::Build>::build
             at /checkout/src/bootstrap/src/lib.rs:803:25
  15: bootstrap::main
             at /checkout/src/bootstrap/src/bin/main.rs:130:11
  16: <fn() as core::ops::function::FnOnce<()>>::call_once
             at /rustc/0417c25868d6dfbd1c291dfeae950504faa6f790/library/core/src/ops/function.rs:250:5
  17: std::sys::backtrace::__rust_begin_short_backtrace::<fn(), ()>
             at /rustc/0417c25868d6dfbd1c291dfeae950504faa6f790/library/std/src/sys/backtrace.rs:166:18
  18: std::rt::lang_start::<()>::{closure#0}
             at /rustc/0417c25868d6dfbd1c291dfeae950504faa6f790/library/std/src/rt.rs:206:18
  19: <&dyn core::ops::function::Fn<(), Output = i32> + core::panic::unwind_safe::RefUnwindSafe + core::marker::Sync as core::ops::function::FnOnce<()>>::call_once
             at /rustc/0417c25868d6dfbd1c291dfeae950504faa6f790/library/core/src/ops/function.rs:287:21
  20: std::panicking::catch_unwind::do_call::<&dyn core::ops::function::Fn<(), Output = i32> + core::panic::unwind_safe::RefUnwindSafe + core::marker::Sync, i32>
             at /rustc/0417c25868d6dfbd1c291dfeae950504faa6f790/library/std/src/panicking.rs:581:40
  21: std::panicking::catch_unwind::<i32, &dyn core::ops::function::Fn<(), Output = i32> + core::panic::unwind_safe::RefUnwindSafe + core::marker::Sync>
             at /rustc/0417c25868d6dfbd1c291dfeae950504faa6f790/library/std/src/panicking.rs:544:19
  22: std::panic::catch_unwind::<&dyn core::ops::function::Fn<(), Output = i32> + core::panic::unwind_safe::RefUnwindSafe + core::marker::Sync, i32>
             at /rustc/0417c25868d6dfbd1c291dfeae950504faa6f790/library/std/src/panic.rs:359:14
  23: std::rt::lang_start_internal::{closure#0}
             at /rustc/0417c25868d6dfbd1c291dfeae950504faa6f790/library/std/src/rt.rs:175:24
  24: std::panicking::catch_unwind::do_call::<std::rt::lang_start_internal::{closure#0}, isize>
             at /rustc/0417c25868d6dfbd1c291dfeae950504faa6f790/library/std/src/panicking.rs:581:40
---
  31: __libc_start_main
  32: _start


Command has failed. Rerun with -v to see more details.
Bootstrap failed while executing `--stage 2 test --skip tidy --skip src/tools/rust-analyzer --skip tests --skip coverage-map --skip coverage-run --skip library --skip tidyselftest`
Build completed unsuccessfully in 0:38:47
  local time: Thu Jun  4 16:13:47 UTC 2026
  network time: Thu, 04 Jun 2026 16:13:47 GMT
##[error]Process completed with exit code 1.

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

Labels

A-allocators Area: Custom and system allocators 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. 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