diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 18:31:44 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 18:31:44 +0000 |
commit | c23a457e72abe608715ac76f076f47dc42af07a5 (patch) | |
tree | 2772049aaf84b5c9d0ed12ec8d86812f7a7904b6 /vendor/time-macros/src/date.rs | |
parent | Releasing progress-linux version 1.73.0+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-c23a457e72abe608715ac76f076f47dc42af07a5.tar.xz rustc-c23a457e72abe608715ac76f076f47dc42af07a5.zip |
Merging upstream version 1.74.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/time-macros/src/date.rs')
-rw-r--r-- | vendor/time-macros/src/date.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/vendor/time-macros/src/date.rs b/vendor/time-macros/src/date.rs index 574ef8ce6..fa16ccb8d 100644 --- a/vendor/time-macros/src/date.rs +++ b/vendor/time-macros/src/date.rs @@ -127,10 +127,12 @@ pub(crate) fn parse(chars: &mut Peekable<token_stream::IntoIter>) -> Result<Date impl ToTokenTree for Date { fn into_token_tree(self) -> TokenTree { quote_group! {{ - const DATE: ::time::Date = ::time::Date::__from_ordinal_date_unchecked( - #(self.year), - #(self.ordinal), - ); + const DATE: ::time::Date = unsafe { + ::time::Date::__from_ordinal_date_unchecked( + #(self.year), + #(self.ordinal), + ) + }; DATE }} } |