Gate f-string struct size test for Rustc < 1.76 (#10371)

Closes https://github.com/astral-sh/ruff/issues/10319.
This commit is contained in:
Charlie Marsh 2024-03-12 12:46:36 -07:00 committed by GitHub
parent 87afe36c87
commit dbf82233b8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -4148,7 +4148,8 @@ mod tests {
assert_eq!(std::mem::size_of::<ExprDict>(), 56);
assert_eq!(std::mem::size_of::<ExprDictComp>(), 48);
assert_eq!(std::mem::size_of::<ExprEllipsisLiteral>(), 8);
assert_eq!(std::mem::size_of::<ExprFString>(), 48);
// 56 for Rustc < 1.76
assert!(matches!(std::mem::size_of::<ExprFString>(), 48 | 56));
assert_eq!(std::mem::size_of::<ExprGenerator>(), 48);
assert_eq!(std::mem::size_of::<ExprIf>(), 32);
assert_eq!(std::mem::size_of::<ExprIpyEscapeCommand>(), 32);