# Libs-API Meeting 2024-02-27
###### tags: `Libs Meetings` `Minutes`
**Meeting Link**: https://meet.jit.si/rust-libs-meeting-crxoz2at8hiccp7b3ixf89qgxfymlbwr
**Attendees**: Amanieu, David, Josh Triplett, Mara, Chris Denton, The 8472
## Agenda
- Triage
- Anything else?
## Upcoming weeks of US/Europe DST confusion
Skip meetings as usual?
Fix to US times, EU has meetings 1 hour earlier for those weeks.
## Triage
### FCPs
1 rust-lang/rfcs T-libs-api FCPs
- merge rust.tf/rfc3550 *RFC: New range types for Edition 2024* - (5 checkboxes left)
21 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/116016 *Soft\-destabilize \`RustcEncodable\` & \`RustcDecodable\`, remove from prelude in next edition* - (3 checkboxes left)
- merge rust.tf/99969 *alloc: implement FromIterator for Box\<str\>* - (3 checkboxes left)
- merge rust.tf/118741 *Added Default impl for Ipv4 and Ipv6 struct* - (3 checkboxes left)
- merge rust.tf/114655 *Make \`impl\<Fd: AsFd\>\` impl take \`?Sized\`* - (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/107462 *Implement \`FromIterator\` for \`(impl Default + Extend, impl Default + Extend)\`* - (3 checkboxes left)
- merge rust.tf/121403 *impl From\<TryReserveError\> for io::Error* - (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\`* - (4 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\`* - (3 checkboxes left)
- merge rust.tf/106418 *Implement \`PartialOrd\` and \`Ord\` for \`Discriminant\`* - (3 checkboxes left)
[BurntSushi (12)](https://rfcbot.rs/fcp/BurntSushi), [joshtriplett (16)](https://rfcbot.rs/fcp/joshtriplett), [scottmcm (1)](https://rfcbot.rs/fcp/scottmcm), [m-ou-se (15)](https://rfcbot.rs/fcp/m-ou-se), [dtolnay (1)](https://rfcbot.rs/fcp/dtolnay), [Amanieu (11)](https://rfcbot.rs/fcp/Amanieu), [nikomatsakis (3)](https://rfcbot.rs/fcp/nikomatsakis), [yaahc (2)](https://rfcbot.rs/fcp/yaahc), [pnkfelix (3)](https://rfcbot.rs/fcp/pnkfelix), [tmandry (1)](https://rfcbot.rs/fcp/tmandry)
### (nominated) rust.tf/112896 *Add key\_mut method to BTreeMap entries*
Amanieu: The safe version is to remove and insert it.
The 8472: How about a safe API that moves if necessary?
Josh: Name this `_unchecked` so we can leave this name for a safe method?
Amanieu: The safe version wouldn't be able to return a reference.
Amanieu: A safe replace_key and unsafe replace_key_unchecked has been suggested.
Josh: Only suggesting naming this "unchecked".
Mara: +1 on naming this unchecked.
Amanieu: the shape of the final API for btreemap is not yet clear, but fine to add this as unstable as "unchecked".
### (nominated) rust.tf/117156 *Convert \`Unix{Datagram,Stream}::{set\_}passcred()\` to per\-OS traits*
To be merged after conflicts resolved.
### (nominated) rust.tf/120234 *stabilise assert\_matches*
Josh: Stabilizing it in a module sounds good, but not `assert_matches`.
Mara: `std::assert` as a module won't work, because `use std::assert;` would then import both the module and the macro.
Josh: `std::asserts`? `std::macros`?
Amanieu: +1 for `std::macros`.
Amanieu: Prefer just putting it in the crate root. Can we fix name resolution?
Josh: Wasn't that too much work?
Amanieu: I checked but didn't see anyone comment on this who works on name resolution.
Josh: If we really don't care where it is.. we could _define_ it in the prelude?
Mara: Not a great permanent home, but a good way to unblock it..
The 8472: Could we keep it in the unstable assert_matches module while making the reexport stable?
Mara: That's probably how we should do things, yes.
Amanieu: So, we have a way forward: stabilize it as part of the 2024 prelude, leave module name for later.
Amanieu: Note that we're not actually stabilizing this though, because `std::prelude::rust_2024` is still unstable...
Josh to summarize in a comment.
### (nominated) rust.tf/120291 *Have \`String\` use \`SliceIndex\` impls from \`str\`*
David: It would only break with a custom SliceIndex impl, but implementing that is unstable.
Amanieu: These are already used for str, this just copies it to String. Looks fine.
David: It'll add one new impl: for a tuple (pair) of bounds.
Mara: Oh, but I guess we should see that as a bug fix, since str already had that.
David: Yeah not concerned about adding it.
Amanieu to r+
### (nominated) rust.tf/120504 *Vec::try\_with\_capacity*
Came up briefly in the libs meeting. libs-api question is how far we want to go with adding `try_` methods.
Josh: I think this method is a lot more justifiable than other potential `try_` methods. I don't see it as a slippery slope, but I understand the concern.
The 8472: It's less justified than try_shrink, because that's a lot more difficult to write alternatively.
The 8472: try_with_capacity is just new+try_reserve.
Mara: Fwiw, Box::try_new is not stable yet. Only Vec::try_reserve is.
Mara: Not feeling great about adding more try_ methods like this, but wouldn't object to this one.
Amanieu: I feel pretty good about try_with_capacity.
The 8472 + Mara: After try_with_capacity, what API would you use? Vec::push isn't useful when trying to avoid unchecked allocations.
Amanieu: We can leave that discussion till stabilization.
Mara: Okay
Amanieu to reply.
### (nominated) rust.tf/120580 *Add \`MAX\_LEN\_UTF8\` and \`MAX\_LEN\_UTF16\` Constants*
Mara: Is this useful? Won't `4` be more readable than `MAX_LEN_UTF8`?
Amanieu + Josh: I think this is useful.
Consensus: accept as unstable.
Mara replied.
### (nominated) rust.tf/121201 *align\_offset, align\_to: no longer allow implementations to spuriously fail to align*
Amanieu: align_to is useful for simd where you want to process arrays in large (aligned) chunks.
Mara: That's a use case where it's fine if the middle part is empty, but I also have use cases where that is a problem, so I'm a big fan of this PR.
Josh: Can't we have alignment be a concept at compile time?
The 8472: Actual addresses don't exist at compile time..
{discussion on whether alignment can exist at compile time}
Josh: Anyway, from libs this looks fine. Lang will also probably think it's fine. Ship it.
### (nominated) rust.tf/121588 *strict provenance: rename addr → addr\_without\_provenance*
### (waiting on team) rust.tf/107462 *Implement \`FromIterator\` for \`(impl Default + Extend, impl Default + Extend)\`*
### (waiting on team) rust.tf/117329 *offset: allow zero\-byte offset on arbitrary pointers*
Fine from libs-api, but more of a lang issue. Removed label.
### (waiting on team) rust.tf/119550 *Rename \`AsyncIterator\` back to \`Stream\`, introduce an AFIT\-based \`AsyncIterator\` trait*
### (new change proposal) rust.tf/libs338 *RefInit: RAII wrapper for initialized MaybeUninit references*
### (new change proposal) rust.tf/libs340 *Add \`HashMapEntry\` and \`BTreeMapEntry\` aliases to \`std::collections\`*
### (new change proposal) rust.tf/libs341 *ACP: Add \`{Ref,RefMut}::try\_map\` method*
### (new change proposal) rust.tf/libs342 *Add raw\-pointer\-to\-reference conversion methods*
### (new change proposal) rust.tf/libs344 *ACP: Add \`std::string::String::replace\_and\_count\` and/or \`replace\_with\`*
### (stalled change proposal) rust.tf/libs207 *\`parse\_line\` method for \`Stdin\`*
### (stalled change proposal) rust.tf/libs203 *ACP: \`std::os::windows::fs::junction\_point\`*
Accepted.
### (stalled change proposal) rust.tf/libs117 *ACP: Unchecked construction of \`core::time::Duration\`*
### (stalled change proposal) rust.tf/libs208 *\`pop\_if\` or \`Entry\`/\`Peek\`\-like API for \`Vec\` and \`VecDeque\`*
Mara: +1 to pop_if. Peek is nice, but not sure if it provides much value over what you can do today.
Josh: binary heap calls it peek_mut
Amanieu: pop_if should give a mutable reference to the item
Josh: Zero objection to adding pop_if or Peek or both. (Not Entry.)
### (stalled change proposal) rust.tf/libs124 *Integrate \`Error\` trait with panic interfaces*
_Generated by [fully-automatic-rust-libs-team-triage-meeting-agenda-generator](https://github.com/rust-lang/libs-team/tree/main/tools/agenda-generator)_