Skip to content

Commit 85838ce

Browse files
committed
xtask: fix check-raw
check-raw is very strict. Relaxing it gives uefi-raw more freedom, which is especially needed for the more high-level IpAddress type changes.
1 parent 8e4c873 commit 85838ce

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

xtask/src/check_raw.rs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,12 @@ fn check_fields(fields: &Punctuated<Field, Comma>, src: &Path) -> Result<(), Err
280280
}
281281

282282
/// List with allowed combinations of representations (see [`Repr`]).
283-
const ALLOWED_REPRS: &[&[Repr]] = &[&[Repr::C], &[Repr::C, Repr::Packed], &[Repr::Transparent]];
283+
const ALLOWED_REPRS: &[&[Repr]] = &[
284+
&[Repr::C],
285+
&[Repr::C, Repr::Packed],
286+
&[Repr::Transparent],
287+
&[Repr::Align(4), Repr::C],
288+
];
284289

285290
fn check_type_attrs(attrs: &[Attribute], spanned: &dyn Spanned, src: &Path) -> Result<(), Error> {
286291
let attrs = parse_attrs(attrs, src)?;
@@ -482,7 +487,7 @@ mod tests {
482487
}
483488
}
484489
},
485-
ErrorKind::ForbiddenRepr,
490+
ErrorKind::ForbiddenRepr(vec![Repr::C]),
486491
);
487492
}
488493

@@ -614,7 +619,7 @@ mod tests {
614619
pub f: u32,
615620
}
616621
},
617-
ErrorKind::ForbiddenRepr,
622+
ErrorKind::ForbiddenRepr(vec![Repr::Rust]),
618623
);
619624

620625
// Forbidden attr.

0 commit comments

Comments
 (0)