rust/src/test/run-fail/issue-44216-sub-instant.rs
2018-12-25 21:08:33 -07:00

9 lines
165 B
Rust

// error-pattern:overflow
use std::time::{Instant, Duration};
fn main() {
let now = Instant::now();
let _ = now - Duration::from_secs(u64::max_value());
}