-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix no_global_oom_handling build #110649
Fix no_global_oom_handling build #110649
Conversation
`provide_sorted_batch` in core is incorrectly marked with `#[cfg(not(no_global_oom_handling))]` which prevents core from building with the cfg enabled. Nothing in core allocates memory including this function, so the `cfg` gate is incorrect.
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
@Ericson2314 @ojeda - Looks like the existing test (https://github.com/rust-lang/rust/blob/409661936f929b254ffc8adb644cf35d1f9765c4/tests/run-make/alloc-no-oom-handling/Makefile) only builds |
Definitely @dpaoliello, thanks! Sent #110652. |
…m_handling` `tests/run-make/alloc-no-oom-handling` tests that `alloc` under `no_global_oom_handling` builds and is warning-free. Do the same for `core` to prevent issues such as [1]. Link: rust-lang#110649 [1] Signed-off-by: Miguel Ojeda <[email protected]>
@bors r+ |
… r=Mark-Simulacrum Fix no_global_oom_handling build `provide_sorted_batch` in core is incorrectly marked with `#[cfg(not(no_global_oom_handling))]` which prevents core from building with the cfg enabled. Nothing in `core` allocates memory (including this function). The `cfg` gate is incorrect. cc `@dpaoliello` r? `@wesleywiser` The cfg was added by rust-lang#107191
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#110556 (Switch to `EarlyBinder` for `explicit_item_bounds`) - rust-lang#110615 (Add `impl_tag!` macro to implement `Tag` for tagged pointer easily) - rust-lang#110649 (Fix no_global_oom_handling build) - rust-lang#110671 (Consider polarity in new solver) - rust-lang#110783 (Fix ICE on --print=... i/o errors) - rust-lang#110796 (Updating Wake example to use new 'pin!' macro) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
…test, r=Mark-Simulacrum Add test for warning-free builds of `core` under `no_global_oom_handling` `tests/run-make/alloc-no-oom-handling` tests that `alloc` under `no_global_oom_handling` builds and is warning-free. Do the same for `core` to prevent issues such as [1]. Link: rust-lang#110649 [1]
With the current Rust nightly (2023-06-01 as of this writing), using `-Zbuild-std` to recompile the `core` and `alloc` crates while enabling the `no_global_oom_handling` cfg now works properly. Therefore there is no further need for the `doors_alloc` hack, which involved manually copying the source for `alloc` and adding it as a Cargo dependency. It is still not clear what change on the Rust/Cargo end fixed the bug that previously blocked using `-Zbuild-std` to set the cfg (at the time, trying to enable the cfg resulted in large numbers of mysterious "duplicate lang item" errors). Maybe rust-lang/rust#110649 is related.
With the Rust nightly currently used for Doors (2023-06-01 as of this writing), using `-Zbuild-std` to recompile the `core` and `alloc` crates while enabling the `no_global_oom_handling` cfg now works properly. Therefore there is no further need for the `doors_alloc` hack, which involved manually copying the source for `alloc` and adding it as a Cargo dependency. It is still not clear what change on the Rust/Cargo end fixed the bug that previously blocked using `-Zbuild-std` to set the cfg (at the time, trying to enable the cfg resulted in large numbers of mysterious "duplicate lang item" errors). Maybe rust-lang/rust#110649 is related.
provide_sorted_batch
in core is incorrectly marked with#[cfg(not(no_global_oom_handling))]
which prevents core from building with the cfg enabled.Nothing in
core
allocates memory (including this function). Thecfg
gate is incorrect.cc @dpaoliello
r? @wesleywiser
The cfg was added by #107191