-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Description
Location
Documentation of the std::fs::hard_link function, e.g. https://doc.rust-lang.org/std/fs/fn.hard_link.html
Summary
The function currently doesn't specify what happens if the second parameter (link / "the destination") already exists.
The note for unix systems and linux's man pages lead me to believe it will return an error in this case, but I don't think one should have to read linux man pages to determine the behavior of a rust function and it's not obvious if this is the intended rust behavior across platforms or if the behavior would be platform-specific.
Assuming it's not platform-specific, I think it'd be sufficient to add a bullet point to the # Errors section as a second documented error case.