diff --git a/tests/safety.rs b/tests/safety.rs index a938a25..952cd87 100644 --- a/tests/safety.rs +++ b/tests/safety.rs @@ -10,7 +10,13 @@ fn discriminant() { assert_eq!(size_of::(), size_of_val(&discriminant(&Test::A))); - assert_eq!(0_isize, unsafe { transmute(discriminant(&Test::A)) }); - assert_eq!(1_isize, unsafe { transmute(discriminant(&Test::B)) }); - assert_eq!(2_isize, unsafe { transmute(discriminant(&Test::C)) }); + assert_eq!(0_isize, unsafe { + transmute::, isize>(discriminant(&Test::A)) + }); + assert_eq!(1_isize, unsafe { + transmute::, isize>(discriminant(&Test::B)) + }); + assert_eq!(2_isize, unsafe { + transmute::, isize>(discriminant(&Test::C)) + }); } diff --git a/tests/skip/field_trait.rs b/tests/skip/field_trait.rs index 3d459c8..567b4bf 100644 --- a/tests/skip/field_trait.rs +++ b/tests/skip/field_trait.rs @@ -1,3 +1,4 @@ +#![allow(unused)] use std::cmp::Ordering; use derive_where::derive_where; diff --git a/tests/skip/struct_trait.rs b/tests/skip/struct_trait.rs index 772e7ed..e9df4a7 100644 --- a/tests/skip/struct_trait.rs +++ b/tests/skip/struct_trait.rs @@ -1,3 +1,4 @@ +#![allow(unused)] use std::cmp::Ordering; use derive_where::derive_where; diff --git a/tests/skip/variant_trait.rs b/tests/skip/variant_trait.rs index 0f66da0..83ab7c3 100644 --- a/tests/skip/variant_trait.rs +++ b/tests/skip/variant_trait.rs @@ -1,3 +1,4 @@ +#![allow(unused)] use std::cmp::Ordering; use derive_where::derive_where;