-
-
Notifications
You must be signed in to change notification settings - Fork 283
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
3,284 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
use time::macros::utc_datetime; | ||
|
||
fn main() { | ||
let _ = utc_datetime!(2021-000 0:00); | ||
let _ = utc_datetime!(2021-001 24:00); | ||
let _ = utc_datetime!(2021-001 0:00 0); | ||
let _ = utc_datetime!(2021-001 0:00 UTC); | ||
let _ = utc_datetime!(2021-001 0:00 UTC x); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
error: invalid component: ordinal was 0 | ||
--> ../tests/compile-fail/invalid_utc_datetime.rs:4:32 | ||
| | ||
4 | let _ = utc_datetime!(2021-000 0:00); | ||
| ^^^ | ||
|
||
error: invalid component: hour was 24 | ||
--> ../tests/compile-fail/invalid_utc_datetime.rs:5:36 | ||
| | ||
5 | let _ = utc_datetime!(2021-001 24:00); | ||
| ^^ | ||
|
||
error: unexpected token: 0 | ||
--> ../tests/compile-fail/invalid_utc_datetime.rs:6:41 | ||
| | ||
6 | let _ = utc_datetime!(2021-001 0:00 0); | ||
| ^ | ||
|
||
error: unexpected token: UTC | ||
--> ../tests/compile-fail/invalid_utc_datetime.rs:7:41 | ||
| | ||
7 | let _ = utc_datetime!(2021-001 0:00 UTC); | ||
| ^^^ | ||
|
||
error: unexpected token: UTC | ||
--> ../tests/compile-fail/invalid_utc_datetime.rs:8:41 | ||
| | ||
8 | let _ = utc_datetime!(2021-001 0:00 UTC x); | ||
| ^^^ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.