Skip to content

Commit

Permalink
[Clippy] Swap open_options to use diagnostic items instead of paths
Browse files Browse the repository at this point in the history
  • Loading branch information
GnomedDev committed Sep 19, 2024
1 parent 04bd505 commit cb771b2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions std/src/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,7 @@ impl File {
/// ```
#[must_use]
#[stable(feature = "with_options", since = "1.58.0")]
#[cfg_attr(not(test), rustc_diagnostic_item = "file_options")]
pub fn options() -> OpenOptions {
OpenOptions::new()
}
Expand Down Expand Up @@ -1009,6 +1010,7 @@ impl OpenOptions {
/// let mut options = OpenOptions::new();
/// let file = options.read(true).open("foo.txt");
/// ```
#[cfg_attr(not(test), rustc_diagnostic_item = "open_options_new")]
#[stable(feature = "rust1", since = "1.0.0")]
#[must_use]
pub fn new() -> Self {
Expand Down

0 comments on commit cb771b2

Please sign in to comment.