diff options
| author | GnomedDev <david2005thomas@gmail.com> | 2024-09-18 22:08:04 +0100 |
|---|---|---|
| committer | GnomedDev <david2005thomas@gmail.com> | 2024-09-19 13:13:42 +0100 |
| commit | 1890620b2611aaec28edc5537183a2c7734ae3ce (patch) | |
| tree | b2411851715029a61969d289ffb83a9ce002a83b /library | |
| parent | 372f68b6a6e0b6997d065cef4f6cef16a6fb53e3 (diff) | |
| download | rust-1890620b2611aaec28edc5537183a2c7734ae3ce.tar.gz rust-1890620b2611aaec28edc5537183a2c7734ae3ce.zip | |
[Clippy] Swap `instant_subtraction` to use diagnostic item instead of path
Diffstat (limited to 'library')
| -rw-r--r-- | library/std/src/time.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/library/std/src/time.rs b/library/std/src/time.rs index ae46670c25e..f28a0568a3c 100644 --- a/library/std/src/time.rs +++ b/library/std/src/time.rs @@ -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()) } |
