# Libs-API Meeting 2023-12-05 ###### tags: `Libs Meetings` `Minutes` **Meeting Link**: https://meet.jit.si/rust-libs-meeting-crxoz2at8hiccp7b3ixf89qgxfymlbwr **Attendees**: Amanieu, David, Josh Triplett, Mara, The 8472, Urgau ## Agenda - Triage - Anything else? ## Triage ### FCPs 18 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/117824 *Stabilize \`ptr::{from\_ref, from\_mut}\`* - (3 checkboxes left) - merge rust.tf/66359 *Tracking issue for \`any::type\_name\_of\_val\`* - (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) [m-ou-se (10)](https://rfcbot.rs/fcp/m-ou-se), [Amanieu (12)](https://rfcbot.rs/fcp/Amanieu),[dtolnay (3)](https://rfcbot.rs/fcp/dtolnay), [joshtriplett (12)](https://rfcbot.rs/fcp/joshtriplett), [BurntSushi (7)](https://rfcbot.rs/fcp/BurntSushi) ### (nominated) rust.tf/79024 *Tracking Issue for #!\[feature(async\_iterator)\]* Discussed last week. Yosh and TC asked for time to write down their thoughts/arguments. Waiting on that. ### (nominated) rust.tf/86026 *Tracking Issue for \`Bound::map\`* Mara: Does this also mean we need and_then, is_*, etc. etc.? Amanieu: Not and_then. Mara: True. But .copied() etc. would make sense. Amanieu: FCP for map? Mara: Fine with me. David: Would be good to quote the use case provided in the original PR. - https://github.com/rust-lang/rust/pull/83646#issuecomment-847099320 Amanieu to start FCP. ### (nominated) rust.tf/105135 *Tracking Issue for \`file\_create\_new\`* FCP finished. Should be merged? Just waiting on stabilization PR. Removed nominated label. ### (nominated) rust.tf/115386 *PartialEq: handle longer transitive chains* Last meeting resulted in: https://github.com/rust-lang/rust/pull/115386#issuecomment-1821347832 Ralf responded to that: > Arguably libraries shouldn't "connect" two outside-the-crate types by equality that are not already connected. David: Ralf is saying that you can't have a JsonValue with PartialEq for bool and f32, in case we add a `==` for bool an f32. Mara: Do we really want to introduce rules that aren't and won't be followed? David: Putting your type on the right hand side of `==` and someone else's type on the left in a PartialEq impl already results in issues (unrelated to PartialEq chains): - https://github.com/nushell/nushell/pull/11205 - https://github.com/serde-rs/json/issues/380 David: `a == b` does type coercion of the rhs if there is only one fitting impl based on the type of the lhs, so an extra impl existing can break unrelated code that otherwise compiles. David: So, I've come to think that your own type should only ever go on the left hand side of `PartialEq`. Josh: Seems like *that* issue is a bit of a side effect of a "hack" in the language that does coercions only on one side of the `==`. Would be a painful usability issue for libraries if they can only allow TheirType == String but not String == TheirType. Mara: Wouldn't it also break ralf's rule if we only have `JsonValue == f32` and `JsonValue == bool`? Not technically, the rule talks about `a == b && b == c`, not `a == b && c == b`. But is that excluding `c == b` on purpose? Mara: Let's ask Ralf on his thoughts on that? David: Agree, let's keep that conversation going. Mara posted a comment asking about swapped operands in the transitive rule. David to comment about the other reasons not to implemement PartialEq in both directions. ### (nominated) rust.tf/117758 *Add lint against ambiguous wide pointer comparisons* Specific question for libs-api in https://github.com/rust-lang/rust/pull/117758#issuecomment-1823177272 Mara: for slices, it should suggest both eq and addr_eq, but for `*const dyn`, it should suggest only addr_eq. Amanieu: Related, i think we should just have `==` on `*const dyn` ignore metadata. but that's not happning soon, it seems. Amanieu: happy with these suggestions. Mara: +1 Mara left a comment. ### (nominated) rust.tf/117905 *revert stabilization of const\_intrinsic\_copy* Mara: Alternative: don't change signature, but panic in const eval. The 8472: Dead branches might still result in compile errors. Amanieu: That alternative is just a 'public relations' thing, to avoid changing what's stable. So people can't point at us "you're breaking stable" Mara: It's "only" been stable for a year. All code that breaks was written within the last year. Not as bad as breaking 10 year old code. https://github.com/rust-lang/rust/pull/118324 would detect this UB at const eval time. Breakage seems small enough to accept unstabilization. Amanieu to reply and propose FCP. ### (nominated) rust.tf/118108 *PartialOrd: transitivity and duality are required only if the corresponding impls exist* Mara: We were waiting on resolving the PartialEq discussion. Amanieu: Fine to merge this now? Mara: Sure, we can FCP now, but we'd have an FCP again when applying the transitive rule fix later. Mara left a comment asking ralf whether he prefers an FCP now or only after resolving the chaining issue. ### (FCP) rust.tf/106655 *Tracking Issue for \`#!\[feature(offset\_of)\]\`* - (0 checkboxes left) Proposal to only accept single fields, not nested fields. Amanieu: I use nested fields. Mara: Happy with stabilizing nested fields too. The 8472: Problem is the syntax for fields of enum variants. Josh: We can stabilize nested fields now, but punt on enums. The 8472: That might restrict some of our syntax options for enums. Amanieu: happy to go forward with single fields. Amanieu: Why is this under libs-api? Mara: It's a macro in core.. The 8472: Syntax is up to libs-api. Amanieu to reply. ### (new change proposal) rust.tf/libs303 *\[ACP\] Impl \`iter::Sum\` (and \`iter::Product\`) for \`num::Saturating\<u\*\>\`* ### (new change proposal) rust.tf/libs304 *ACP: Avoid the common mistake of \`for x in 0u8..\`* ### (new change proposal) rust.tf/libs305 *ACP: Impl From\<&T\> for &\[T\]* ### (new change proposal) rust.tf/libs308 *ACP: Introduce checked\_split\_at{,\_mut} methods* ### (new change proposal) rust.tf/libs309 *Add std::io::Write adapter for Hashers* ### (stalled change proposal) rust.tf/libs131 *Add \`std::fs::rename\_noreplace\`* ### (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)_