-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Closed
Copy link
Labels
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: Documentation for any part of the project, including the compiler, standard library, and toolsA-filesystemArea: `std::fs`Area: `std::fs`C-bugCategory: This is a bug.Category: This is a bug.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
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.
Metadata
Metadata
Assignees
Labels
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: Documentation for any part of the project, including the compiler, standard library, and toolsA-filesystemArea: `std::fs`Area: `std::fs`C-bugCategory: This is a bug.Category: This is a bug.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.