Skip to content

Commit 2efe9e2

Browse files
authored
Merge pull request RustPython#3724 from youknowone/instr-size
ensure bytecode::Instruction never grows more than 8bytes
2 parents 3398d55 + 291c037 commit 2efe9e2

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bytecode/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,4 @@ num-complex = { version = "0.4.0", features = ["serde"] }
1717
serde = { version = "1.0.136", features = ["derive"] }
1818
itertools = "0.10.3"
1919
bstr = "0.2.17"
20+
static_assertions = "1.1.0"

bytecode/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,7 @@ pub enum Instruction {
394394
GetANext,
395395
EndAsyncFor,
396396
}
397+
static_assertions::assert_eq_size!(Instruction, u64);
397398

398399
use self::Instruction::*;
399400

0 commit comments

Comments
 (0)