Libs Meetings
Minutes
Meeting Link: https://meet.jit.si/rust-libs-meeting-crxoz2at8hiccp7b3ixf89qgxfymlbwr
Attendees: Amanieu, Mara, David, JoshT, The 8472, Chris Denton
11 rust-lang/rust T-libs-api FCPs
dtolnay (1), BurntSushi (7), m-ou-se (5), nikomatsakis (3), joshtriplett (6), Amanieu (6), tmandry (2), scottmcm (2)
Amanieu: excited about unchecked_exact_div
Mara: all three seem useful to me. Seems fine to accept this.
David: what optimizations does the unchecked one enable?
Amanieu: https://github.com/rust-lang/libs-team/issues/337#issuecomment-2799431533
David: So, divide by two and then indexing an [u16]?
Amanieu: yup
David: +1 seems great
Amanieu: not sure about exact_div, which panics. questionable.
Mara: leave that one as an open question?
Amanieu: or have exact_div return an Option, remove checked_exact_div.
Amanieu: we can defer that till later.
Accepted
Discussed in last meeting, Amanieu to reply.
Still nominated from last week.
Amanieu: Anything new to discuss?
JoshT: needs more design discussion
Mara: drop nomination, renominate when there's a concrete proposal?
JoshT: probably best
dropped label.
Discussed in last meeting, Amanieu to reply.
Amanieu: Still need to look at it.
David: we can also revert. no rush.
Mara: Seems like a good improvement. Doesn't result in any warnings for the deprecated one. But needs FCP.
JoshT: +1, this follows common conventions for multi-word command-line options.
Amanieu: delegate all authority to t-testing-devex?
Mara: not sure. did we always vote the same as their FCP?
David: how many FCPs? not many? let's keep it.
Amanieu: previous example: deprecate –logfile
David: we're not stalling them. FCP went through quickly.
Amanieu started FCP
FCP ongoing.
David: I think this is ready for FCP
Amanieu: local_file
as name?
Mara: file_as_it_exists_on_the_local_file_system
was a bit long. local_file
is the name in rustc.
Amanieu: why an Option
?
Mara: Could come from command line args, for example. Or macro expansion.
Amanieu: Split off file+local_file to a separate stabilization PR? Might be a bit early for those.
Amanieu: not convinced about the name local_file
David: We should expose byte_offset
if we expose a way to get the local_file.
David: Might be relevant to get a comment before the field, etc.
Conclusion: don't stabilize file+local_file for now. Do that separate together with byte_offset (and byte_length)?
https://github.com/rust-lang/rust/pull/139865
Amanieu and Josh to bring a proposal back to the team.
For Option-in-Cell, you can already easily do .take(). For Cell<Rc>
, you can't do that.
We can implement Clone, or allow .get(), or both, for Cell-of-Rc.
Specific for Rc? Or with some unsafe marker trait?
Amanieu: Inclined to reject. Seems complicated, all this trait business. (Trait for Cell::get)
Amanieu: Cell
is in core
, Rc
is in alloc
.
David: CellGet trait seems fine to me. "no funny business" trait for Clone.
Mara: Trait would be similar to the 'cheap to clone' trait?
JoshT: Might also implement the "no funny business" trait for String, even though it's not cheap to clone. But do we want to do that if we're supporting .get()
rather than .clone()
?
Mara: That allocates, so calls user code in the allocator, which might touch the cell.
JoshT: Implementing the allocator is unsafe.
Amanieu: This is not part of the allocator safety contract.
Sealed/private trait?
We could start with sealed. can always expose it later.
Amanieu: Motivation only mentions Option and Weak, which both implement Default.
Mara: Then we can just require T: Default
on a new method.
The 8472: We should ask if that suffices.
Last comment was 3 hours ago. Discussion ongoing.
Amanieu to post a reply.
Discussed in last meeting, Amanieu to reply.
Amanieu: David had a counterproposal? David, do you remember?
David: That was for a different ACP. http://rust.tf/libs557
We don't have a consensus to implement Read
and Write
on OwnedFd
or BorrowedFd
; Josh and 8472 disagree about this.
We have consensus to implement a trait that converts BorrowedFd<'a>
to &'a File
or similar.
We should also provide an inherent method on BorrowedFd
that supports turbofishing the return type.
The 8472 to reply.
Approving peek_slot
counterproposal
Approved.
Josh noticed that get_ref
allows I/O on many kinds of underlying readers (such as File
). Documentation PR to address that: https://github.com/rust-lang/rust/pull/139877
The 8472 to ask whether convenience or exposing growth strategy will work for them.
Nominated for wg-async
We'd like to see this added to Box, UniqueRc, UniqueArc, instead. And possibly a map_ref
function taking Fn(&T) -> U
for the opportunistic optimization.
Agree with Mara's rejection of this; closing
The 8472 to reply.
Generated by fully-automatic-rust-libs-team-triage-meeting-agenda-generator