diff options
Diffstat (limited to 'tests/ui/issues/issue-44216-add-instant.rs')
-rw-r--r-- | tests/ui/issues/issue-44216-add-instant.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/ui/issues/issue-44216-add-instant.rs b/tests/ui/issues/issue-44216-add-instant.rs new file mode 100644 index 000000000..78cfecf2f --- /dev/null +++ b/tests/ui/issues/issue-44216-add-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); +} |