--- date: 2024-11-12 url: https://hackmd.io/Bx8wlhoBToa-ChgNwHNyBg --- # Libs-API Meeting 2024-11-12 ###### tags: `Libs Meetings` `Minutes` **Meeting Link**: https://meet.jit.si/rust-libs-meeting-crxoz2at8hiccp7b3ixf89qgxfymlbwr **Attendees**: Amanieu, JoshT, David, Mara, TC ## Agenda - Triage - Anything else? ## Triage ### FCPs 15 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/130843 *Tracking Issue for \`#!\[feature(const\_float\_methods)\]\`* - (7 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* - (3 checkboxes left) [Amanieu (8)](https://rfcbot.rs/fcp/Amanieu), [BurntSushi (13)](https://rfcbot.rs/fcp/BurntSushi), [dtolnay (2)](https://rfcbot.rs/fcp/dtolnay), [nikomatsakis (3)](https://rfcbot.rs/fcp/nikomatsakis), [tmandry (2)](https://rfcbot.rs/fcp/tmandry), [m-ou-se (10)](https://rfcbot.rs/fcp/m-ou-se), [joshtriplett (5)](https://rfcbot.rs/fcp/joshtriplett), [scottmcm (4)](https://rfcbot.rs/fcp/scottmcm), [pnkfelix (2)](https://rfcbot.rs/fcp/pnkfelix) ### (nominated) rust.tf/52331 *Correcting Path::components on non\-"Unix" platforms* Discussed last week. Mara to reply. ### (nominated) rust.tf/95892 *Tracking Issue for \`sub\_ptr\` (feature \`ptr\_sub\_ptr\`)* Bikeshed. Amanieu: left comment about preferring offset_from_unsigned Josh: Why better than sub_ptr? Amanieu: yes, because clear it's unsigned. obvious UB if it is negative Amanieu: offset_from is the best name, clear what is happening. sub_ptr is less clear. Mara: Agree with that. Mara: If a language had both `offset_from` and `sub_ptr`, then i'd expect offset_from to be _unsigned_ and sub_ptr to be _signed_. Opposite of the result we're heading towards now. TC: Maybe we can do better than either of these names. JoshT: Any ideas for a name that isn't as long as offset_from_unsigned. Mara: Only one i can think of is distance_from, but there were reasonable arguments against that last week. TC: `positive_offset_from` is also too long, but it's more clear to me than `offset_from_unsigned` in terms of communicating the semantic here. Mara: 0 isn't really positive. non_negative_offset_from is a bit much. JoshT: offset_after? TC: +1. Amanieu: confusing. TC: But just saying "unsigned" doesn't make the safety precondition clear enough, so this is better in that way. David: Question this method answers is where a pointer is inside an allocation. JoshT: Someone suggested offset_to. also offset_within Mara: Dislike offset_within. If the first pointer is not the start of the allocation, it gets confusing. E.g. pointers to two substrings and finding the offset between them. JoshT: Agree that makes offset_within not great The 8472: The "within the same allocation" rule also applies to offset_from, not specific to this new method Amanieu: Maybe offset_after then.. Mara: I like that in `first.offset_to(second)` has the first and second pointers in order. JoshT: Harder when translating code though. No conclusion yet. No consensus on any of the name proposals. Josh to reply. ### (nominated) rust.tf/123197 *Tracking Issue for fn const BuildHasherDefault::new()* rfcbot merge. ### (nominated) rust.tf/130843 *Tracking Issue for \`#!\[feature(const\_float\_methods)\]\`* Looks fine. clicking boxes. removed label. ### (waiting on team) rust.tf/132515 *Fix and undeprecate home\_dir()* ### (new change proposal) rust.tf/libs481 *ACP: implement \`char\_slice\` for \`&str\`* ### (new change proposal) rust.tf/libs479 *export core::cfg\_if* > my original intent was that it should be stabilized eventually, but you quickly convinced me it would be better off perma-unstable. Other option is: https://docs.rs/cfg-match/latest/cfg_match/macro.cfg_match.html Mara: We could expose it as unstable, to bring people in to the tracking issue with ideas. Perhaps they have a good idea for a lang feature to cover this. TC: We already have cfg_match as unstable: https://doc.rust-lang.org/stable/std/macro.cfg_match.html Mara: `cfg_one` or `select` are possible alternative names. Amanieu: without compiler support this can support expr position or item position but not both Josh: adding this as an unresolved question Amanieu to close the cfg_if ACP. ### (new change proposal) rust.tf/libs478 *\`file\_absolute!\` macro* Mara: I don't want to end up with binaries that contain people's usernames (/home/Username/ etc.). So hesitant to have this Josh: I don't want a macro that errors out with trim paths enabled, because that might become the default in the future. Problem is that current file!() is relative to workspace root, but tests run in the crate root. (Or other way around?) Josh: Sounds like the problem they are trying to solve is solved by being relative to something else, not by being absolute. Wrong approach to have file_absolute!(). Amanieu: i remember discussing alternatives that didn't work, but don't remember what they were. The 8472: Wonder why using an env var wouldn't work Conclusion: at least some of us really want other alternatives to be fully expored before adding any absolute paths. Mara to reply. ### (new change proposal) rust.tf/libs477 *Add \`Borrow\` and \`AsRef\` implementations to \`LazyCell\` and \`LazyLock\`* ### (new change proposal) rust.tf/libs476 *Parse IPv6 zone identifiers* ### (new change proposal) rust.tf/libs475 *Optimise and bug\-fix \`to\_digit\`* ### (new change proposal) rust.tf/libs469 *Add from\_bytes\_radix function* ### (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/libs230 *Add \`saturating\_shl\` and \`saturating\_shr\` for ints* ### (stalled change proposal) rust.tf/libs176 *\`Peek\` trait for peekable iterators* ### (stalled change proposal) rust.tf/libs331 *Support permanently skipping tests on a specific system* ### (stalled change proposal) rust.tf/libs314 *Add security\_attributes() to windows::OpenOptionsExt* ### (stalled change proposal) rust.tf/libs311 *ACP: Pattern methods for \`OsStr\` without \`OsStr\` patterns* ### (stalled change proposal) rust.tf/libs207 *\`parse\_line\` method for \`Stdin\`* ### (stalled change proposal) rust.tf/libs186 *Implementing flatten for \`Option\<&Option\<T\>\>\` and \`Option\<&mut Option\<T\>\>\`* ### (stalled change proposal) rust.tf/libs338 *RefInit: RAII wrapper for initialized MaybeUninit references* ### (stalled change proposal) rust.tf/libs332 *Implement ExactSizeIterator for Flatten\<option::IntoIter\<I\>\>* ### (stalled change proposal) rust.tf/libs336 *Add \`or\_try\_\*\` variants for HashMap and BTreeMap Entry APIs* _Generated by [fully-automatic-rust-libs-team-triage-meeting-agenda-generator](https://github.com/rust-lang/libs-team/tree/main/tools/agenda-generator)_