--- date: 2024-11-05 url: https://hackmd.io/lyoyhBgjTVC18ZLIRx1TFw --- # Libs-API Meeting 2024-11-05 ###### tags: `Libs Meetings` `Minutes` **Meeting Link**: https://meet.jit.si/rust-libs-meeting-crxoz2at8hiccp7b3ixf89qgxfymlbwr **Attendees**: Amanieu, Mara, Josh, TC, Chris Denton, eholk ## 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\`* - (4 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/74939 *Tracking issue for const \`\<\*const T\>::is\_null\`* - (4 checkboxes left) - merge rust.tf/129322 *Tracking Issue for \`ptr::fn\_addr\_eq\`* - (3 checkboxes left) - merge rust.tf/76654 *Tracking issue for const \`Pin\` methods* - (3 checkboxes left) - merge rust.tf/132187 *Add Extend impls for tuples of arity 1 through 12* - (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/132611 *Add \`AsyncFn\*\` to to the prelude in all editions* - (6 checkboxes left) - merge rust.tf/131717 *Stabilize \`const\_atomic\_from\_ptr\`* - (3 checkboxes left) [joshtriplett (5)](https://rfcbot.rs/fcp/joshtriplett), [scottmcm (3)](https://rfcbot.rs/fcp/scottmcm), [tmandry (2)](https://rfcbot.rs/fcp/tmandry), [BurntSushi (14)](https://rfcbot.rs/fcp/BurntSushi), [nikomatsakis (4)](https://rfcbot.rs/fcp/nikomatsakis), [Amanieu (10)](https://rfcbot.rs/fcp/Amanieu), [m-ou-se (10)](https://rfcbot.rs/fcp/m-ou-se), [dtolnay (2)](https://rfcbot.rs/fcp/dtolnay), [pnkfelix (3)](https://rfcbot.rs/fcp/pnkfelix) ### (nominated) rust.tf/52331 *Correcting Path::components on non\-"Unix" platforms* Mara: Path::components() is nearly always used to check for a prefix, get a common prefix, or canonicalize the path. We can add methods for those things, and then we hopefully won't care much about .components() anymore. Josh: Seems like the right approach. TC: In support of providing a replacement (or not deprecating), I've used `components()` in a non-trivial way to treat some of the path components as metadata. E.g., part of the path is a date (which is then parsed), another part is an identifier, etc. Mara: Would love to see. When i looked into this, I couldn't find any such example on github code search. TC: It's not part of any public repository. Amanieu: Where is Prefix used? Mara: Only in Components, i think The 8472: Used a lot internally. Josh: Lighter approach is to deprecate PrefixComponent::kind(), replacing it by a new method returning a new enum/Option. Mara: We could just accept this as unstable, allow the commenter to work on this and see where it goes. Josh, Amanieu: sounds good Mara to reply. ### (nominated) rust.tf/95892 *Tracking Issue for \`sub\_ptr\` (feature \`ptr\_sub\_ptr\`)* Mara: This is a naming bikeshed Amanieu: We already had this bikeshed, conclusion was sub_ptr. Amanieu: And this is something we want to have. most people want usize Mara: +1 The 8472: I think this has extra safety/soundness conditions? Amanieu: Same as offset_from, but requires positive result. The 8472: That's an additional promise to llvm. The 8472: We could include the positive requirement in the name. But it's part of the signature (through `usize`) anyway. Amanieu: We also have byte_sub_ptr. Mara: That name feels a bit weird. Mara: Prefer distance_from (and byte_distance_from). But wouldn't object to current name. Josh: We already had a big bikeshed. Let'd not revisit. Name doesn't seem perfect, but seems like everyone is willing to sign off on it. The 8472: I had to look it up everytime i wanted to use it, but that's a good thing for an unsafe function. TC: Why sub and sub_ptr? Mara: You can do ptr-num=ptr and ptr-ptr=num. Amanieu: Can we use the real sub operator? Mara: That one is safe. Conclusion: Propose FCP. Amanieu: also for the byte version? just a few days old Mara: maybe not. idk Amanieu: Other option is offset_from_unsigned. Closer in documentation Josh: Long, so would discourage using. Amanieu: Fine for unsafe code. Conclusion: propose FCP. If someone comes up with a brilliant name, leave a comment. ### (nominated) rust.tf/131261 *Stabilize \`UnsafeCell::from\_mut\`* Already FCPd. Just needs confirmation that it can be const. No objections. Approved. ### (nominated) rust.tf/131824 *Support multiple stability attributes on items* Mara: I think multiple unstable tags is useful, but i think the other options are not worth it. too complex. TC: Is this libs-api? Mara: We asked for this feature, we're the user here, not the authority. Josh: multiple unstable tags is what we asked for, multiple stable tags doesn't seem that useful. then you only care about when the item got stabilized. unstable and stable does seem useful, though. Mara: Don't think stable+unstable is worth it, and makes it harder for diagnostics. Amanieu: Useful for macros to allow multiple atributes in any combination. Mara: Feature seems fine as designed, but if it becomes a lot simpler for just multiple unstable, that's worth considering. Josh: Convinced now by Amanieu's argument that other combinations are useful, in e.g. macros. We could always suggest a clippy lint that automatically gets suppressed for code from macros. Conclusion: this feature looks great. ### (nominated) rust.tf/132611 *Add \`AsyncFn\*\` to to the prelude in all editions* Mara: Adds a trait, but it has zero methods. So should be fine. TC: This is part of `async_closure`. Amanieu: Unstable. TC: This is an agreement of what will happen with respect to the prelude on (lang) stablization of async closures. Libs-api+lang FCP already in progress. Check boxes. ### (nominated) rust.tf/rfc3642 *\[RFC\] Thread spawn hook (inheriting thread locals)* Changes since last discussion: https://github.com/rust-lang/rfcs/pull/3642#issuecomment-2434748643 Mara: Updated based on feedback from last time. Would love an FCP or more feedback. Amanieu: To be clear: FCP for RFC, not for stabilization. Example usage: https://github.com/rust-lang/rust/pull/125405/files#diff-470ba1f43d97e0648110a90a3912c69e98648826c9f4224a37eabcbea4dc2a0e That code is currently hardcoded in std's spawn(), but after this RFC, libtest can do it itself. Amanieu: Struggling to find anything bad to say about this. Josh: I still have the concern of 'action at a distance', but the removal of the global effect adresses that enough. Amanieu: Might want to consider requiring Clone for the closures. Amanieu: Also not sure about `no_hook`. TC: I think of this as analogous to environment variables. Most of the time you want those to inherent to subshells and processes and whatnot. But sometimes you don't, and that's why UNIX has `env -i`. Amanieu: No objections. Conclusion: Start FCP. ### (waiting on team) rust.tf/132515 *Fix and undeprecate home\_dir()* Amanieu: Undeprecating means someone can use it on nightly, but then get deprecation warnings on stable. Josh: We could document that people should declare an MSRV if they want to use it. Josh: It happens more often that people depend on a bug fix in std without having an MSRV. ### (new change proposal) rust.tf/libs475 *Optimise and bug\-fix \`to\_digit\`* https://github.com/rust-lang/libs-team/issues/475#issuecomment-2457858458 ### (new change proposal) rust.tf/libs474 *Add \`into\_value\` for \`ControlFlow\`* We'll accept with Josh to write a comment. ### (new change proposal) rust.tf/libs473 *Support extracting underlying filled buffer from BorrowedBuf* Accepted. Josh wrote response. (Typo in ACP signature for `into_filled_mut`, commented.) ### (new change proposal) rust.tf/libs472 *\`RefCell::{try\_replace, try\_replace\_with, try\_swap}\`* Rejected, Amanieu to write response. ### (new change proposal) rust.tf/libs471 *Infallible \`div\_ceil\` for \`NonZero\<unsigned\>\`* Accepted. Josh to respond. ### (new change proposal) rust.tf/libs469 *Add from\_bytes\_radix function* Accepted with a rename. ### (new change proposal) rust.tf/libs468 *ACP: add bool::select* Accepted with a rename. ### (new change proposal) rust.tf/libs466 *ACP: Add nul\-terminated version of \`core::panic::Location::file\`* ### (new change proposal) rust.tf/libs465 *Add Vec::last\_or\_push and friends* ### (new change proposal) rust.tf/libs462 *impl fmt::Write for BufWriter* ### (stalled change proposal) rust.tf/libs176 *\`Peek\` trait for peekable iterators* ### (stalled change proposal) rust.tf/libs314 *Add security\_attributes() to windows::OpenOptionsExt* ### (stalled change proposal) rust.tf/libs316 *Add nearly in\-place case change methods to String* ### (stalled change proposal) rust.tf/libs296 *ACP: Designing an alternative \`FromStr\`* ### (stalled change proposal) rust.tf/libs124 *Integrate \`Error\` trait with panic interfaces* ### (stalled change proposal) rust.tf/libs311 *ACP: Pattern methods for \`OsStr\` without \`OsStr\` patterns* ### (stalled change proposal) rust.tf/libs155 *Arbitrary alternate flags in \`std::fmt::Formatter\`* ### (stalled change proposal) rust.tf/libs295 *Create iterator function in std libs: split\_item\_mut()* ### (stalled change proposal) rust.tf/libs131 *Add \`std::fs::rename\_noreplace\`* ### (stalled change proposal) rust.tf/libs338 *RefInit: RAII wrapper for initialized MaybeUninit references* _Generated by [fully-automatic-rust-libs-team-triage-meeting-agenda-generator](https://github.com/rust-lang/libs-team/tree/main/tools/agenda-generator)_