Skip to content

alloc: no_global_oom_handling: disable new()s, pin()s, etc.#86810

Merged
bors merged 1 commit into
rust-lang:masterfrom
ojeda:alloc-gate
Jul 3, 2021
Merged

alloc: no_global_oom_handling: disable new()s, pin()s, etc.#86810
bors merged 1 commit into
rust-lang:masterfrom
ojeda:alloc-gate

Conversation

@ojeda

@ojeda ojeda commented Jul 2, 2021

Copy link
Copy Markdown
Contributor

They are infallible, and could not be actually used because
they will trigger an error when monomorphized, but it is better
to just remove them.

Link: Rust-for-Linux/linux#402
Suggested-by: Gary Guo gary@garyguo.net
Signed-off-by: Miguel Ojeda ojeda@kernel.org

They are infallible, and could not be actually used because
they will trigger an error when monomorphized, but it is better
to just remove them.

Link: Rust-for-Linux/linux#402
Suggested-by: Gary Guo <gary@garyguo.net>
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
@rust-highfive

Copy link
Copy Markdown
Contributor

r? @dtolnay

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 2, 2021
@ojeda

ojeda commented Jul 2, 2021

Copy link
Copy Markdown
Contributor Author

Paging @nbdd0121 @bjorn3 @Ericson2314.

@dtolnay dtolnay left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

@dtolnay

dtolnay commented Jul 3, 2021

Copy link
Copy Markdown
Member

@bors r+

@bors

bors commented Jul 3, 2021

Copy link
Copy Markdown
Collaborator

📌 Commit 7775dff has been approved by dtolnay

@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 Jul 3, 2021
@bors

bors commented Jul 3, 2021

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 7775dff with merge 8649737...

@bors

bors commented Jul 3, 2021

Copy link
Copy Markdown
Collaborator

☀️ Test successful - checks-actions
Approved by: dtolnay
Pushing 8649737 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jul 3, 2021
@bors
bors merged commit 8649737 into rust-lang:master Jul 3, 2021
@rustbot rustbot added this to the 1.55.0 milestone Jul 3, 2021
@kornelski

kornelski commented Jul 8, 2021

Copy link
Copy Markdown
Contributor

BTW @ojeda, the double negation in cfg(not(no_global_oom_handling)) is hard to read. Maybe the feature flag could be inverted to be default-on global_oom_handling and then use cfg(global_oom_handling)?

@bjorn3

bjorn3 commented Jul 8, 2021

Copy link
Copy Markdown
Member

A default-on --cfg that is not a feature is not possible. Using a cargo feature was deliberately avoided.

@ojeda
ojeda deleted the alloc-gate branch July 8, 2021 14:11
@ojeda

ojeda commented Jul 8, 2021

Copy link
Copy Markdown
Contributor Author

@kornelski Note that this PR did not add the cfg, it merely tags more methods.

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

Labels

merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants