# Libs-API Meeting 2024-03-12 ###### tags: `Libs Meetings` `Minutes` **Meeting Link**: https://meet.jit.si/rust-libs-meeting-crxoz2at8hiccp7b3ixf89qgxfymlbwr **Attendees**: Amanieu, David, Josh Triplett, Mara ## Agenda - Triage - Anything else? ## Triage ### FCPs 1 rust-lang/rfcs T-libs-api FCPs - merge rust.tf/rfc3550 *RFC: New range types for Edition 2024* - (5 checkboxes left) 18 rust-lang/rust T-libs-api FCPs - merge rust.tf/80437 *Tracking Issue for \`box\_into\_inner\`* - (1 checkboxes left) - merge rust.tf/82901 *Tracking Issue for \`Option::get\_or\_insert\_default\`* - (2 checkboxes left) - merge rust.tf/83871 *Tracking Issue for CharIndices::offset function* - (3 checkboxes left) - merge rust.tf/98934 *Add \`Option::take\_if\`* - (3 checkboxes left) - merge rust.tf/102012 *Tracking Issue for \`const\_waker\`* - (3 checkboxes left) - merge rust.tf/106943 *Implement DoubleEnded and ExactSize for Take\<Repeat\> and Take\<RepeatWith\>* - (3 checkboxes left) - merge rust.tf/120257 *Tracking Issue for generic \`NonZero\`* - (2 checkboxes left) - merge rust.tf/107462 *Implement \`FromIterator\` for \`(impl Default + Extend, impl Default + Extend)\`* - (2 checkboxes left) - merge rust.tf/113744 *Tracking Issue for \`IpvNAddr::{BITS, to\_bits, from\_bits}\` (\`ip\_bits\`)* - (3 checkboxes left) - merge rust.tf/99262 *Tracking Issue for \`io\_error\_downcast\`* - (3 checkboxes left) - merge rust.tf/62726 *Tracking issue for io\_slice\_advance* - (3 checkboxes left) - merge rust.tf/109402 *Implement owned ops for \`HashSet\` and \`BTreeSet\`* - (3 checkboxes left) - merge rust.tf/116113 * Generalize \`{Rc,Arc}::make\_mut()\` to unsized types.* - (4 checkboxes left) - merge rust.tf/115974 *Split core's PanicInfo and std's PanicInfo* - (2 checkboxes left) - merge rust.tf/117468 *Stabilize Wasm relaxed SIMD* - (4 checkboxes left) - merge rust.tf/101196 *Tracking Issue for \`Ready::into\_inner()\`* - (1 checkboxes left) - merge rust.tf/119131 *Tracking Issue for \`hint::assert\_unchecked\`* - (2 checkboxes left) - merge rust.tf/106418 *Implement \`PartialOrd\` and \`Ord\` for \`Discriminant\`* - (3 checkboxes left) [BurntSushi (10)](https://rfcbot.rs/fcp/BurntSushi), [joshtriplett (14)](https://rfcbot.rs/fcp/joshtriplett), [dtolnay (1)](https://rfcbot.rs/fcp/dtolnay), [m-ou-se (11)](https://rfcbot.rs/fcp/m-ou-se), [Amanieu (6)](https://rfcbot.rs/fcp/Amanieu) ### (nominated) rust.tf/121541 *Added Complexity annotations for documentation of std::collections::VecDeque* Mara: Some of the added notes are incorrect. The 8472: We already have https://doc.rust-lang.org/nightly/std/collections/index.html#sequences That information should go there. Amanieu: Do we need a policy? We don't have that many data structures. Josh: At least they should be *correct*. The 8472: And not too specific. David: Might be more appropriate to put the complexities in a table on top of the VecDeque page rather than per method. Two use cases for complexity docs: 1. chosing a data structure (covered by 8472's link), 2. understanding an individual data structure in greater depth. Mara: Agree. Amanieu: For swap_remove, is it obvious? Oh it's already there. Mara to review. ### (nominated) rust.tf/121588 *strict provenance: rename addr → bare\_addr* Discussion ongoing. Waiting for input. ### (nominated) rust.tf/121650 *change std::process to drop supplementary groups based on CAP\_SETGID* Amanieu: four options: 1. Only drop groups if getuid==0 (today) 2. Always drop groups, ignore EPERM 3. Always drop groups, fail on EPERM (this PR) 4. never drop groups (bad idea ignore this option) Josh: There are cases where you want to change uid but keep the groups. The 8472: Option 5: do option 3 and add an extra API. "uid_preserve_groups" effectively. Mara: or ".preserve_groups()" separately for uid. Amanieu: do we add that now, or only when someone asks for it? Josh: If you're in a linux container that refuses setgroups, then you'd have to call .preserve_groups() which is counterintuitive. Josh: Details on `man user_namespaces` The 8472: Dropping groups is allowed in common container setups: ``` $ docker run -it --rm debian root@cfe8850a8b83:/# cat /proc/self/setgroups allow ``` ### (nominated) rust.tf/121920 *downgrade ptr.is\_aligned\_to crate\-private* Discussed last time. FCP merge (to close the feature). ### (waiting on team) rust.tf/119550 *Rename \`AsyncIterator\` back to \`Stream\`, introduce an AFIT\-based \`AsyncIterator\` trait* ### (new change proposal) rust.tf/libs348 *std::os::unix::env::{argc, argv}* Seems to be turning into a different proposal.. ### (new change proposal) rust.tf/libs349 *Add \`as\_millis\_{f64,f32}\` helper functions for \`Duration\`* Mara: Don't think this warrants a specific method. It's not more efficient than `as_secs_f64()*1000.0` Amanieu: Should be a clippy lint. Josh: Huge amount of results on github code search for this pattern though. Mara: If you search for `as_secs_f64() *`, nearly all results are `* 1000.0`. Josh: Millis might be a sweet spot where you still want sub-integer precision, unlike micros or nanos. Mara: `/ 60` also gives 111 results... Mara: Not exicted, but I wouldn't object to as_millis_f*. Josh: Same. And also suggest the clippy lint. Amanieu to reply. ### (new change proposal) rust.tf/libs350 *std::slice::from\_raw\_parts alternative that would accept a null pointer if len == 0 by returning an empty slice* Mara: scott suggests having a new one for `NonNull` and having the existing one accept null. I like that better. https://github.com/rust-lang/libs-team/issues/350#issuecomment-1983189027 The 8472: https://davidben.net/2024/01/15/empty-slices.html#wishlist ### (new change proposal) rust.tf/libs351 *ACP: Add \`impl Display\` variant to print \`Duration\` as decimal seconds* ### (new change proposal) rust.tf/libs352 *Add error functions (\`erf\`, \`erfc\`) to the \`f32\`/\`f64\` API.* ### (stalled change proposal) rust.tf/libs215 *Implement AsRef, Borrow for std::cell::Ref, RefMut* ### (stalled change proposal) rust.tf/libs67 *Replace \`feature(layout\_for\_ptr)\` with \`feature(layout\_for\_meta)\`* ### (stalled change proposal) rust.tf/libs184 *Add \`setsid\` method to \`CommandExt\` trait* ### (stalled change proposal) rust.tf/libs205 *Expose the internal \`SimpleMessage\` struct and allow creating \`std::io::Error\`s with them* ### (stalled change proposal) rust.tf/libs150 *\`Option::as\_\`(\`mut\_\`)\`slice\` and \`::into\_slice\`* _Generated by [fully-automatic-rust-libs-team-triage-meeting-agenda-generator](https://github.com/rust-lang/libs-team/tree/main/tools/agenda-generator)_