From b061679ed423100e3327e01e1e360ab9e6ba31d2 Mon Sep 17 00:00:00 2001 From: Roland Fredenhagen Date: Sat, 3 Aug 2024 23:40:34 +0200 Subject: [PATCH] fixup! Fix clippy --- tests/safety.rs | 12 +++++++++--- tests/skip/field_trait.rs | 1 + tests/skip/struct_trait.rs | 1 + tests/skip/variant_trait.rs | 1 + 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/tests/safety.rs b/tests/safety.rs index a938a255..952cd874 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 3d459c86..567b4bf9 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 772e7ed1..e9df4a71 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 0f66da0c..83ab7c36 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;