-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
allow calling
assert_type{,_eq}!
at top-level & const ctx
This commit allows using `assert_type_eq!` and `assert_type!` macros at top level. This is done by using `const _` instead of `let _`. `const`s could not be uninitialized, so PhantomData is also used. Note: this requires rustc version 1.37.0 or higher.
- Loading branch information
1 parent
8362450
commit a0be662
Showing
3 changed files
with
6 additions
and
4 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 |
---|---|---|
|
@@ -3,7 +3,7 @@ rust: | |
- stable | ||
- beta | ||
- nightly | ||
- 1.22.0 | ||
- 1.37.0 | ||
cache: cargo | ||
os: | ||
- linux | ||
|
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