Skip to content

Commit 78c5717

Browse files
committed
Replace #[cross_check] structure attribute with #[cross_check_hash] directly to fix structure.rs tests
1 parent 4fff66d commit 78c5717

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

cross-checks/rust-checks/rustc-plugin/tests/structure.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,10 @@ macro_rules! test_struct {
2626
([$($attrs:meta),*]
2727
{$([$($field_attrs:meta),*] $field:ident : $field_ty:ty = $field_val:expr),*}
2828
[$(($ahasher:path, $shasher:path, $val:expr)),*]) => {
29-
#[cross_check(yes, $($attrs),*)]
29+
#[derive(CrossCheckHash)]
30+
#[cross_check_hash($($attrs),*)]
3031
struct TestStruct {
31-
$(#[cross_check($($field_attrs),*)] $field: $field_ty),*
32+
$(#[cross_check_hash($($field_attrs),*)] $field: $field_ty),*
3233
};
3334
let ts = TestStruct { $($field: $field_val),* };
3435
$({
@@ -101,7 +102,7 @@ fn test_skip_field() {
101102
#[test]
102103
fn test_fixed_hash() {
103104
test_struct!([]
104-
{ [fixed=0x0f0f0f0f0f0f0f0f] x: u64 = 0x12345678 }
105+
{ [fixed="0x0f0f0f0f0f0f0f0f"] x: u64 = 0x12345678 }
105106
[(SimpleHasher, SimpleHasher, 1u64)]);
106107
}
107108

0 commit comments

Comments
 (0)