--- date: 2024-10-01 url: https://hackmd.io/K92-oF8GTXeBKyOo1MiBLw --- # Libs-API Meeting 2024-10-01 ###### tags: `Libs Meetings` `Minutes` **Meeting Link**: https://meet.jit.si/rust-libs-meeting-crxoz2at8hiccp7b3ixf89qgxfymlbwr **Attendees**: Amanieu, David, JoshT, Mara, The 8472, Chris Denton, Eric Holk, scottmcm, TC ## Agenda - Triage - Anything else? ## Triage ### FCPs 15 rust-lang/rust T-libs-api FCPs - merge rust.tf/130698 *Tracking Issue for \`const\_make\_ascii\`* - (3 checkboxes left) - merge rust.tf/80437 *Tracking Issue for \`box\_into\_inner\`* - (1 checkboxes left) - merge rust.tf/67441 *Tracking issue for const \`Option\` functions* - (3 checkboxes left) - merge rust.tf/82814 *Tracking Issue for const \`Result\` methods* - (3 checkboxes left) - merge rust.tf/130660 *Tracking Issue for \`const\_char\_encode\_utf16\`* - (3 checkboxes left) - merge rust.tf/106418 *Implement \`PartialOrd\` and \`Ord\` for \`Discriminant\`* - (2 checkboxes left) - merge rust.tf/123723 *Make \`std::os::darwin\` public* - (3 checkboxes left) - merge rust.tf/120141 *Tracking Issue for enum access in offset\_of* - (6 checkboxes left) - merge rust.tf/129238 *Stabilize \`Ipv6Addr::is\_unique\_local\` and \`Ipv6Addr::is\_unicast\_link\_local\`* - (3 checkboxes left) - merge rust.tf/130350 *stabilize Strict Provenance and Exposed Provenance APIs* - (3 checkboxes left) - merge rust.tf/72440 *Tracking Issue for constify\-ing non\-trait \`Duration\` methods* - (3 checkboxes left) - merge rust.tf/130191 *\[discussion\] \`ErrorKind::CrossesDevices\` from \`io\_error\_more\`* - (4 checkboxes left) - merge rust.tf/130190 *\[discussion\] \`ErrorKind::FilesystemQuotaExceeded\` from \`io\_error\_more\`* - (4 checkboxes left) - merge rust.tf/130512 *Tracking Issue for \`const\_char\_encode\_utf8\`* - (3 checkboxes left) - merge rust.tf/130608 *Implemented \`FromStr\`/\`TryInto\<String\>\` for \`CString\`* - (3 checkboxes left) [pnkfelix (1)](https://rfcbot.rs/fcp/pnkfelix), [m-ou-se (10)](https://rfcbot.rs/fcp/m-ou-se), [dtolnay (2)](https://rfcbot.rs/fcp/dtolnay), [Amanieu (11)](https://rfcbot.rs/fcp/Amanieu), [BurntSushi (6)](https://rfcbot.rs/fcp/BurntSushi), [tmandry (1)](https://rfcbot.rs/fcp/tmandry), [joshtriplett (12)](https://rfcbot.rs/fcp/joshtriplett), [scottmcm (2)](https://rfcbot.rs/fcp/scottmcm), [nikomatsakis (2)](https://rfcbot.rs/fcp/nikomatsakis) ### (nominated) rust.tf/libs246 *ACP: replace use of \`Pointee\` trait with a \`ptr::Metadata\` type* Discussed last time. Amanieu to reply ### (nominated) rust.tf/libs394 *Simple seedable insecure random number generation, stable across Rust versions* Amanieu: Prefer SeedableRandomSource. Seedable is the important property, not insecure. Insecure is something for the docs. Mara: +1 Josh: .. Not objecting. The 8472: Or "deterministic" Josh: Would be happier with that. Mara: +1 Josh: Purposely didn't design a seedable source trait. Needs an assoc type for the seed. Amanieu: object to get_seed. storing that makes the source twice as big. if you need it, store it separately. The 8472: chacha is seekable, so it has to keep something like that. not sure if it keeps the state verbatim. Josh: Add as unresolved question? Amanieu: sure. ### (nominated) rust.tf/84277 *Tracking Issue for \`try\_trait\_v2\`, A new design for the \`?\` desugaring (RFC#3058)* Amanieu: scott, what's the status? scott: {update} Amanieu: stabilize as sealed trait, only impl for Result and Option? The 8472: is that useful? would still set most of the API in stone. Josh: temporarily or permanently? Amanieu: somewhat permamently? scottmcm: we can use an edition to change `?` desugaring. in the future we could skip the impls for Poll. Today's impl of `?` on Poll was a mistake, should have operated directly on the Poll. scottmcm: about permanently sealing the traits: probably useful to impl for platform specific things, e.g. hresult on windows. scottmcm: we could use some supertrait to allow people to write a bound, but not stabilize the traits themselves. amanieu: goal is to stabilize things like get_or_try_init, needs residual type. to allow people to define their own `try_find` basically. scottmcm: niko's plan for abstracting try and async etc. is relevant. then we might not need try_find, because then `find` could be either "try" or "async"? not sure if that's written up anywhere. mara: can we find more examples of types that should work with these traits? only Option/Result/hresult is not going to help us answer trait design questions. scott: Here's rocket's https://api.rocket.rs/v0.4/rocket/outcome/enum.Outcome#impl-Try-for-Outcome%3CA,+B,+C%3E Mara: I think we need to work through the design questions, i don't think we can "half stabilize" this without locking us in. scott, do you have time for that? scott: yes. let's do that. feedback from burntsushi about ugly signatures: https://github.com/rust-lang/rust/pull/107122#issuecomment-2385640802 scott: looks a bit better in code than rustdoc because of aliases, see https://github.com/rust-lang/rust/blob/c4f7176501a7d3c19c230b8c9111b2d39142f83a/library/core/src/iter/traits/iterator.rs#L2955-L2958 Mara: alt design: https://github.com/rust-lang/rust/issues/84277#issuecomment-1066120333 scott: looks like that alt design doesn't include the `Residual` part that's tracked in https://github.com/rust-lang/rust/issues/91285 ### (nominated) rust.tf/74939 *Tracking issue for const \`\<\*const T\>::is\_null\`* scottmcm: Could we use the symbolic part to just error on the bad cases? So it'd always be right for anything inside or past-the-end of an allocation, but blows up for weird ones outside of it? That sounds nice, and I'm not sure why `(&raw const my_local).sub(1234)` is ever needed in const... ### (nominated) rust.tf/97601 *Tracking Issue for map\_many\_mut* Discussed last week. ### (nominated) rust.tf/104642 *Tracking Issue for get\_many\_mut* The 8472: `get_many_mut_unchecked -> [&T; N]` - convenience, not lowest-level building block. Raw pointers are the lowest-level building block. ### (nominated) rust.tf/130829 *Add \`\[Option\<T\>; N\]::transpose\`* Comments suggesting that because it's irreversible it shouldn't be called `transpose`, and should be called something else instead. The 8472 to reply. The 8472: We can leave the name as an open question and bikeshed that later. Amanieu: I'd be open to `collapse`. ### (nominated) rust.tf/127942 *Tracking Issue for \`debug\_more\_non\_exhaustive\`* Accepted ### (waiting on team) rust.tf/119550 *Rename \`AsyncIterator\` back to \`Stream\`, introduce an AFIT\-based \`AsyncIterator\` trait* ### (waiting on team) rust.tf/130136 *Partially stabilize const\_pin* ### (new change proposal) rust.tf/libs453 *Signed↔Unsigned integer methods* - https://github.com/rust-lang/libs-team/issues/359 - https://github.com/rust-lang/libs-team/issues/183 Names: - `cast_signed`, `cast_unsigned` - `to_signed`, `to_unsigned` - `reinterpret_signed`, `reinterpret_unsigned` - `*_checked` - `*_wrapped` Behaviors: - Bitcast - ~~Panic on overflow in debug, bitcast on release~~ - ~~Panic on overflow always~~ This is just `.unwrap()` or `.expect()`. - Return a `Result` or `Option`. The only value of this over `TryFrom`/`TryInto` is that it's inflexible about target type, which might be useful if you don't want to rely on inference. The 8472: ask for motivation wrt. debug/release mode Josh to reply ### (new change proposal) rust.tf/libs452 *ACP: Implement \`TryFromIterator\<T\>\` trait to compliment \`FromIterator\<T\>\` trait.* TC to reply ### (new change proposal) rust.tf/libs451 *ACP: Export MPMC APIs* Already merged PR. ### (new change proposal) rust.tf/libs449 *ACP: Chars::take\_str* Needs clearer motivation from author. ### (new change proposal) rust.tf/libs447 *ACP(core::net): add \`Ipv\[4|6\]Address::from\_octets\` and \`Ipv6Address::from\_segments\`* Josh to reply ### (new change proposal) rust.tf/libs438 *ACP: \`ForwardInit\<'a, T\>\` to complement \`MaybeUninit\<T\>\`* ### (new change proposal) rust.tf/libs420 *Add basic tempfile API to stdlib* ### (new change proposal) rust.tf/libs406 *Make \`proc\_macro\` available outside procedural macro generation* ### (new change proposal) rust.tf/libs403 *Add \`RawStatusCode\`* ### (new change proposal) rust.tf/libs398 *Make \`core::str::from\_utf8\*\` methods available on the \`str\` type* ### (stalled change proposal) rust.tf/libs205 *Expose the internal \`SimpleMessage\` struct and allow creating \`std::io::Error\`s with them* Accepted const_io_error Josh to reply ### (stalled change proposal) rust.tf/libs124 *Integrate \`Error\` trait with panic interfaces* ### (stalled change proposal) rust.tf/libs155 *Arbitrary alternate flags in \`std::fmt::Formatter\`* ### (stalled change proposal) rust.tf/libs332 *Implement ExactSizeIterator for Flatten\<option::IntoIter\<I\>\>* ### (stalled change proposal) rust.tf/libs230 *Add \`saturating\_shl\` and \`saturating\_shr\` for ints* ### (stalled change proposal) rust.tf/libs207 *\`parse\_line\` method for \`Stdin\`* ### (stalled change proposal) rust.tf/libs296 *ACP: Designing an alternative \`FromStr\`* ### (stalled change proposal) rust.tf/libs186 *Implementing flatten for \`Option\<&Option\<T\>\>\` and \`Option\<&mut Option\<T\>\>\`* ### (stalled change proposal) rust.tf/libs148 *Expose raw std{in,out,err}* ### (stalled change proposal) rust.tf/libs181 *\`Cow::map\_borrowed\`, \`Cow::map\_owned\`, and \`Cow::map\`* _Generated by [fully-automatic-rust-libs-team-triage-meeting-agenda-generator](https://github.com/rust-lang/libs-team/tree/main/tools/agenda-generator)_