---
# System prepended metadata

title: Libs-API Meeting 2025-03-25
tags: [Minutes, Libs Meetings]

---

---
date: 2025-03-25
url: https://hackmd.io/z0P2i6JNTlaazQURrc7idQ
---

# Libs-API Meeting 2025-03-25

###### tags: `Libs Meetings` `Minutes`

**Meeting Link**: https://meet.jit.si/rust-libs-meeting-crxoz2at8hiccp7b3ixf89qgxfymlbwr
**Attendees**: Amanieu, David, JoshT, Mara, Eric Holk, TC

## Agenda

- Triage
- Anything else?

## Triage

### FCPs

11 rust-lang/rust T-libs-api FCPs

  - merge rust.tf/80437 *Tracking Issue for \`box\_into\_inner\`* - (1 checkboxes left)
  - merge rust.tf/138498 *Implement Deref\<Target=ByteStr\> for CStr* - (3 checkboxes left)
  - merge rust.tf/106418 *Implement \`PartialOrd\` and \`Ord\` for \`Discriminant\`* - (2 checkboxes left)
  - merge rust.tf/130823 *Tracking Issue for \`non\_null\_from\_ref\`* - (3 checkboxes left)
  - merge rust.tf/137280 *stabilize ptr::swap\_nonoverlapping in const* - (3 checkboxes left)
  - merge rust.tf/115585 *Tracking issue for \`cfg\_match\`* - (4 checkboxes left)
  - merge rust.tf/134213 *Stabilize \`naked\_functions\`* - (2 checkboxes left)
  - merge rust.tf/122661 *Change the desugaring of \`assert!\` for better error output* - (3 checkboxes left)
  - merge rust.tf/136877 *Fix missing const for inherent pointer \`replace\` methods* - (3 checkboxes left)
  - merge rust.tf/137992 *Stabilise \`os\_string\_pathbuf\_leak\`* - (4 checkboxes left)
  - merge rust.tf/138016 *Added \`Clone\` implementation for \`ChunkBy\`* - (3 checkboxes left)

[nikomatsakis (2)](https://rfcbot.rs/fcp/nikomatsakis), [scottmcm (2)](https://rfcbot.rs/fcp/scottmcm), [BurntSushi (8)](https://rfcbot.rs/fcp/BurntSushi), [joshtriplett (5)](https://rfcbot.rs/fcp/joshtriplett), [m-ou-se (4)](https://rfcbot.rs/fcp/m-ou-se), [dtolnay (2)](https://rfcbot.rs/fcp/dtolnay), [tmandry (1)](https://rfcbot.rs/fcp/tmandry), [Amanieu (7)](https://rfcbot.rs/fcp/Amanieu)

### (nominated) rust.tf/libs358 *Update Windows exe search order (phase 2)*

Amanieu: we discussed this previously. not coming to any conclusion

Amanieu: skip this one for now? since chris isn't here

JoshT: even with chris we might not be able to make progress

### (nominated) rust.tf/libs466 *ACP: Add nul\-terminated version of \`core::panic::Location::file\`*

Amanieu: prefer to push back on this. push linux to support ptr+len

Mara: acp seems fine to me

JoshT: our previous argument against this was overhead, but it looks like it has no overhead..

Amanieu: could be come a sliding scale. e.g. if we provide function name, should that also be nul terminated?

JoshT: can we make it flexible somehow, such that the kernel people can provide this themselves?

Mara: With nul terminated paths in Location, we could make Location smaller on our side too.

JoshT: Nora tried that. (Tiny performance improvement)

Mara: Are there any platforms that allow nul bytes inside paths?

Amanieu: No, all platforms support C.

JoshT: To my knowledge, no.

Mara: Seems fine to me

JoshT: I'd check my box, no objection

https://github.com/rust-lang/libs-team/issues/466#issuecomment-2461603806

Amanieu: bit of a weak argument

Amanieu: Somewhat opposed, but wouldn't block it if everyone else wanted it.

David: Same opinion as Amanieu. Not worried about performance. Bit worried about lack of pushback, could result in more requests

Mara: It seems reasonable to use FFI in a panic handler, to integrate Rust in an existing program.

David: Would like clear examples of that.

JoshT: Sounds like nobody has hard objections but the overall conclusion is 'meh', and there isn't a sufficiently compelling case for enthusiastic support.

David: We should have a higher bar for ACPs.

Mara: sgtm.

David: The bar can be low. but that bar hasn't been met. e.g. show that it requires a 2000 line kernel patch or something. or showing that their community is very opposed.

Amanieu: we would have to support this foverer. linux kernel doesn't have internal stability guarantees.

Mara: Even without FFI, i think it makes sense to use a nul terminated string here, considering paths can't contain nul. but maybe i'm a bigger fan of nul terminated strings than most rustaceans.

TC: Maybe we should hear from other people doing C/C++ interop.

JoshT: It would be good to have at least N==2 here.

Mara: Here's an example where we copy an entire string just to add a 0 byte. This is for the panic message, not the file location. https://github.com/rust-lang/rust/blob/master/library/panic_abort/src/android.rs

David: I don't know if there's a consensus in software engineering if ptr+size is 'better'.

Josh / Mara: Doesn't seem to be such a consensus. (but also no consensus for the opposite)

Josh: Also not clear that it's a win for a few C libraries to unilaterally switch if that means having to convert back and forth.

Conclusion: we need more compelling evidence (N=2 for people other than the Linux kernel wanting this, and evidence that this is sufficiently painful to work around in Linux)

Amanieu to reply

### (nominated) rust.tf/74985 *Tracking Issue for slice::array\_chunks*

Still stuck on the 0 thing.

TC: Shame it's stuck on this. Super useful function.

Poll from last time: https://hackmd.io/@rust-libs/SJWKrCToyx#nominated-rusttf74985-Tracking-Issue-for-slicearray_chunks

TC: Maybe we just resolve this in favor of doing a runtime panic. Then when on the lang side we add a `const match` feature for this, we deprecate this one and add the one we really want.

JoshT: Do we actually know of any case where someone does this on N with a runtime N!=0 check?

JoshT: Once we ship this as a runtime error, people can rely on it not being a compile time error.

David: I see the opposite as more 'two way': we can always add a warning. Almost as good, if not better, than an error.

Mara: +1. runtime check + lint

David: Yup, that's always been my preference.

Mara: we already have lints for similar cases, where we lint for things that will always panic, no?

David: The lint doesn't need to be perfect. If it catches basic cases, that's fine.

JoshT: I'd be happy, whatever is easiest to ship.

Amanieu: I don't think the compile time warning will be very useful. If the size is known in non-generic context, it doesn't add a lot of value. More likely to have bugs when you're forwarding some generic parameter. That's not something we have a warning for.

David: I agree that the lint isn't going to be super helpful. There's people interested in always improving diagnostics, but in general I don't think this is high on the list of worth putting effort in.

David: Wouldn't want to block stabilizing this.

Amanieu: So, start FCP? Current impl uses runtime panic

Amanieu to start FCP on tracking issue

### (nominated) rust.tf/134446 *Stabilize the \`cell\_update\` feature*

Mara: If this only accepts T: Copy anyway, Cell::get() before or afterwards is basically free (and no other thread can interfere anyway), so maybe just return nothing for clarity?

David: Fine either way

Amanieu: Returning nothing sounds good. need new FCP

TC: What's the advantage of returning nothing?

Mara: Avoiding confusion. might be unclear if we're giving the new or old value back.

David: The point of .update() is to make code more obvious.

Mara to (re)start FCP.

### (nominated) rust.tf/137198 *Rename \`cfg\_match!\` to \`cfg\_select!\`*

Mara: not convinced

JoshT: not convinced either. it feels closer to match than select. select works on multiple objects.

TC: Fine with `match`.  From a programming theory perspective, `cfg_cond` might be more correct.

JoshT: Non-lisp people might not like that.

Amanieu: How about we make everyone unhappy and call it `switch`.

Conclusion: FCP for `cfg_match`.

### (nominated) rust.tf/137487 *Stabilize \`assert\_matches\` and move it to \`core::macros\`*

Amanieu: put it in the crate root, like the others?

Josht: Breaks some ecosystem.

Amanieu: Has the ecosystem fixed itself?

David: Should format!() and assert_eq!() be in the same module? Shouldn't `format!()` be in `std::fmt`?

Amanieu: don't care much about modules nowadays. mostly relevant for rustdoc.

### (nominated) rust.tf/137654 *Debug impls of ExtractIf have inconsistent trait bounds*

David: We need you, Amanieu, for this one, as it needs changes in `hashbrown`.

Amanieu: Let's change it as proposed here.  I'm happy to make the change in `hashbrown`.

David: What we need is to remove the bound on the struct. https://docs.rs/hashbrown/0.15.2/hashbrown/hash_map/struct.ExtractIf.html

### (nominated) rust.tf/137738 *Make slice iterator constructors unstably const*

Sounds good.

David to respond.

### (waiting on team) rust.tf/136687 *Improve the documentation of \`Display\` and \`FromStr\`, and their interactions*

Josh: Propose skipping for now, it's a long discussion with context, let's go through a bunch of ACPs instead.

### (waiting on team) rust.tf/136912 *Add missing trait implementations for ScopedJoinHandle*

Josh to reply.

### (new change proposal) rust.tf/libs564 *Safe aligning of \`MaybeUninit\` mutable slices*

Approved. David to respond.

### (new change proposal) rust.tf/libs563 *Replace \`Debug::{key\_with, value\_with}\` with \`DebugMap::entry\_with\`*

Agreed to close. David to respond.

### (new change proposal) rust.tf/libs562 *Add ability to customize STARTUPINFO structure in Command API*

Waiting on ACP author to incorporate Josh's feedback.

### (new change proposal) rust.tf/libs561 *Add a function to convert \`&T\` to \`&MaybeUninit\<T\>\`*

We agree that `as_bytes` should have a `T: Freeze` bound, so we'd like to approve this conditional on that.

### (new change proposal) rust.tf/libs560 *Expose \`Arc::is\_unique\`*

Josh to respond with details.

(The meeting ended here.)

---

### (new change proposal) rust.tf/libs559 *Expose \`.set\_flags()\` on Posix \`CommandExt \`*

### (new change proposal) rust.tf/libs558 *Use \`TEB\` to get process information on Windows*

### (new change proposal) rust.tf/libs557 *Add \`iter::Peekable::next\_unpeek\`*

### (new change proposal) rust.tf/libs556 *fs::append*

### (new change proposal) rust.tf/libs555 *Add \`std::io::Seek\` instance for \`std::io::Take\<T\>\` when \`T: Seek\`*

### (stalled change proposal) rust.tf/libs333 *\`NonNull::{from\_ref, from\_mut}\`*

### (stalled change proposal) rust.tf/libs347 *Context reactor hook*

### (stalled change proposal) rust.tf/libs379 *Combine, an iterator adapter which statefully maps multiple input iterations to a single output iteration*

### (stalled change proposal) rust.tf/libs364 *ACP: Add {Box, Rc, Arc}::map and {Box, Rc, Arc}::try\_map*

### (stalled change proposal) rust.tf/libs181 *\`Cow::map\_borrowed\`, \`Cow::map\_owned\`, and \`Cow::map\`*

### (stalled change proposal) rust.tf/libs262 *Add infallible variant of RangeFrom::next()*

### (stalled change proposal) rust.tf/libs124 *Integrate \`Error\` trait with panic interfaces*

### (stalled change proposal) rust.tf/libs372 *ACP: env::home\_dir replacement*

### (stalled change proposal) rust.tf/libs295 *Create iterator function in std libs: split\_item\_mut()*

### (stalled change proposal) rust.tf/libs194 *Fix:Introduce an interface to expose the current \`Command\` captured env var logic*


_Generated by [fully-automatic-rust-libs-team-triage-meeting-agenda-generator](https://github.com/rust-lang/libs-team/tree/main/tools/agenda-generator)_
