# Libs Meeting 2021-04-28 ###### tags: `Libs Meetings` `Minutes` **Attendees**: ... ## Agenda - [Open action items](https://hackmd.io/ovrbJj6CRduRgSA0Wzg2zg) - [#84266](https://github.com/rust-lang/rust/pull/84266) - ***WIP: alloc: Add default Cargo feature "global\-oom\-handling"*** - Discuss the problem motivating this work (falliable allocation, for the Linux kernel and other usage) - Discuss potential solutions to that problem, and steps in those solutions (e.g. adding more `try_` functions) - Discuss stabilization of `try_reserve`, and what the error should look like (opaque?) - Discuss `Termination` trait underlying type (and how other types should be converted to it to preserve information) - Triage - Anything else? ## Triage ### Nominated - [0 `rust-lang/rfcs` items](https://github.com/rust-lang/rfcs/issues?q=is%3Aopen+label%3AT-libs+label%3AI-nominated) - [1 `rust-lang/rust` items](https://github.com/rust-lang/rust/issues?q=is%3Aopen+label%3AT-libs+label%3AI-nominated) - [#84266](https://github.com/rust-lang/rust/pull/84266) - see above ### Waiting on team - [0 `rust-lang/rfcs` items](https://github.com/rust-lang/rfcs/issues?q=is%3Aopen+label%3AT-libs+label%3AS-waiting-on-team) - [2 `rust-lang/rust` items](https://github.com/rust-lang/rust/issues?q=is%3Aopen+label%3AT-libs+label%3AS-waiting-on-team) - [[76901](https://github.com/rust-lang/rust/pull/76901)] *Implement RFC 2500 Needle API (Part 1)* - [[81642](https://github.com/rust-lang/rust/pull/81642)] *Allow deriving Into for primitive enums* ### Needs decision - [7 `rust-lang/rust` items](https://github.com/rust-lang/rust/issues?q=is%3Aopen+label%3AT-libs+label%3AI-needs-decision) - [[25053](https://github.com/rust-lang/rust/issues/25053)] *UnsafeCell should implement the Copy trait* - [[26951](https://github.com/rust-lang/rust/issues/26951)] *Abort on some large allocation requests, Panic on other* - [[29494](https://github.com/rust-lang/rust/issues/29494)] *Command does not escape arguments as expected on windows* - [[37868](https://github.com/rust-lang/rust/issues/37868)] *std::process::Command's current\_dir behaves differently on Unix and Windows, with respect to relative exe paths* - [[56889](https://github.com/rust-lang/rust/issues/56889)] *Write::write\_all erroring when encountering Ok(0) interacts poorly with the contract of Write::write* - [[59878](https://github.com/rust-lang/rust/issues/59878)] *Box\<\[T\]\> should have an IntoIter implementation.* - [[62726](https://github.com/rust-lang/rust/issues/62726)] *Tracking issue for io\_slice\_advance* ## Actions - [ ] Reply to all issues/PRs discussed in this meeting, or add them to the [open action items](https://hackmd.io/ovrbJj6CRduRgSA0Wzg2zg). ## Notes - Rust's (std's) OOM handling is not great. Just panics/aborts. Now with no_std, rust for linux, etc. this is becoming more important. - OOM panic is similar to env::args() panic, or thread::spawn() panic - it doesn't panic because you failed to uphold some precondition, but instead because something happened that most* rust users dont' care about - two separate issues: 1. do we want try_* alternatives for all these things, 2. do we want a way to *disable* the panicking versions - special attribute for this type of panic? - could be useful for both documentation and a lint - very similar to this 'portability lint' idea - name: 'convenience panic' ? - `try_` always meaning 'try to allocate' might not be great. there are other (potential) usages. - maybe we don't even want `try_push` but a two-step `let x = try_reserve(..)?;` and `x.push(..)` where the latter does not try to allocate? - If we introduce separate types (`VecFallible`, `HashMapFallible`, needs much better naming), we can use the same name for every method (`VecFallible::push` would return `Result`, `Vec::push` is `self.inner.push(...).unwrap()` or equivalent).