-
-
Notifications
You must be signed in to change notification settings - Fork 256
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use the new `num-conv` crate where possible. Current limitations are the inability to work in `const` contexts and the lack of support for platform-dependent `usize` and `isize`.
- Loading branch information
Showing
24 changed files
with
212 additions
and
150 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,43 @@ | ||
error: invalid component: hour was 24 | ||
--> $DIR/invalid_offset.rs:4:22 | ||
| | ||
4 | let _ = offset!(+24); | ||
| ^^ | ||
|
||
error: invalid component: minute was 60 | ||
--> $DIR/invalid_offset.rs:5:24 | ||
--> ../tests/compile-fail/invalid_offset.rs:5:24 | ||
| | ||
5 | let _ = offset!(+0:60); | ||
| ^^ | ||
|
||
error: invalid component: second was 60 | ||
--> $DIR/invalid_offset.rs:6:27 | ||
--> ../tests/compile-fail/invalid_offset.rs:6:27 | ||
| | ||
6 | let _ = offset!(+0:00:60); | ||
| ^^ | ||
|
||
error: unexpected token: 0 | ||
--> $DIR/invalid_offset.rs:7:21 | ||
--> ../tests/compile-fail/invalid_offset.rs:7:21 | ||
| | ||
7 | let _ = offset!(0); | ||
| ^ | ||
|
||
error: missing component: sign | ||
--> $DIR/invalid_offset.rs:8:13 | ||
--> ../tests/compile-fail/invalid_offset.rs:8:13 | ||
| | ||
8 | let _ = offset!(); | ||
| ^^^^^^^^^ | ||
| | ||
= note: this error originates in the macro `offset` (in Nightly builds, run with -Z macro-backtrace for more info) | ||
|
||
error: invalid component: hour was 0a | ||
--> $DIR/invalid_offset.rs:9:22 | ||
--> ../tests/compile-fail/invalid_offset.rs:9:22 | ||
| | ||
9 | let _ = offset!(+0a); | ||
| ^^ | ||
|
||
error: invalid component: minute was 0a | ||
--> $DIR/invalid_offset.rs:10:24 | ||
--> ../tests/compile-fail/invalid_offset.rs:10:24 | ||
| | ||
10 | let _ = offset!(+0:0a); | ||
| ^^ | ||
|
||
error: invalid component: second was 0a | ||
--> $DIR/invalid_offset.rs:11:27 | ||
--> ../tests/compile-fail/invalid_offset.rs:11:27 | ||
| | ||
11 | let _ = offset!(+0:00: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 |
---|---|---|
|
@@ -30,3 +30,4 @@ workspace = true | |
|
||
[dependencies] | ||
time-core = { workspace = true } | ||
num-conv = { workspace = true } |
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
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.