mirror of
https://github.com/rust-lang/rust.git
synced 2026-06-01 14:10:03 +03:00
change cfg gate to enable testing Instant subtraction in Windows
This commit is contained in:
@@ -25,7 +25,7 @@ fn main() {
|
||||
let now2 = Instant::now();
|
||||
assert!(now2 > now1);
|
||||
|
||||
#[cfg(target_os = "linux")] // TODO: macOS does not support Instant subtraction
|
||||
#[cfg(not(target_os = "macos"))] // TODO: macOS does not support Instant subtraction
|
||||
{
|
||||
let diff = now2.duration_since(now1);
|
||||
assert_eq!(now1 + diff, now2);
|
||||
|
||||
Reference in New Issue
Block a user