-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Open
Labels
A-timeArea: TimeArea: TimeC-bugCategory: This is a bug.Category: This is a bug.P-highHigh priorityHigh priorityT-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.Performance or correctness regression from stable to nightly.
Description
use std::time::SystemTime;
use std::time::Duration;
fn main() {
let t = SystemTime::UNIX_EPOCH;
let early = t - (Duration::from_secs(i64::MAX as u64 + 1));
let later = t + (Duration::from_secs(i64::MAX as u64) + Duration::from_nanos(999_999_999));
let delta = later.duration_since(early).unwrap();
eprintln!("{early:?}");
eprintln!("{delta:?}");
}
works on stable (1.89.0) and beta (1.90.0-beta.7 (2025-08-29 fb918ce)), but returns error on nightly (1.91.0-nightly (2025-09-04 af00ff2)).
Probably introduced in #144519 (CC @clarfonthey).
clarfonthey
Metadata
Metadata
Assignees
Labels
A-timeArea: TimeArea: TimeC-bugCategory: This is a bug.Category: This is a bug.P-highHigh priorityHigh priorityT-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.Performance or correctness regression from stable to nightly.