Skip to content

Commit

Permalink
[Clippy] Swap instant_subtraction to use diagnostic item instead of…
Browse files Browse the repository at this point in the history
… path
  • Loading branch information
GnomedDev committed Sep 19, 2024
1 parent beaebb5 commit c1a4a69
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions std/src/time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@ impl Instant {
/// ```
#[must_use]
#[stable(feature = "time2", since = "1.8.0")]
#[cfg_attr(not(test), rustc_diagnostic_item = "instant_now")]
pub fn now() -> Instant {
Instant(time::Instant::now())
}
Expand Down

0 comments on commit c1a4a69

Please sign in to comment.