---
# System prepended metadata

title: Libs-API Meeting 2024-11-19
tags: [Minutes, Libs Meetings]

---

---
date: 2024-11-19
url: https://hackmd.io/OPtt-kGFQuaU8HmMHjZupg
---

# Libs-API Meeting 2024-11-19

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

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

## Agenda

- Triage
- Anything else?

## Triage

### FCPs

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

  - merge rust.tf/97601 *Tracking Issue for map\_many\_mut* - (3 checkboxes left)
  - merge rust.tf/80437 *Tracking Issue for \`box\_into\_inner\`* - (1 checkboxes left)
  - merge rust.tf/106418 *Implement \`PartialOrd\` and \`Ord\` for \`Discriminant\`* - (2 checkboxes left)
  - merge rust.tf/131713 *Stabilize \`const\_maybe\_uninit\_write\`* - (3 checkboxes left)
  - merge rust.tf/120141 *Tracking Issue for enum access in offset\_of* - (6 checkboxes left)
  - merge rust.tf/130191 *\[discussion\] \`ErrorKind::CrossesDevices\` from \`io\_error\_more\`* - (3 checkboxes left)
  - merge rust.tf/130190 *\[discussion\] \`ErrorKind::FilesystemQuotaExceeded\` from \`io\_error\_more\`* - (3 checkboxes left)
  - merge rust.tf/131784 *Stabilize unsigned and float variants of \`num\_midpoint\` feature* - (3 checkboxes left)
  - merge rust.tf/129322 *Tracking Issue for \`ptr::fn\_addr\_eq\`* - (3 checkboxes left)
  - merge rust.tf/130192 *\[discussion\] \`ErrorKind::InvalidFilename\` from \`io\_error\_more\`* - (3 checkboxes left)
  - merge rust.tf/132187 *Add Extend impls for tuples of arity 1 through 12* - (3 checkboxes left)
  - merge rust.tf/129375 *Tracking Issue for unbounded\_shifts* - (3 checkboxes left)
  - merge rust.tf/132515 *Fix and undeprecate home\_dir()* - (3 checkboxes left)
  - merge rust.tf/132431 *From iterator more tuples* - (3 checkboxes left)
  - merge rust.tf/93235 *Tracking Issue for \`const\_nonnull\_new\`* - (3 checkboxes left)
  - merge rust.tf/127534 *feat(core): impl Step for NonZero\<u\*\>* - (3 checkboxes left)

[scottmcm (2)](https://rfcbot.rs/fcp/scottmcm), [dtolnay (1)](https://rfcbot.rs/fcp/dtolnay), [tmandry (1)](https://rfcbot.rs/fcp/tmandry), [m-ou-se (13)](https://rfcbot.rs/fcp/m-ou-se), [pnkfelix (1)](https://rfcbot.rs/fcp/pnkfelix), [joshtriplett (6)](https://rfcbot.rs/fcp/joshtriplett), [Amanieu (8)](https://rfcbot.rs/fcp/Amanieu), [nikomatsakis (2)](https://rfcbot.rs/fcp/nikomatsakis), [BurntSushi (14)](https://rfcbot.rs/fcp/BurntSushi)

### (nominated) rust.tf/43244 *Tracking issue for Vec::extract\_if and LinkedList::extract\_if*

The 8472: Would like the Vec variant to also take a range as extra argument. Not sure if everyone agrees.

Mara: Sounds fine. For the usual case you just have to add `.., `.

The 8472: Could be implemented on subranges of btreemap.

Amanieu: relevant tracking issues:
  - HashMap::extract_if: https://github.com/rust-lang/rust/issues/59618
  - BTreeMap::extract_if: https://github.com/rust-lang/rust/issues/70530

Amanieu: We can defer the stabilization of the method on maps.

David: Sets don't have a range_mut, because you can't mutate the keys.

Amanieu: BTree* should take a range, Hash* not.

David: Okay. On board with all of them. With or without the range.

JoshT: Design of this method on maps shouldn't block adding it to Vec and LinkedList.

The 8472: Adding a range to Vec should be easy.

Mara: So, add range to the Vec method and then start FCP?

JoshT: Also a naming question.

Mara: Oh, I thought we converged to extract_if.

David: Happy with extract_if.

David: Could also be method on the Drain type, so a second function call.

Amanieu: ExtractIf doesn't consume on drop

David: It'd take Drain by value.

Amanieu/The 8472: Confusing.

Mara: Kind of feels like .drain(..).dont_actually_drain(). Confusing that the effect of .drain() is partially cancelled.

The 8472: There is a .keep_rest() method on Drain already.

JoshT: That's very explicit though.

The 8472: Could work with .drain(..).extract_only(..)

David: .drain(..).only_if(|| ...)

JoshT: Prefer extract_if. Might not object if someone also suggests Drain::extract_only as a separate thing.

David: sgtm.

JoshT: naming. drain_if

The 8472: Issue is that the behaviour is different on Drop. Drain drains on drop. That's why I renamed it.

JoshT: Either name is fine.

Amanieu: Happy with extract_if.

Consensus: extract_if, but add range to Vec version. No stabilization for the map version yet.

David: Does the range type appear in the type of the ExtractIf type?

Amanieu: No, we don't do that for Drain either. Range is only used to calculate bounds, the type isn't relevant.

David: Makes sense for Vec. But for BTreeMap it could go either way.

Mara: Good reason to not stabilize the method on maps yet.

[discussion about [`extract_mapped`](https://github.com/rust-lang/rust/issues/43244#issuecomment-1683805752) which is not covered by the current API]

David: std::vec::Cursor that exposes filtering and removal (and possibly insertion)?

Amanieu: still need Vec::extract_if if Cursor exists?

8472: ExtractIf is usable as Iterator while Cursor would not be

### (impromptu nominated) rust.tf/101122 *Tracking Issue for vec::Drain{,Filter}::keep_rest*

First unresolved question about DrainFilter no longer relevant

Second unresolved question:

Amanieu: propose deleting `keep_rest`, users should use `extract_if` if they want to keep rest after iteration

Defer until `extract_if` is stable and in use, to see whether a use case for `keep_rest` remains

### (nominated) rust.tf/86319 *Tracking Issue for Path::file\_prefix*

Good enough. Let's FCP.

### (nominated) rust.tf/95892 *Tracking Issue for \`sub\_ptr\` (feature \`ptr\_sub\_ptr\`)*

Not actionable in this meeting right now.

### (nominated) rust.tf/97601 *Tracking Issue for map\_many\_mut*

Waiting on checkboxes

### (nominated) rust.tf/104642 *Tracking Issue for get\_many\_mut*

Recall that we asked for support for ranges (not implemented yet)

Error type: agreement on exposing a 2-value exhaustive enum with no accompanying information about index or len

Amanieu: we had proposed accepting an array of ranges, all of which would need to be the same range type. should we consider accepting a tuple of ranges, allowing different range types?

Josh: I am open to a separate method that does tuples, but let's stabilize this one sooner with just array of ranges

Amanieu: I think we can decide now to rule out supporting tuple of ranges

8472: if it may be possible to adapt later to support a tuple of ranges as a non-breaking change, should we really rule it out?

### (nominated) rust.tf/133089 *Stabilize noop\_waker*

Ready for FCP

### (nominated) rust.tf/105877 *\`impl PartialEq\<{str,String}\> for {Path,PathBuf}\` (and reversed)*

### (nominated) rust.tf/123947 *Add vec\_deque::Iter::as\_slices and friends*

### (nominated) rust.tf/127753 *Implement \`Clone\` for \`BufReader\`, \`BufWriter\` and \`LineWriter\`*

### (nominated) rust.tf/128375 *Derive Copy on core::ffi::c\_str types*

### (nominated) rust.tf/129322 *Tracking Issue for \`ptr::fn\_addr\_eq\`*

### (nominated) rust.tf/131784 *Stabilize unsigned and float variants of \`num\_midpoint\` feature*

### (new change proposal) rust.tf/libs489 *ACP: \`#\[derive(Debug)\]\` on unions to print \`MyUnion { ... }\`*

Reject in favor of #334

Josh to reply to #334

### (new change proposal) rust.tf/libs488 *Phantom variance ZSTs*

### (new change proposal) rust.tf/libs487 *Path::is\_trivial*

### (new change proposal) rust.tf/libs486 *OsString::truncate*

### (new change proposal) rust.tf/libs485 *Add \`get\`, \`set\` and \`replace\` methods to \`Mutex\` and \`RwLock\`*

### (new change proposal) rust.tf/libs484 *Support \`vec!\[const { expr }; N\]\` syntax for creating a \`Vec\` of non\-\`Clone\` values*

TC: This has some similarity to what I filed here:

https://github.com/rust-lang/rust/issues/133081

```rust
assert_eq!(const { 0 }, 0);
// The above produces the same error as:
vec![const { 0 }; 0];
```

### (new change proposal) rust.tf/libs483 *\`Box::new\_from\_ref\` for making a \`Box\<T\>\` from a \`&T\` where \`T: CloneToUninit + ?Sized\` (and \`Rc\` and \`Arc\`)*

### (new change proposal) rust.tf/libs482 *Docs \- type guarantees update*

### (new change proposal) rust.tf/libs478 *\`file\_absolute!\` macro*

### (new change proposal) rust.tf/libs476 *Parse IPv6 zone identifiers*


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

### (stalled change proposal) rust.tf/libs210 *Add associated consts to f32, f64 for mathematical constants*

### (stalled change proposal) rust.tf/libs360 *make FromResidual #\[fundamental\]*

### (stalled change proposal) rust.tf/libs201 *ACP: Provide \`TryFrom\<&\[T\]\>\` implementation for \`&\[\[T; N\]\]\`*

### (stalled change proposal) rust.tf/libs184 *Add \`setsid\` method to \`CommandExt\` trait*

### (stalled change proposal) rust.tf/libs111 *Restructure ptr\_metadata to minimal support*

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

### (stalled change proposal) rust.tf/libs207 *\`parse\_line\` method for \`Stdin\`*

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

### (stalled change proposal) rust.tf/libs337 *Add \`(checked\_)norem\_div\` methods for integer types*


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