Skip to content

Commit

Permalink
Gate f-string struct size test for Rustc < 1.76 (#10371)
Browse files Browse the repository at this point in the history
Closes #10319.
  • Loading branch information
charliermarsh committed Mar 12, 2024
1 parent 87afe36 commit dbf8223
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/ruff_python_ast/src/nodes.rs
Expand Up @@ -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);
Expand Down

0 comments on commit dbf8223

Please sign in to comment.