From 8391afa876ba2e99dffb0c991cc7fa775287d106 Mon Sep 17 00:00:00 2001 From: "C. K. Young" Date: Thu, 23 Mar 2023 20:22:56 -0400 Subject: [PATCH] Make `AnyBitPattern` derive work for generic structs (#101) * Allow generic structs to use `AnyBitPattern` derive. * Attempt to nudge the CI into retrying. --- derive/tests/basic.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/derive/tests/basic.rs b/derive/tests/basic.rs index e53344e..1be54c4 100644 --- a/derive/tests/basic.rs +++ b/derive/tests/basic.rs @@ -155,9 +155,9 @@ struct CheckedBitPatternStruct { #[derive(Debug, Copy, Clone, AnyBitPattern, PartialEq, Eq)] #[repr(C)] -struct AnyBitPatternTest { - a: u16, - b: u16, +struct AnyBitPatternTest { + a: A, + b: B, } /// ```compile_fail @@ -259,8 +259,8 @@ fn passes_cast_struct() { #[test] fn anybitpattern_implies_zeroable() { - let test = AnyBitPatternTest::zeroed(); - assert_eq!(test, AnyBitPatternTest { a: 0, b: 0 }); + let test = AnyBitPatternTest::::zeroed(); + assert_eq!(test, AnyBitPatternTest { a: 0isize, b: 0usize }); } #[test]