# Libs-API Meeting 2023-07-18 ###### tags: `Libs Meetings` `Minutes` **Meeting Link**: https://meet.jit.si/rust-libs-meeting-crxoz2at8hiccp7b3ixf89qgxfymlbwr **Attendees**: Amanieu, David, Chris Denton, The 8472, Josh ## Agenda - Triage - Anything else? ## Triage ### FCPs 12 rust-lang/rust T-libs-api FCPs - merge rust.tf/88581 *Tracking Issue for \`int\_roundings\`* - (1 checkboxes left) - merge rust.tf/80437 *Tracking Issue for \`box\_into\_inner\`* - (1 checkboxes left) - merge rust.tf/91946 *Tracking Issue for \`io::Error::other\`* - (3 checkboxes left) - merge rust.tf/98461 *Document lack of panic safety guarantees of \`Clone::clone\_from\`* - (0 checkboxes left) - merge rust.tf/52331 *Correcting Path::components on Redox* - (5 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* - (4 checkboxes left) - merge rust.tf/99262 *Tracking Issue for \`io\_error\_downcast\`* - (4 checkboxes left) - merge rust.tf/106655 *Tracking Issue for \`#!\[feature(offset\_of)\]\`* - (0 checkboxes left) - merge rust.tf/107587 *Mark \`std\` integral modules as deprecated (\`std::u32\`, \`std::i16\`, etc.)* - (4 checkboxes left) - merge rust.tf/113701 *Re\-export core::ffi::FromBytesUntilNulError in std::ffi* - (4 checkboxes left) - merge rust.tf/62726 *Tracking issue for io\_slice\_advance* - (3 checkboxes left) [yaahc (4)](https://rfcbot.rs/fcp/yaahc), [Amanieu (4)](https://rfcbot.rs/fcp/Amanieu), [BurntSushi (8)](https://rfcbot.rs/fcp/BurntSushi), [m-ou-se (7)](https://rfcbot.rs/fcp/m-ou-se), [joshtriplett (5)](https://rfcbot.rs/fcp/joshtriplett), [dtolnay (3)](https://rfcbot.rs/fcp/dtolnay) ### (nominated) rust.tf/98704 *Implement From\<OwnedFd/Handle\> for ChildStdin/out/err object* Still waiting on review. ### (nominated) rust.tf/113627 *the \`write\_at\` function from \`std::os::unix::prelude::FileExt\` doesn't work as described* Need to fix the example in the docs to open the file in write mode. Should link to https://man7.org/linux/man-pages/man2/pwrite.2.html#BUGS and mention that on some targets append mode will override `write_at`. Amanieu to comment. ### (new change proposal) rust.tf/libs229 *Add \`array::try\_from\_iter\` as safe way of creating a fixed sized \`array\` from an \`IntoIterator\`.* The8472: Implement FromIterator for Result<[T], Err>, Amanieu: Non-obvious, better as a method. The8472: TryFromIterator trait? Could help with faillible allocation. The8472: iter.by_ref() to keep an iterator with the remaining elements. Amanieu: Much more discoverable than next_chunk. The8472: next_array_chunk? Amanieu: current name is fine. David: `next_chunk::<N>` much easier than than `try_from_iter::<_, N>`. Josh: Can use `<const N: usize, I>` with argument `impl Iterator<Item = I>` instead. The8472: Error if iterator too long? Amanieu: Error type should be same as next_chunk David: If length isn't exact, error should be more descriptive The8472: slice->array try_from requires exact match David: make next_chunk more discoverable Amanieu: chunk doesn't come to mind David: rename next_chunk to next_array (still unstable) Josh: No one name that is discoverable for both single array and multiple chunks. `next_chunk` is the right name for chunks. Amanieu,David: There is space for `next` which also asserts that iterator is empty afterwards. David: `collect_exact` which returns an array and errors if not exact match. Amanieu: ACP process says we should accept this and let discussion continue on internals. Needs more discussions of alternatives (possibly multiple). The8472 to comment. ### (new change proposal) rust.tf/libs230 *Add \`saturating\_shl\` and \`saturating\_shr\` for ints* No clear motivation. Is there a need for saturating the shift or saturating the result? Amanieu: I know there are CPU instructions for saturating the result. David: open to this but needs clear motivation. David: close in favor of saturating_mul `A.saturating_shl(B)` is equivalent to `A.saturating_mul(1 << B)`? - Yes, except if B is larger than the bit width. Close asking for more motivation. Amanieu to comment. ### (new change proposal) rust.tf/libs231 *ACP: Add const fn TypeId::matches for comparing type ids in consts* ### (new change proposal) rust.tf/libs232 *Implement PartialOrd\<str\> for String, PartialOrd\<\[T\] for Vec\<T\>* Seems OK as long as it passes crater run? Also tell them to fix their code. Amanieu to comment. ### (new change proposal) rust.tf/libs247 *Proposal: Add OsStr::to\_mut\_str and OsString::to\_mut\_string* ### (stalled change proposal) rust.tf/libs148 *Expose raw std{in,out,err}* ### (stalled change proposal) rust.tf/libs146 *ACP: \`impl TryFrom\<char\> for u16\`* ### (stalled change proposal) rust.tf/libs145 *ACP: Additional NonZero conversions* ### (stalled change proposal) rust.tf/libs124 *Integrate \`Error\` trait with panic interfaces* ### (stalled change proposal) rust.tf/libs111 *Restructure ptr\_metadata to minimal support* _Generated by [fully-automatic-rust-libs-team-triage-meeting-agenda-generator](https://github.com/rust-lang/libs-team/tree/main/tools/agenda-generator)_