---
# System prepended metadata

title: Libs-API Meeting 2025-04-15
tags: [Minutes, Libs Meetings]

---

# Libs-API Meeting 2025-04-15

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

**Meeting Link**: https://meet.jit.si/rust-libs-meeting-crxoz2at8hiccp7b3ixf89qgxfymlbwr
**Attendees**: Amanieu, Mara, David, JoshT, The 8472, Chris Denton

## 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/122661 *Change the desugaring of \`assert!\` for better error output* - (3 checkboxes left)
  - merge rust.tf/137992 *Stabilise \`os\_string\_pathbuf\_leak\`* - (4 checkboxes left)
  - merge rust.tf/115585 *Tracking issue for \`cfg\_match\`* - (2 checkboxes left)
  - merge rust.tf/138016 *Added \`Clone\` implementation for \`ChunkBy\`* - (3 checkboxes left)
  - merge rust.tf/111137 *Tracking Issue for AVX512 intrinsics* - (3 checkboxes left)
  - merge rust.tf/139624 *Don't allow flattened format\_args in const.* - (5 checkboxes left)

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

### (nominated) rust.tf/libs337 *Add \`((un)checked\_)exact\_div\` methods for integer types*

```rust
pub const fn checked_exact_div(self, rhs: Self) -> Option<Self>;
pub const fn exact_div(self, rhs: Self) -> Self;
pub unsafe const fn unchecked_exact_div(self, rhs: Self) -> Self;
```

Amanieu: excited about unchecked_exact_div

Mara: all three seem useful to me. Seems fine to accept this.

David: what optimizations does the unchecked one enable?

Amanieu: https://github.com/rust-lang/libs-team/issues/337#issuecomment-2799431533

David: So, divide by two and then indexing an [u16]?

Amanieu: yup

David: +1 seems great

Amanieu: not sure about exact_div, which panics. questionable.

Mara: leave that one as an open question?

Amanieu: or have exact_div return an Option, remove checked_exact_div.

Amanieu: we can defer that till later.

Accepted

### (nominated) rust.tf/libs547 *Change ACP process to track unimplemented ACPs*

Discussed in last meeting, Amanieu to reply.

### (nominated) rust.tf/130703 *Tracking Issue for secure random data generation in \`std\`*

Still nominated from last week.

Amanieu: Anything new to discuss?

JoshT: needs more design discussion

Mara: drop nomination, renominate when there's a concrete proposal?

JoshT: probably best

dropped label.

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

Discussed in last meeting, Amanieu to reply.

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

- Hashbrown PR: https://github.com/rust-lang/hashbrown/pull/616
- Standard library PR: https://github.com/rust-lang/rust/pull/139764 (requires hashbrown release + update)
- Beta revert: https://github.com/rust-lang/rust/pull/139765

Amanieu: Still need to look at it.

David: we can also revert. no rush.

### (nominated) rust.tf/139224 *fix(test): Expose '\-\-no\-capture' in favor of \`\-\-nocapture\`*

Mara: Seems like a good improvement. Doesn't result in any warnings for the deprecated one. But needs FCP.

JoshT: +1, this follows common conventions for multi-word command-line options.

Amanieu: delegate all authority to t-testing-devex?

Mara: not sure. did we always vote the same as their FCP?

David: how many FCPs? not many? let's keep it.

Amanieu: previous example: deprecate --logfile

David: we're not stalling them. FCP went through quickly.

Amanieu started FCP

### (nominated) rust.tf/139624 *Don't allow flattened format\_args in const.*

FCP ongoing.

### (nominated) rust.tf/139865 *Stabilize proc\_macro::Span::{start,end,line,column,file,local\_file}.*

David: I think this is ready for FCP

Amanieu: `local_file` as name?

Mara: `file_as_it_exists_on_the_local_file_system` was a bit long. `local_file` is the name in rustc.

Amanieu: why an `Option`?

Mara: Could come from command line args, for example. Or macro expansion.

Amanieu: Split off file+local_file to a separate stabilization PR? Might be a bit early for those.

Amanieu: not convinced about the name `local_file`

David: We should expose `byte_offset` if we expose a way to get the local_file.

David: Might be relevant to get a comment before the field, etc.

Conclusion: don't stabilize file+local_file for now. Do that separate together with byte_offset (and byte_length)?

https://github.com/rust-lang/rust/pull/139865

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

Amanieu and Josh to bring a proposal back to the team.

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

### (waiting on team) rust.tf/139535 *Implement \`Default\` for raw pointers*



### (new change proposal) rust.tf/libs572 *Add \`Cell::get\` for \`Rc\`\-like shallow\-copying types*

For Option-in-Cell, you can already easily do .take(). For `Cell<Rc>`, you can't do that.

We can implement Clone, or allow .get(), or both, for Cell-of-Rc.

Specific for Rc? Or with some unsafe marker trait?

Amanieu: Inclined to reject. Seems complicated, all this trait business. (Trait for Cell::get)

Amanieu: `Cell` is in `core`, `Rc` is in `alloc`.

David: CellGet trait seems fine to me. "no funny business" trait for Clone.

Mara: Trait would be similar to the 'cheap to clone' trait?

JoshT: Might also implement the "no funny business" trait for String, even though it's not cheap to clone. But do we want to do that if we're supporting `.get()` rather than `.clone()`?

Mara: That allocates, so calls user code in the allocator, which might touch the cell.

JoshT: Implementing the allocator is unsafe.

Amanieu: This is not part of the allocator safety contract.

Sealed/private trait?

We could start with sealed. can always expose it later.

Amanieu: Motivation only mentions Option and Weak, which both implement Default.

Mara: Then we can just require `T: Default` on a new method.

The 8472: We should ask if that suffices.

Last comment was 3 hours ago. Discussion ongoing.

Amanieu to post a reply.

### (new change proposal) rust.tf/libs570 *actually checked bitshifts*

Discussed in last meeting, Amanieu to reply.

### (new change proposal) rust.tf/libs569 *ACP: abstract \`BufReader::peek\`*

Amanieu: David had a counterproposal? David, do you remember?

David: That was for a different ACP. http://rust.tf/libs557



### (new change proposal) rust.tf/libs568 *Implement \`Read\` and \`Write\` traits for \`BorrowedFd\` and \`OwnedFd\`*

We don't have a consensus to implement `Read` and `Write` on `OwnedFd` or `BorrowedFd`; Josh and 8472 disagree about this.

We have consensus to implement a trait that converts `BorrowedFd<'a>` to `&'a File` or similar.

We should also provide an inherent method on `BorrowedFd` that supports turbofishing the return type.

The 8472 to reply.

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

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

Approving `peek_slot` counterproposal

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

Approved.

Josh noticed that `get_ref` allows I/O on many kinds of underlying readers (such as `File`). Documentation PR to address that: https://github.com/rust-lang/rust/pull/139877

### (new change proposal) rust.tf/libs553 *Add a "shrink\-if\-excessive" API to \`Vec\`*

```
Vec::calc_capacity_growth(&self, reserve: usize) -> usize
```

The 8472 to ask whether convenience or exposing growth strategy will work for them.

### (new change proposal) rust.tf/libs552 *Provider\-style API for \`Context\`*

Nominated for wg-async

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

We'd like to see this added to Box, UniqueRc, UniqueArc, instead. And possibly a `map_ref` function taking `Fn(&T) -> U` for the opportunistic optimization.

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

### (stalled change proposal) rust.tf/libs366 *Implementing UnixSocketExt traits for solaris/illumos ; starting with the unix\_socket\_exclbind feature*

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

### (stalled change proposal) rust.tf/libs155 *Arbitrary alternate flags in \`std::fmt::Formatter\`*

Agree with Mara's rejection of this; closing

### (stalled change proposal) rust.tf/libs325 *Add macro \`static\_assert\` to perform compile\-time assertion checking*

### (stalled change proposal) rust.tf/libs350 *std::slice::from\_raw\_parts alternative that would accept a null pointer if len == 0 by returning an empty slice*

The 8472 to reply.

### (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/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)_