-
-
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.
Skip formatting some macros, update UI tests
- Loading branch information
Showing
23 changed files
with
1,046 additions
and
1,224 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,107 +1,107 @@ | ||
error: invalid component: year was 1000000 | ||
--> $DIR/invalid_date.rs:4:19 | ||
--> ../tests/compile-fail/invalid_date.rs:4:19 | ||
| | ||
4 | let _ = date!(+1_000_000-01-01); | ||
| ^^^^^^^^^^ | ||
|
||
error: years with more than four digits must have an explicit sign | ||
--> $DIR/invalid_date.rs:5:19 | ||
--> ../tests/compile-fail/invalid_date.rs:5:19 | ||
| | ||
5 | let _ = date!(10_000 - 01 - 01); | ||
5 | let _ = date!(10_000-01-01); | ||
| ^^^^^^ | ||
|
||
error: invalid component: week was 60 | ||
--> $DIR/invalid_date.rs:6:24 | ||
--> ../tests/compile-fail/invalid_date.rs:6:24 | ||
| | ||
6 | let _ = date!(2021-W 60-1); | ||
| ^^^^ | ||
|
||
error: invalid component: day was 0 | ||
--> $DIR/invalid_date.rs:7:29 | ||
--> ../tests/compile-fail/invalid_date.rs:7:29 | ||
| | ||
7 | let _ = date!(2021-W 01-0); | ||
| ^ | ||
|
||
error: invalid component: day was 8 | ||
--> $DIR/invalid_date.rs:8:29 | ||
--> ../tests/compile-fail/invalid_date.rs:8:29 | ||
| | ||
8 | let _ = date!(2021-W 01-8); | ||
| ^ | ||
|
||
error: invalid component: month was 0 | ||
--> $DIR/invalid_date.rs:9:26 | ||
--> ../tests/compile-fail/invalid_date.rs:9:24 | ||
| | ||
9 | let _ = date!(2021 - 00 - 01); | ||
| ^^ | ||
9 | let _ = date!(2021-00-01); | ||
| ^^ | ||
|
||
error: invalid component: month was 13 | ||
--> $DIR/invalid_date.rs:10:26 | ||
--> ../tests/compile-fail/invalid_date.rs:10:24 | ||
| | ||
10 | let _ = date!(2021 - 13 - 01); | ||
| ^^ | ||
10 | let _ = date!(2021-13-01); | ||
| ^^ | ||
|
||
error: invalid component: day was 0 | ||
--> $DIR/invalid_date.rs:11:31 | ||
--> ../tests/compile-fail/invalid_date.rs:11:27 | ||
| | ||
11 | let _ = date!(2021 - 01 - 00); | ||
| ^^ | ||
11 | let _ = date!(2021-01-00); | ||
| ^^ | ||
|
||
error: invalid component: day was 32 | ||
--> $DIR/invalid_date.rs:12:31 | ||
--> ../tests/compile-fail/invalid_date.rs:12:27 | ||
| | ||
12 | let _ = date!(2021 - 01 - 32); | ||
| ^^ | ||
12 | let _ = date!(2021-01-32); | ||
| ^^ | ||
|
||
error: invalid component: ordinal was 0 | ||
--> $DIR/invalid_date.rs:13:26 | ||
--> ../tests/compile-fail/invalid_date.rs:13:24 | ||
| | ||
13 | let _ = date!(2021 - 000); | ||
| ^^^ | ||
13 | let _ = date!(2021-000); | ||
| ^^^ | ||
|
||
error: invalid component: ordinal was 366 | ||
--> $DIR/invalid_date.rs:14:26 | ||
--> ../tests/compile-fail/invalid_date.rs:14:24 | ||
| | ||
14 | let _ = date!(2021 - 366); | ||
| ^^^ | ||
14 | let _ = date!(2021-366); | ||
| ^^^ | ||
|
||
error: invalid component: year was 0a | ||
--> $DIR/invalid_date.rs:15:19 | ||
--> ../tests/compile-fail/invalid_date.rs:15:19 | ||
| | ||
15 | let _ = date!(0a); | ||
| ^^ | ||
|
||
error: unexpected token: : | ||
--> $DIR/invalid_date.rs:16:23 | ||
--> ../tests/compile-fail/invalid_date.rs:16:23 | ||
| | ||
16 | let _ = date!(2021:); | ||
| ^ | ||
|
||
error: invalid component: week was 0a | ||
--> $DIR/invalid_date.rs:17:26 | ||
--> ../tests/compile-fail/invalid_date.rs:17:26 | ||
| | ||
17 | let _ = date!(2021-W 0a); | ||
| ^^ | ||
|
||
error: unexpected token: : | ||
--> $DIR/invalid_date.rs:18:28 | ||
--> ../tests/compile-fail/invalid_date.rs:18:28 | ||
| | ||
18 | let _ = date!(2021-W 01:); | ||
| ^ | ||
|
||
error: invalid component: day was 0a | ||
--> $DIR/invalid_date.rs:19:29 | ||
--> ../tests/compile-fail/invalid_date.rs:19:29 | ||
| | ||
19 | let _ = date!(2021-W 01-0a); | ||
| ^^ | ||
|
||
error: invalid component: month or ordinal was 0a | ||
--> $DIR/invalid_date.rs:20:24 | ||
--> ../tests/compile-fail/invalid_date.rs:20:24 | ||
| | ||
20 | let _ = date!(2021-0a); | ||
| ^^ | ||
|
||
error: invalid component: day was 0a | ||
--> $DIR/invalid_date.rs:21:27 | ||
--> ../tests/compile-fail/invalid_date.rs:21:27 | ||
| | ||
21 | let _ = date!(2021-01-0a); | ||
| ^^ |
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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
use time::macros::datetime; | ||
|
||
fn main() { | ||
let _ = datetime!(2021 - 000 0:00); | ||
let _ = datetime!(2021 - 001 24:00); | ||
let _ = datetime!(2021 - 001 0:00 0); | ||
let _ = datetime!(2021 - 001 0:00 UTC x); | ||
let _ = datetime!(2021-000 0:00); | ||
let _ = datetime!(2021-001 24:00); | ||
let _ = datetime!(2021-001 0:00 0); | ||
let _ = 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 |
---|---|---|
@@ -1,23 +1,23 @@ | ||
error: invalid component: ordinal was 0 | ||
--> $DIR/invalid_datetime.rs:4:30 | ||
--> ../tests/compile-fail/invalid_datetime.rs:4:28 | ||
| | ||
4 | let _ = datetime!(2021 - 000 0:00); | ||
| ^^^ | ||
4 | let _ = datetime!(2021-000 0:00); | ||
| ^^^ | ||
|
||
error: invalid component: hour was 24 | ||
--> $DIR/invalid_datetime.rs:5:34 | ||
--> ../tests/compile-fail/invalid_datetime.rs:5:32 | ||
| | ||
5 | let _ = datetime!(2021 - 001 24:00); | ||
| ^^ | ||
5 | let _ = datetime!(2021-001 24:00); | ||
| ^^ | ||
|
||
error: unexpected token: 0 | ||
--> $DIR/invalid_datetime.rs:6:39 | ||
--> ../tests/compile-fail/invalid_datetime.rs:6:37 | ||
| | ||
6 | let _ = datetime!(2021 - 001 0:00 0); | ||
| ^ | ||
6 | let _ = datetime!(2021-001 0:00 0); | ||
| ^ | ||
|
||
error: unexpected token: x | ||
--> $DIR/invalid_datetime.rs:7:43 | ||
--> ../tests/compile-fail/invalid_datetime.rs:7:41 | ||
| | ||
7 | let _ = datetime!(2021 - 001 0:00 UTC x); | ||
| ^ | ||
7 | let _ = 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,81 +1,81 @@ | ||
error: invalid component: hour was 24 | ||
--> $DIR/invalid_time.rs:4:19 | ||
--> ../tests/compile-fail/invalid_time.rs:4:19 | ||
| | ||
4 | let _ = time!(24:00); | ||
| ^^ | ||
|
||
error: invalid component: minute was 60 | ||
--> $DIR/invalid_time.rs:5:21 | ||
--> ../tests/compile-fail/invalid_time.rs:5:21 | ||
| | ||
5 | let _ = time!(0:60); | ||
| ^^ | ||
|
||
error: invalid component: second was 60 | ||
--> $DIR/invalid_time.rs:6:24 | ||
--> ../tests/compile-fail/invalid_time.rs:6:24 | ||
| | ||
6 | let _ = time!(0:00:60); | ||
| ^^ | ||
|
||
error: unexpected token: x | ||
--> $DIR/invalid_time.rs:7:19 | ||
--> ../tests/compile-fail/invalid_time.rs:7:19 | ||
| | ||
7 | let _ = time!(x); | ||
| ^ | ||
|
||
error: unexpected token: x | ||
--> $DIR/invalid_time.rs:8:27 | ||
--> ../tests/compile-fail/invalid_time.rs:8:27 | ||
| | ||
8 | let _ = time!(0:00:00 x); | ||
| ^ | ||
|
||
error: invalid component: hour was "" | ||
--> $DIR/invalid_time.rs:9:19 | ||
--> ../tests/compile-fail/invalid_time.rs:9:19 | ||
| | ||
9 | let _ = time!(""); | ||
| ^^ | ||
|
||
error: unexpected end of input | ||
--> $DIR/invalid_time.rs:10:13 | ||
--> ../tests/compile-fail/invalid_time.rs:10:13 | ||
| | ||
10 | let _ = time!(0:); | ||
| ^^^^^^^^^ | ||
| | ||
= note: this error originates in the macro `time` (in Nightly builds, run with -Z macro-backtrace for more info) | ||
|
||
error: unexpected token: , | ||
--> $DIR/invalid_time.rs:11:20 | ||
--> ../tests/compile-fail/invalid_time.rs:11:20 | ||
| | ||
11 | let _ = time!(0,); | ||
| ^ | ||
|
||
error: invalid component: second was 0a | ||
--> $DIR/invalid_time.rs:12:24 | ||
--> ../tests/compile-fail/invalid_time.rs:12:24 | ||
| | ||
12 | let _ = time!(0:00:0a); | ||
| ^^ | ||
|
||
error: invalid component: hour was 0 | ||
--> $DIR/invalid_time.rs:13:19 | ||
--> ../tests/compile-fail/invalid_time.rs:13:19 | ||
| | ||
13 | let _ = time!(0:00 pm); | ||
| ^^^^^^^ | ||
|
||
error: unexpected end of input | ||
--> $DIR/invalid_time.rs:14:13 | ||
--> ../tests/compile-fail/invalid_time.rs:14:13 | ||
| | ||
14 | let _ = time!(0); | ||
| ^^^^^^^^ | ||
| | ||
= note: this error originates in the macro `time` (in Nightly builds, run with -Z macro-backtrace for more info) | ||
|
||
error: invalid component: hour was 0 | ||
--> $DIR/invalid_time.rs:15:19 | ||
--> ../tests/compile-fail/invalid_time.rs:15:19 | ||
| | ||
15 | let _ = time!(0 pm); | ||
| ^^^^ | ||
|
||
error: unexpected token: : | ||
--> $DIR/invalid_time.rs:16:24 | ||
--> ../tests/compile-fail/invalid_time.rs:16:24 | ||
| | ||
16 | let _ = time!(1 am :); | ||
| ^ |
Oops, something went wrong.