# Libs-API Meeting 2024-02-20
###### tags: `Libs Meetings` `Minutes`
**Meeting Link**: https://meet.jit.si/rust-libs-meeting-crxoz2at8hiccp7b3ixf89qgxfymlbwr
**Attendees**: ...
## 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)
22 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/120257 *Tracking Issue for generic \`NonZero\`* - (4 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/100824 *use \`confstr(\_CS\_DARWIN\_USER\_TEMP\_DIR, ...)\` as a \`TMPDIR\` fallback on Darwin* - (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/117215 *Tracking Issue for ARM CRC32 intrinsics* - (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/106418 *Implement \`PartialOrd\` and \`Ord\` for \`Discriminant\`* - (0 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)
[BurntSushi (12)](https://rfcbot.rs/fcp/BurntSushi), [Amanieu (12)](https://rfcbot.rs/fcp/Amanieu), [dtolnay (1)](https://rfcbot.rs/fcp/dtolnay), [m-ou-se (16)](https://rfcbot.rs/fcp/m-ou-se), [joshtriplett (18)](https://rfcbot.rs/fcp/joshtriplett)
### (nominated) rust.tf/libs193 *Add \`sync::ReentrantLock\`*
Mara: Any objections?
Amanieu: fine with me. but there are unresolved questions: poison, fallible locking, naming.
Amanieu: prefer ReentrantMutex.
Mara: Agree with the point on poison, to not have it.
David: Would people use this instead of Mutex if this doesn't have poison?
Mara: No, because this provide mutable access, so can't replace Mutex.
The 8472: This could use a good example.
Amanieu: Example is a `ReentrantMutex<RefCell>`
Mara: Implementation PR has good examples: https://github.com/rust-lang/rust/pull/110543/files
Mara replied.
### (nominated) rust.tf/76014 *Tracking Issue for slice::split\_at\_unchecked() and split\_at\_mut\_unchecked()*
Mara: Someone submitted a PR to stabilize this. Not sure how much we want this. I feel very neutral.
David: I think it's fine.
..: the non-mut version is a bit useless, but so is split_at (already stable).
Mara proposed FCP.
### (nominated) rust.tf/106418 *Implement \`PartialOrd\` and \`Ord\` for \`Discriminant\`*
David: We considered two options: Implement it for all enums, or only for some with a marker. We were okay with doing it for all enums, as long as we set clear expectations on stability. Lots of discussion since then.
David: Want to make sure we're all on board with continuing with implementing this for all enums.
Amanieu: On board with that. Stability is same as transmuting etc.
Josh: To the extent there would be any complaints, it seems like many of them would apply to the concept of having `Discriminant` in the first place. Since we have `Discriminant`, let's make it maximally useful. No objections.
David to pass the issue on to lang. Eventually will FCP with both teams.
### (nominated) rust.tf/107462 *Implement \`FromIterator\` for \`(impl Default + Extend, impl Default + Extend)\`*
The 8472: This already exists: https://doc.rust-lang.org/nightly/std/iter/trait.Iterator.html#method.unzip
David: .collect() wouldn't automatically use that.
David: This adds unzip behaviour to .collect().
Mara: Ideally the bounds would be both `: FromIterator`, but that cannot work.
David: One could be `: FromIterator`?
Mara: Hm yes, but then it's asymetrical. :(
David: I think it's fine to add as proposed.
Amanieu to propose FCP.
### (nominated) rust.tf/117658 *rename ptr::invalid \-\> ptr::without\_provenance*
Amanieu: I think invalid() is fine
Mara: https://github.com/rust-lang/rfcs/pull/3559 was merged, so that removes some barrier for using the word "provenance" here.
David: ptr::zero_bytes_at?
Mara: That makes sense for ZST, but is very confusing for most usages of ptr::invalid like stuffing flags into pointers.
David: I think `invalid` was fine, but don't care too much.
David: It's not removing provenance from something that had provenance. It's not adding it.
Mara: no_provenance?
David: I like that better.
David: Though, it's not turning off the concept of provenance.
Josh: Lol, if only.
Amanieu: let's just merge this? it remains unstable..
Mara to merge.
### (nominated) rust.tf/120219 *core: implement Add and AddAssign for ascii::Char*
Josh: Am i right that the issue is the wrapping behaviour, not the concept of addition for ascii chars?
Amanieu: my objection is with the concept of ascii::Char.
Mara: For `char` we also don't have addition.
The 8472: For base64 implementations or w/e you want to offset ascii chars.. conversion would make it inefficient
Amanieu: You'd need to check anyway. Addition for ascii::Char would still need to check/mask.
The 8472: Masking is faster than other options though.
Josh: I think to some extent if you argue that you shouldn't be able to do math on this directly (only by converting to/from u8), that defeats some of the purpose of having this (giving people something better to use than u8). If we don't want this to exist at *all*, fine, but if we want this to exist then we should implement arithmetic for it.
Mara: Note that `char` implements `Step`. but that's something different than allowing addition.
Amanieu: original motivation was zero-cost conversion from `&[ascii::Char]` to `&str`. not do do easy arithmetic on chars.
Amanieu: you can mask and use unsafe conversion manually
The 8472: but then you don't get the debug/release panic/mask behaviour.
Josh: Should we reevaluate whether we want ascii::Char?
Amanieu: ascii::Char has merits for conversion to &str. not sure i like ascii::Char, but don't want to add Add to it regardless.
Mara: There are only ~three useful ranges in the ascii table: digits, and (upper/lower) alphabet. Maybe just have methods for those, leaving other usage to unsafe {}.
The 8472: Aren't the base64 special characters adjacent?
Mara: No?
Josh: There are other bit twiddling things you can do, e.g. to or from lower case.
Mara: My point is that we can have methods for each of those. (We already do?)
Mara: digit(8) is more readable than '0' + 8 anyway.
Josh: The result of not adding Add ascii::Char if it's less convenient than u8 is people not using it. But that's fine.
Mara: That's the same as NonZero being less convenient for not having Add.
Mara: Similar to `[NonZero<u8>]` being useful for CStr, `[ascii::Char]` is useful for str.
Not everyone uses NonZero, but it's still useful.
Amanieu: conclusion?
Josh: There are objections to adding it, so that means not adding it.
Amanieu: I can summarize the discussion.
### (nominated) rust.tf/120234 *stabilise assert\_matches*
Amanieu: in 2021, this wasn't done because Mara wanted a migration lint
David: that should work out of the box today right?
..
Mara: This PR doesn't do something with editions
Mara: Currently, it is in std::assert_matches::assert_matches, which is terrible.
Mara: std::assert::assert_matches didn't work because of std::assert
David: Would `use std::assert;` work fine if std::assert was a *stable* module (and a macro)?
David: Maybe `use std::assert; mod assert {} assert::thing()` was the issue.
Mara: Also an issue was brouht up on the `if`. Don't think it's a problem.
Amanieu: Also don't think it's a problem.
David: Agree.
Amanieu: i think we're all happy with assert_matches itself. Question is if we can put it in std's root, like the other macros.
Mara: If not the root, we need a good module name. std::assert won't work.
Mara: We could put it in std::panic.
Amanieu: all assert macros are already in the root. we should put it with the others.
Mara: But then things will break.
Amanieu: is std imported with #[macro_use]?
Mara: Yes.
Amanieu: Ah. :(
Amanieu: if we put all of the macros in the prelude, and remove the macro_use attribute, ..
David: no_implicit_prelude is stable.
Amanieu: postpone till next week.
---
### (nominated) rust.tf/120580 *Add \`MAX\_LEN\_UTF8\` and \`MAX\_LEN\_UTF16\` Constants*
### (nominated) rust.tf/121201 *align\_offset, align\_to: no longer allow implementations to spuriously fail to align*
### (waiting on team) rust.tf/119550 *Rename \`AsyncIterator\` back to \`Stream\`, introduce an AFIT\-based \`AsyncIterator\` trait*
### (new change proposal) rust.tf/libs334 *Customizing \`#\[derive(Debug)\]\`*
### (new change proposal) rust.tf/libs335 *ACP: \`PathBuf::make\_dir\`*
### (new change proposal) rust.tf/libs336 *Add \`or\_try\_\*\` variants for HashMap and BTreeMap Entry APIs*
### (new change proposal) rust.tf/libs337 *Add \`(checked\_)norem\_div\` methods for integer types*
### (new change proposal) rust.tf/libs338 *RefInit: RAII wrapper for initialized MaybeUninit references*
### (stalled change proposal) rust.tf/libs142 *Add \`take\_while\_inclusive\` method to \`Iterator\`*
### (stalled change proposal) rust.tf/libs114 *ACP: Method to split OsStr into \`(str, OsStr)\`*
### (stalled change proposal) rust.tf/libs190 *Move \`Utf8Chunks::new\` to be inherent on \`\[u8\]\`*
### (stalled change proposal) rust.tf/libs157 *fold\_first API Change Proposal*
### (stalled change proposal) rust.tf/libs203 *ACP: \`std::os::windows::fs::junction\_point\`*
_Generated by [fully-automatic-rust-libs-team-triage-meeting-agenda-generator](https://github.com/rust-lang/libs-team/tree/main/tools/agenda-generator)_