diff --git a/.travis.yml b/.travis.yml index bf1231a14..b8eb27db4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,7 @@ rust: - stable - beta - nightly - - 1.22.0 + - 1.37.0 cache: cargo os: - linux diff --git a/CHANGELOG.md b/CHANGELOG.md index ab09f745c..c71c4a524 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,11 +2,13 @@ This project follows semantic versioning. -The MSRV (Minimum Supported Rust Version) is 1.22.0, and typenum is tested against this Rust +The MSRV (Minimum Supported Rust Version) is 1.37.0, and typenum is tested against this Rust version. Much of typenum should work on as low a version as 1.20.0, but that is not guaranteed. ### Unreleased +- [changed] Allowed calling `assert_type_eq` and `assert_type` at top level + ### 1.12.0 (2020-04-13) - [added] Feature `force_unix_path_separator` to support building without Cargo. - [added] Greatest common divisor operator `Gcd` with alias `Gcf`. diff --git a/src/lib.rs b/src/lib.rs index 022fa655c..a095bb387 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -140,7 +140,7 @@ impl Ord for Equal { #[macro_export] macro_rules! assert_type_eq { ($a:ty, $b:ty) => { - let _: <$a as $crate::Same<$b>>::Output; + const _: core::marker::PhantomData<<$a as $crate::Same<$b>>::Output> = core::marker::PhantomData; }; } @@ -148,6 +148,6 @@ macro_rules! assert_type_eq { #[macro_export] macro_rules! assert_type { ($a:ty) => { - let _: <$a as $crate::Same>::Output; + const _: core::marker::PhantomData<<$a as $crate::Same>::Output> = core::marker::PhantomData; }; }