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