diff --git a/Cargo.toml b/Cargo.toml index 644088cec27..7bdf9123fc8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,7 +20,7 @@ members = [ [workspace.package] edition = "2021" version = "0.17.0" -rust-version = "1.66" +rust-version = "1.71" authors = ["boa-dev"] repository = "https://github.com/boa-dev/boa" license = "Unlicense OR MIT" diff --git a/boa_engine/src/vm/code_block.rs b/boa_engine/src/vm/code_block.rs index b52229e0b7c..f4ca2fb62e5 100644 --- a/boa_engine/src/vm/code_block.rs +++ b/boa_engine/src/vm/code_block.rs @@ -264,7 +264,7 @@ impl CodeBlock { /// # Safety /// /// Does not check if read happens out-of-bounds. - pub(crate) unsafe fn read_unchecked(&self, offset: usize) -> T + pub(crate) const unsafe fn read_unchecked(&self, offset: usize) -> T where T: Readable, { diff --git a/boa_engine/src/vm/opcode/mod.rs b/boa_engine/src/vm/opcode/mod.rs index 8dbdb1172ed..6d2a1134403 100644 --- a/boa_engine/src/vm/opcode/mod.rs +++ b/boa_engine/src/vm/opcode/mod.rs @@ -96,7 +96,7 @@ use thin_vec::ThinVec; /// # Safety /// /// Does not check if read happens out-of-bounds. -pub(crate) unsafe fn read_unchecked(bytes: &[u8], offset: usize) -> T +pub(crate) const unsafe fn read_unchecked(bytes: &[u8], offset: usize) -> T where T: Readable, {