---
# System prepended metadata

title: Libs-API Meeting 2024-01-09
tags: [Minutes, Libs Meetings]

---

# Libs-API Meeting 2024-01-09

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

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

## Agenda

- Triage
- Anything else?

## Triage

### FCPs

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

  - merge rust.tf/80437 *Tracking Issue for \`box\_into\_inner\`* - (1 checkboxes left)
  - merge rust.tf/52331 *Correcting Path::components on Redox* - (5 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\`* - (4 checkboxes left)
  - **merge rust.tf/117905 *revert stabilization of const\_intrinsic\_copy* - (3 checkboxes left)**
  - merge rust.tf/118799 *Stabilize single\-field offset\_of* - (3 checkboxes left)
  - merge rust.tf/115386 *PartialEq, PartialOrd: update and synchronize handling of transitive chains* - (3 checkboxes left)
  - merge rust.tf/99262 *Tracking Issue for \`io\_error\_downcast\`* - (4 checkboxes left)
  - merge rust.tf/106655 *Tracking Issue for \`#!\[feature(offset\_of)\]\`* - (0 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/76118 *Tracking Issue for \`array\_methods\`* - (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/113833 *\`std::error::Error\` \-\> Trait Implementations: lifetimes consistency improvement* - (3 checkboxes left)
  - merge rust.tf/115974 *Split core's PanicInfo and std's PanicInfo* - (3 checkboxes left)
  - merge rust.tf/101288 *Tracking Issue for \`{char, u8}::is\_ascii\_octdigit\`* - (3 checkboxes left)
  - merge rust.tf/117468 *Stabilize Wasm relaxed SIMD* - (5 checkboxes left)
  - merge rust.tf/101196 *Tracking Issue for \`Ready::into\_inner()\`* - (2 checkboxes left)

[Amanieu (11)](https://rfcbot.rs/fcp/Amanieu), [m-ou-se (12)](https://rfcbot.rs/fcp/m-ou-se), [joshtriplett (13)](https://rfcbot.rs/fcp/joshtriplett), [BurntSushi (9)](https://rfcbot.rs/fcp/BurntSushi), [dtolnay (4)](https://rfcbot.rs/fcp/dtolnay)

### (nominated) rust.tf/libs320 *Libs\-team RFC guidelines appear to be out of date*

David: Maybe just always start with ACP, and then we can ask for RFC when necessary.

Mara: Defining feature of RFC is the ability to have multiple threads of conversation on different parts of the document.

Amanieu: We don't have many libs RFCs. Starting with ACP always is fine.

David: Not saying that we shouldn't accept RFCs without ACP. just that as a guideline people can always start with ACP.

+1

### (nominated) rust.tf/96710 *Tracking Issue for \`round\_ties\_even\`*

8472: separate method for each rounding mode, or one method that would take an enum?

We already have `ceil` and `floor` and `trunc` (but these are not exactly rounding modes)

Mara: if we were designing from scratch, a function called `round` would round ties to even

Amanieu: current `round` matches the C `round` function (away from 0)

8472: real hardware supports 4-5 different modes

Amanieu: in hardware, I have only seen away-from-0 and to-even

Amanieu: IEEE only defines 5 rounding modes:

- toward inf -- `ceil`
- toward -inf -- `floor`
- toward 0 -- `trunc`
- to even -- "round_ties_to_even"
- away from 0 -- our current `round`

Amanieu/David: is there ever hardware support for a mode that rounds to nearest except rounds .5 toward -inf? No

Amanieu+David: "round_to_even" sounds like it applies to the entire interval, not just 0.5 midpoints. "round_ties_even" sounds fine.

Josh: "round_ties_to_even" is what ieee calls it.

David: The name is already long, and "to_" doesn't add any clarity.

Josh: Shorter name would be nice, but can't think of anything that isn't confusing.

Amanieu to start FCP.

### (nominated) rust.tf/117561 *Stabilize \`slice\_first\_last\_chunk\`*

Discussion of whether these can be stabilized now on slice without proactively reserving a name on arrays, for a future compile-time checked split

Mara: being able to call the current set of slice methods on arrays (with runtime-checked behavior) is useful

Josh: a future compile-time checked split on arrays should be under a different name

Josh to propose FCP

### (nominated) rust.tf/118806 *UnsafeCell::raw\_get: use raw pointer self type*

Doesn't break existing code. But does expose a feature to users that's not yet stable.

Lang concern?

Mara: Doesn't feel right to change this method. Similar (but not the same) as methods on Arc and Box not takign `self`.

Josh: We should wait to see what decision gets made on the arbitrary_self_types RFC: https://github.com/rust-lang/rfcs/pull/3519

No consensus

Amanieu:

- Option 1: keep `raw_get` as an associated function only, not callable as method
- Option 2: accept PR with `impl UnsafeCell<T> { fn raw_get(self: *const Self) }` (blocked on lang team)
- Option 3: `impl *const UnsafeCell<T> { fn raw_get(self) }`

Mara: this change is not that important. it could be a example/guideline on how to use the arbitrary_self_types feature, but we don't know what the right guidelines are yet.

David: Would you expect such best practices to come from the community after the RFC is stabilized? Or as a precondition before stabilizing that feature?

Mara: Not sure. Doesn't matter much to me personally. We can consider this change once there is a sense of 'best practices' for the arbitrary self types feature (whether stable or not).

### (new change proposal) rust.tf/libs321 *as\_(mut\_)ptr and as\_(mut\_)slice methods on raw array pointers*

Amanieu: also related to arbitrary_self_types

8472 to respond

### (waiting on team) rust.tf/118799 *Stabilize single\-field offset\_of*

Already in FCP

### (new change proposal) rust.tf/libs322 *\`AssertThreadSafe\` (name TBD) – a more general API for lifting conservative \`!Send\` or \`!Sync\` implementations*

{discussion}

Mara: Would like some time to read through the details and consider alternatives.

Deferred to next week.


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

as an item, it can't use const generic arguments in the future

static_assert vs const_assert?

static is what they call it in other languages, but const is more consistent with the rest of Rust

{discussion on static_assert in impl blocks}

`const { assert!(..) }` could be a suggestion when using `const_assert!(...)` referring to a const generic argument.

Josh: if `const { .. }` works at top level, would we still want `const_assert!(..)` to exist?

Mara: I think no

Amanieu: `const { .. }` at top level seems questionable.

8472: `const { .. }` at top level would allow for bunch of calculation to happen before the assert(s) at the end.

```rust=
const {
    let a = 1;
    let b = a * 2;
    assert!(b > a);
    assert!(b < 100);
}
```

Mara: Like a unit test.



### (new change proposal) rust.tf/libs323 *Add \`ptr::fn\_addr\_eq\` to compare functions pointers.*

Urgau: proposed a lint that warns against function pointer comparisons. discussion in lang team. resulted in consensus from t-lang: add fn_addr_eq so the lint can suggest an alternative.

Mara: So the point of this API is to have something to suggest in the lint

Urgau: yes

Josh: And we can't use ptr::addr_eq because it has a different signature

Mara: existing ptr::addr_eq accepts two different pointer types. Should this accept two different function pointer types?

{rip jitsi. got disconnected... can't reconnect..}

### (new change proposal) rust.tf/libs326 *ACP: Add \`OsStr::display\` (similar to \`Path::display\`)*


### (stalled change proposal) rust.tf/libs120 *ACP: Uplift \`iter::repeat\_n\` from itertools*

### (stalled change proposal) rust.tf/libs164 *Add methods for use cases that \`align\_to\` does not cover*

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

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

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


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