Skip to content

Commit

Permalink
Rollup merge of rust-lang#91782 - maxwase:is_symlink_since_attribute,…
Browse files Browse the repository at this point in the history
… r=jyn514

Correct since attribute for `is_symlink` feature

Follow-up from [89677](rust-lang#89677)
  • Loading branch information
matthiaskrgr authored Dec 11, 2021
2 parents bc0269d + 8fafb77 commit bb23d82
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion library/std/src/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1058,7 +1058,7 @@ impl Metadata {
/// }
/// ```
#[must_use]
#[stable(feature = "is_symlink", since = "1.57.0")]
#[stable(feature = "is_symlink", since = "1.58.0")]
pub fn is_symlink(&self) -> bool {
self.file_type().is_symlink()
}
Expand Down
2 changes: 1 addition & 1 deletion library/std/src/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2817,7 +2817,7 @@ impl Path {
/// check errors, call [`fs::symlink_metadata`] and handle its [`Result`]. Then call
/// [`fs::Metadata::is_symlink`] if it was [`Ok`].
#[must_use]
#[stable(feature = "is_symlink", since = "1.57.0")]
#[stable(feature = "is_symlink", since = "1.58.0")]
pub fn is_symlink(&self) -> bool {
fs::symlink_metadata(self).map(|m| m.is_symlink()).unwrap_or(false)
}
Expand Down

0 comments on commit bb23d82

Please sign in to comment.