mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-03 18:28:24 +00:00
Use Rust 1.76 (#9897)
This commit is contained in:
parent
eb2784c495
commit
688177ff6a
6 changed files with 24 additions and 25 deletions
|
@ -25,7 +25,6 @@ once_cell = { workspace = true }
|
|||
rustc-hash = { workspace = true }
|
||||
serde = { workspace = true, optional = true }
|
||||
smallvec = { workspace = true }
|
||||
static_assertions = { workspace = true }
|
||||
|
||||
[dev-dependencies]
|
||||
insta = { workspace = true }
|
||||
|
|
|
@ -3880,18 +3880,22 @@ impl Ranged for crate::nodes::ParameterWithDefault {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(target_pointer_width = "64")]
|
||||
mod size_assertions {
|
||||
use static_assertions::assert_eq_size;
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
#[allow(clippy::wildcard_imports)]
|
||||
use super::*;
|
||||
|
||||
assert_eq_size!(Stmt, [u8; 144]);
|
||||
assert_eq_size!(StmtFunctionDef, [u8; 144]);
|
||||
assert_eq_size!(StmtClassDef, [u8; 104]);
|
||||
assert_eq_size!(StmtTry, [u8; 112]);
|
||||
assert_eq_size!(Expr, [u8; 80]);
|
||||
assert_eq_size!(Pattern, [u8; 96]);
|
||||
assert_eq_size!(Mod, [u8; 32]);
|
||||
#[test]
|
||||
#[cfg(target_pointer_width = "64")]
|
||||
fn size() {
|
||||
assert!(std::mem::size_of::<Stmt>() <= 144);
|
||||
assert!(std::mem::size_of::<StmtFunctionDef>() <= 144);
|
||||
assert!(std::mem::size_of::<StmtClassDef>() <= 104);
|
||||
assert!(std::mem::size_of::<StmtTry>() <= 112);
|
||||
// 80 for Rustc < 1.76
|
||||
assert!(matches!(std::mem::size_of::<Expr>(), 72 | 80));
|
||||
// 96 for Rustc < 1.76
|
||||
assert!(matches!(std::mem::size_of::<Pattern>(), 88 | 96));
|
||||
assert!(std::mem::size_of::<Mod>() <= 32);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue