Fix tests.

This commit is contained in:
Zachary S 2022-11-15 20:20:26 -06:00
parent 45f8752984
commit e954e03307

View File

@ -160,7 +160,7 @@ struct AnyBitPatternTest {
struct NewtypeWrapperTest<T>(T);
#[derive(
Debug, Copy, Clone, PartialEq, Eq, TransparentWrapper,
Debug, Clone, PartialEq, Eq, TransparentWrapper,
)]
#[repr(transparent)]
struct AlgebraicNewtypeWrapperTest<T>(Vec<T>);
@ -173,7 +173,7 @@ fn algebraic_newtype_corect() {
}
#[derive(
Debug, Copy, Clone, PartialEq, Eq, TransparentWrapper,
Debug, Clone, PartialEq, Eq, TransparentWrapper,
)]
#[repr(transparent)]
#[transparent(Vec<T>)]
@ -182,7 +182,7 @@ struct AlgebraicNewtypeWrapperTestWithFields<T, U>(Vec<T>, PhantomData<U>);
#[test]
fn algebraic_newtype_fields_corect() {
let x: Vec<u32> = vec![1, 2, 3, 4];
let y: AlgebraicNewtypeWrapperTest<u32, f32> = AlgebraicNewtypeWrapperTest::wrap(x.clone());
let y: AlgebraicNewtypeWrapperTestWithFields<u32, f32> = AlgebraicNewtypeWrapperTestWithFields::wrap(x.clone());
assert_eq!(y.0, x);
}