about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-05-30 10:23:08 +0200
committerGitHub <noreply@github.com>2024-05-30 10:23:08 +0200
commita4d00ff8e4e0ef233239e3e1226f05cb3ffee5b8 (patch)
tree0e2b34f13839be2746fd56560c1b3d1cbfa0dfd5
parentcffcf9c828de695587f13cf121db6d863140189b (diff)
parenta8234d5f8729fd78a76641bc341519941bfb14aa (diff)
downloadrust-a4d00ff8e4e0ef233239e3e1226f05cb3ffee5b8.tar.gz
rust-a4d00ff8e4e0ef233239e3e1226f05cb3ffee5b8.zip
Rollup merge of #125746 - jmillikin:duration-from-weeks-typo, r=lqd
Fix copy-paste error in `Duration::from_weeks` panic message.
-rw-r--r--library/core/src/time.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/core/src/time.rs b/library/core/src/time.rs
index 89202e7bb8d..dfa58e4f46d 100644
--- a/library/core/src/time.rs
+++ b/library/core/src/time.rs
@@ -348,7 +348,7 @@ impl Duration {
     #[inline]
     pub const fn from_weeks(weeks: u64) -> Duration {
         if weeks > u64::MAX / (SECS_PER_MINUTE * MINS_PER_HOUR * HOURS_PER_DAY * DAYS_PER_WEEK) {
-            panic!("overflow in Duration::from_days");
+            panic!("overflow in Duration::from_weeks");
         }
 
         Duration::from_secs(weeks * MINS_PER_HOUR * SECS_PER_MINUTE * HOURS_PER_DAY * DAYS_PER_WEEK)