--- date: 2025-01-14 url: https://hackmd.io/3WaYvWxCQJ-NxaAHWKgkEw --- # Libs-API Meeting 2025-01-14 ###### tags: `Libs Meetings` `Minutes` **Meeting Link**: https://meet.jit.si/rust-libs-meeting-crxoz2at8hiccp7b3ixf89qgxfymlbwr **Attendees**: Amanieu, Mara, David, The 8472, Chris Denton, TC ## Agenda - Triage - Anything else? ## Triage ### FCPs 19 rust-lang/rust T-libs-api FCPs - merge rust.tf/80437 *Tracking Issue for \`box\_into\_inner\`* - (1 checkboxes left) - merge rust.tf/120287 *Tracking Issue for \`NonZero\*::count\_ones\`* - (3 checkboxes left) - merge rust.tf/106418 *Implement \`PartialOrd\` and \`Ord\` for \`Discriminant\`* - (2 checkboxes left) - merge rust.tf/134016 *Stabilize \`const\_is\_char\_boundary\` and \`const\_str\_split\_at\`.* - (3 checkboxes left) - merge rust.tf/120141 *Tracking Issue for enum access in offset\_of* - (6 checkboxes left) - merge rust.tf/134679 *Windows: remove readonly files* - (3 checkboxes left) - merge rust.tf/130192 *\[discussion\] \`ErrorKind::InvalidFilename\` from \`io\_error\_more\`* - (3 checkboxes left) - merge rust.tf/129375 *Tracking Issue for unbounded\_shifts* - (3 checkboxes left) - merge rust.tf/127534 *feat(core): impl Step for NonZero\<u\*\>* - (3 checkboxes left) - merge rust.tf/59618 *Tracking issue for HashMap::extract\_if and HashSet::extract\_if* - (3 checkboxes left) - merge rust.tf/130801 *Tracking Issue for \`const\_mut\_cursor\`* - (3 checkboxes left) - merge rust.tf/129041 *Tracking Issue for \`const\_vec\_string\_slice\`* - (3 checkboxes left) - merge rust.tf/97601 *Tracking Issue for map\_many\_mut* - (3 checkboxes left) - merge rust.tf/134340 *Stabilize \`num\_midpoint\_signed\` feature* - (3 checkboxes left) - merge rust.tf/103806 *Tracking Issue for \`string\_extend\_from\_within\`* - (3 checkboxes left) - merge rust.tf/131923 *Derive \`Copy\` and \`Hash\` for \`IntErrorKind\`* - (3 checkboxes left) - merge rust.tf/134272 *make rustc\_encodable\_decodable feature properly unstable* - (3 checkboxes left) - merge rust.tf/134995 *Stabilize const\_slice\_flatten* - (3 checkboxes left) - merge rust.tf/135414 *Stabilize \`const\_black\_box\`* - (5 checkboxes left) [scottmcm (3)](https://rfcbot.rs/fcp/scottmcm), [BurntSushi (17)](https://rfcbot.rs/fcp/BurntSushi), [nikomatsakis (2)](https://rfcbot.rs/fcp/nikomatsakis), [tmandry (2)](https://rfcbot.rs/fcp/tmandry), [pnkfelix (1)](https://rfcbot.rs/fcp/pnkfelix), [Amanieu (8)](https://rfcbot.rs/fcp/Amanieu), [dtolnay (1)](https://rfcbot.rs/fcp/dtolnay), [joshtriplett (11)](https://rfcbot.rs/fcp/joshtriplett), [m-ou-se (14)](https://rfcbot.rs/fcp/m-ou-se) ### (nominated) rust.tf/127154 *Tracking Issue for anonymous pipe API* open question: which module to put this in mostly weak opinions Mara: pipe::pipe() and pipe::PipeReader etc. is repetitive. slightly prefer io David: +1 JoshT not present in the meeting, but said no preference in the github thread Amanieu: prefer keeping it in std::pipe. Doesn't fit with what's currently in std::io Amanieu: modules are mostly useful for documentation, to have an overview of things that belong together. David: Do you import `std::mem` or import `std::mem::thing`? For pipe, importing `pipe()` is a bit short, but `pipe::pipe()` is unappealing. `io::pipe()` looks fine. Mara: docs would be on `pipe()`, the types are just helpers basically. Amanieu: fair The 8472: We might want to have docs on how to use pipes in other places consensus: std::io Mara left a comment. ### (nominated) rust.tf/127292 *Tracking Issue for PathBuf::add\_extension and Path::with\_added\_extension* Mara: I feel that push/join are specific to handling the behaviour of adding/removing `/` etc., which is not what the extension methods do. So mildly against the proposed name change, but wouldn't object. David: This does mirror that behaviour for `.`. Mara: That's fair. The 8472: What if one adds an extension to a path with a trailing slash? It's not in the docs. - Answer: "/directory/".with_added_extension("rs") is "/directory.rs" Amanieu: We did have a discussion on the name before, in the ACP. ``` let mut p = PathBuf::from("foo/bar/"); dbg!(&p); dbg!(p.with_added_extension(".bar")); ``` prints ``` [src/main.rs:7:5] &p = "foo/bar/" [src/main.rs:8:5] p.with_added_extension(".bar") = "foo/bar..bar" ``` The 8472: I don't think the edge cases are worked out yet, maybe we shouldn't stabilize it. Chris: Trailing `/` is ignored in normalization David: Is there an api for pushing onto the filename without adding a `.`? Join fits better, because that includes adding the `.` intelligently. David: push naming extends better to adding without a `.` if we add that later. David: fine with either name Amanieu: let's go with the original name David: sounds good consensus Amanieu to reply. ### (nominated) rust.tf/127527 *Tracking Issue for \`once\_wait\`* No reason to not also include wait_force FCP proposed. ### (nominated) rust.tf/131923 *Derive \`Copy\` and \`Hash\` for \`IntErrorKind\`* Proposed FCP ### (nominated) rust.tf/133908 *Tracking Issue for Wasm floating point instructions not in \`core\`* Amanieu: The regular float methods might work in core at some point David: How far in the future? Amanieu: Few months. Blocked on compiler-builtin support. Have to ask trevor. Non-wasm platforms need a softfloat implementation. David: If there's a crate that provides these, that's enough to cover a few months. Amanieu: wasm inline asm isn't stable, so not really possible. The 8472: You could import the functions from the wasm host. David: I think it's fine to include these in core::arch then Amanieu: Looks like we can have these float ops in core in a month. Fine to wait then. Mara: Fine with me to add them Amanieu: Let's defer for a month. No urgency consensus: wait a bit. ### (nominated) rust.tf/134283 *fix(libtest): Deprecate '\-\-logfile'* Ed page commented with clarifications the format of the text going in to the log file is undocumented Amanieu: happy to deprecate, since the format is undocumented. Amanieu will start FCP to deprecate. ### (waiting on team) rust.tf/133829 *AtomicT::fetch\_update\_infallible* we did suggestion for `update` and `try_update` and (deprecating `fetch_update`) before amanieu to comment, clarifying that that's what we want (as unstable) for now. return type: return old value? return both old and new (as tuple, or struct)? return nothing? Mara: not returning something from update() might be okay, but from try_update you do want the results. might be fine to just try out in the unstable period. ### (waiting on team) rust.tf/134272 *make rustc\_encodable\_decodable feature properly unstable* clicked checkbox. ### (waiting on team) rust.tf/134679 *Windows: remove readonly files* in FCP now. ### (waiting on team) rust.tf/135415 *Add \`File already exists\` error doc to \`hard\_link\` function* Needs a newline! Amanieu: Agree that hard_link fails if a file already exists? That's the current behaviour on all platforms. FCP ### (new change proposal) rust.tf/libs520 *Add out of the box support for mapping custom error types that implement \`std::error::Error' to \`Box\<dyn Error\>\`* The motivation is not good because `?` by itself works there. ### (new change proposal) rust.tf/libs513 *Implement IntoIterator for tuples with values which are IntoIterator themselves* Discussed in a previous week. Closing. ### (new change proposal) rust.tf/libs509 *Mark \`OnceState::poison\` as \`pub\`* David to comment with analysis of another use case. ### (new change proposal) rust.tf/libs508 *impl\<A\> Allocator for &mut A* Amanieu to ask for a better code example. ### (new change proposal) rust.tf/libs506 *In\-place \`String::replace\_first\` and \`String::replace\_last\`* Needs opinion from BurntSushi. ### (new change proposal) rust.tf/libs505 *A datatype representing an allocation* Discussed previously, we asked for some additional feedback but can close it now. The 8472 to leave a closing comment. ### (new change proposal) rust.tf/libs504 *Implement Read and Write for Arc\<T\> for types where &T implements Read and Write, \*and\* it is safe to do so.* Amanieu left a comment asking for an example program that would be helped by this. ### (new change proposal) rust.tf/libs501 *ACP: Add floating point representation conversions* Amanieu left a comment to the effect that maybe separate extraction methods would be better. ### (new change proposal) rust.tf/libs495 *add an \`extract\` macro which extracts values matched in a pattern* The 8472 to close. ### (new change proposal) rust.tf/libs487 *Path::is\_trivial* The hard part was the name. David proposed `is_monotonic`. That's the final answer. He'll write it up and accept the ACP. ### (stalled change proposal) rust.tf/libs314 *Add security\_attributes() to windows::OpenOptionsExt* The 8472 to ask about details how using OpenOptions is worth it in conjunction with all the low-level code needed. ### (stalled change proposal) rust.tf/libs344 *ACP: Add \`std::string::String::replace\_and\_count\` and/or \`replace\_with\`* ### (stalled change proposal) rust.tf/libs336 *Add \`or\_try\_\*\` variants for HashMap and BTreeMap Entry APIs* ### (stalled change proposal) rust.tf/libs210 *Add associated consts to f32, f64 for mathematical constants* ### (stalled change proposal) rust.tf/libs364 *ACP: Add {Box, Rc, Arc}::map and {Box, Rc, Arc}::try\_map* ### (stalled change proposal) rust.tf/libs192 *Report allocation errors through the panic handler* ### (stalled change proposal) rust.tf/libs155 *Arbitrary alternate flags in \`std::fmt::Formatter\`* ### (stalled change proposal) rust.tf/libs186 *Implementing flatten for \`Option\<&Option\<T\>\>\` and \`Option\<&mut Option\<T\>\>\`* ### (stalled change proposal) rust.tf/libs365 *ACP: \`TwoSidedRange\` trait* ### (stalled change proposal) rust.tf/libs333 *\`NonNull::{from\_ref, from\_mut}\`* _Generated by [fully-automatic-rust-libs-team-triage-meeting-agenda-generator](https://github.com/rust-lang/libs-team/tree/main/tools/agenda-generator)_