Fix no_global_oom_handling build by arlosi · Pull Request #110649 · rust-lang/rust (original) (raw)

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

arlosi

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 #107191

@arlosi

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.

@rustbot rustbot added S-waiting-on-review

Status: Awaiting review from the assignee but also interested parties.

T-libs

Relevant to the library team, which will review and decide on the PR/issue.

labels

Apr 21, 2023

@rustbot

Hey! It looks like you've submitted a new PR for the library teams!

If this PR contains changes to any rust-lang/rust public library APIs then please comment with @rustbot label +T-libs-api -T-libs to tag it appropriately. If this PR contains changes to any unstable APIs please edit the PR description to add a link to the relevant API Change Proposal or create one if you haven't already. If you're unsure where your change falls no worries, just leave it as is and the reviewer will take a look and make a decision to forward on if necessary.

Examples of T-libs-api changes:

@rustbot rustbot added the I-prioritize

Issue: Indicates that prioritization has been requested for this issue.

label

Apr 21, 2023

@dpaoliello

@dpaoliello

This was referenced

Apr 21, 2023

@ojeda

ojeda added a commit to ojeda/rust that referenced this pull request

Apr 23, 2023

@ojeda

…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 ojeda@kernel.org

@Mark-Simulacrum

@bors

📌 Commit 5731655 has been approved by Mark-Simulacrum

It is now in the queue for this repository.

@bors bors 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

Apr 24, 2023

@apiraino apiraino removed the I-prioritize

Issue: Indicates that prioritization has been requested for this issue.

label

Apr 25, 2023

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request

Apr 25, 2023

@matthiaskrgr

… 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

bors added a commit to rust-lang-ci/rust that referenced this pull request

Apr 25, 2023

@bors

…iaskrgr

Rollup of 6 pull requests

Successful merges:

Failed merges:

r? @ghost @rustbot modify labels: rollup

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request

Apr 29, 2023

@matthiaskrgr

…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]

SamZhang3 added a commit to SamZhang3/doors-rs-old that referenced this pull request

Jun 11, 2023

@SamZhang3

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.

SamZhang3 added a commit to SamZhang3/doors-rs-old that referenced this pull request

Jun 11, 2023

@SamZhang3

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.

Labels

regression-from-stable-to-stable

Performance or correctness regression from one stable version to another.

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.