rust/src/test/run-fail/issue-44216-sub-instant.rs

9 lines
165 B
Rust
Raw Normal View History

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