[discussion] ErrorKind::CrossesDevices
from io_error_more
· Issue #130191 · rust-lang/rust (original) (raw)
@rustbot label C-discussion
Main tracking issue: #86442
Background
The io_error_more feature introduced 21 new variants into ErrorKind. They were FCP'd back in December 2022, but there appeared to be quite a lot of disagreement about 4 of the added variants, so the stabilization (#106375) got stalled for over twenty months. Thankfully, the 17 uncontroversial variants got stabilized in #128316, so now we just need to iron out a satisfactory design for the remaining 4 variants, and then they can be stabilized too.
In order to not block any of the remaining variants on each other and to not intertwine the discussions, I've created 4 separate issues, which summarize the concerns & suggestions voiced up until this point and can serve as a place for further discussion.
FilesystemLoop
: [discussion] ErrorKind::FilesystemLoop from io_error_more #130188FilesystemQuotaExceeded
: [discussion] ErrorKind::FilesystemQuotaExceeded from io_error_more #130190CrossesDevices
: you are hereInvalidFilename
: [discussion] ErrorKind::InvalidFilename from io_error_more #130192
CrossesDevices
Currently corresponds to EXDEV
on Unix and ERROR_NOT_SAME_DEVICE
on Windows. (#86442 (comment))
Current docs description:
Cross-device or cross-filesystem (hard) link or rename.
NotSameDevice
I think
NotSameDevice
is a better name thanCrossesDevices
. For me, it expresses its meaning more clearly. FWIW, the Linux man page also uses the word "same" to describeEXDEV
:oldpath and newpath are not on the same mounted filesystem
.Also, I find
NotSameDevice
to be stylistically more consistent with the other existing and proposed error identifiers.
Originally posted by kalcutter in #86442 (comment)
Would you also consider
NotSameDevice
instead ofCrossesDevices
?
Originally posted by kalcutter in #106375 (comment)
I personally don't think we should rename
CrossesDevices
.
Originally posted by Josh Triplett in #106375 (comment)