-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Description
Feature gate: #![feature(more_fallible_allocation_methods)]
This is a tracking issue for adding more fallible allocation methods, i.e. ones where allocation failure will return Err(_)
rather than calling some diverging global handler.
It overlaps a bit with #32838, since the most general methods will be fallible and allocator-agnostic.
Public API
Basically, all the methods in the alloc
crate that begin with try_
. Perhaps others in std
someday.
Steps / History
- Implementation:
alloc: add some try_* methods Rust-for-Linux needs #86938vec: add try_* methods and a try_vec! macro to make Vec usable in without infallible allocation methods #95051- more to come probably
- Might consider removing less general methods that are unstable, such as
RawVec
's, to avoid combinatorial explosion.
- Final comment period (FCP)
- Stabilization PR
Unresolved Questions
-
Iteration with no_global_oom_handling adding in alloc: Add unstable Cfg feature `no_global_oom_handling #84266, proposed to be turned to a feature in RFC: fallible-allocation rfcs#3140
-
Put methods on other type / in other location to avoid
try_
prefix (which is sort of an ad-hoc namespacing trick).
Metadata
Metadata
Assignees
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.