diff options
Diffstat (limited to 'tests/ui/issues/issue-44216-sub-system-time.rs')
-rw-r--r-- | tests/ui/issues/issue-44216-sub-system-time.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/ui/issues/issue-44216-sub-system-time.rs b/tests/ui/issues/issue-44216-sub-system-time.rs new file mode 100644 index 000000000..2c5a000fa --- /dev/null +++ b/tests/ui/issues/issue-44216-sub-system-time.rs @@ -0,0 +1,10 @@ +// run-fail +// error-pattern:overflow +// ignore-emscripten no processes + +use std::time::{Duration, SystemTime}; + +fn main() { + let now = SystemTime::now(); + let _ = now - Duration::from_secs(u64::MAX); +} |