Skip to content

Commit

Permalink
Bump MSRV to 1.84 (#4165)
Browse files Browse the repository at this point in the history
  • Loading branch information
jedel1043 authored Feb 18, 2025
1 parent 226e707 commit 8f22a8e
Show file tree
Hide file tree
Showing 13 changed files with 103 additions and 141 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@ jobs:

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
# TODO: There seems to be an issue with the 1.83.0 toolchain and tarpaulin.
# See: https://github.com/xd009642/tarpaulin/issues/1642
toolchain: 1.82.0

- uses: Swatinem/rust-cache@v2
with:
Expand Down
107 changes: 59 additions & 48 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ exclude = [
[workspace.package]
edition = "2021"
version = "0.20.0"
rust-version = "1.82.0"
rust-version = "1.84.0"
authors = ["boa-dev"]
repository = "https://github.com/boa-dev/boa"
license = "Unlicense OR MIT"
Expand Down Expand Up @@ -95,8 +95,6 @@ syn = { version = "2.0.98", default-features = false }
proc-macro2 = "1.0"
synstructure = "0.13"
measureme = "12.0.1"
# TODO: when moving past 1.84, remove dependency to sptr and use `.addr()` directly.
sptr = "0.3.2"
paste = "1.0"
rand = "0.9.0"
num-integer = "0.1.46"
Expand Down
2 changes: 1 addition & 1 deletion core/engine/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ ryu-js.workspace = true
fast-float2.workspace = true
once_cell = { workspace = true, features = ["std"] }
tap.workspace = true
sptr.workspace = true

thiserror.workspace = true
dashmap.workspace = true
num_enum.workspace = true
Expand Down
4 changes: 1 addition & 3 deletions core/engine/src/builtins/array_buffer/shared.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![allow(unstable_name_collisions)]

use std::{
alloc,
sync::{atomic::Ordering, Arc},
Expand Down Expand Up @@ -610,7 +608,7 @@ pub(crate) fn create_shared_byte_data_block(
// This could be replaced with a custom `Box` implementation, but most architectures
// already align pointers to 8 bytes, so it's a lot of work for such a small
// compatibility improvement.
assert_eq!(sptr::Strict::addr(buffer.as_ptr()) % align_of::<u64>(), 0);
assert_eq!(buffer.as_ptr().addr() % align_of::<u64>(), 0);

// 3. Return db.
Ok(buffer)
Expand Down
10 changes: 4 additions & 6 deletions core/engine/src/builtins/array_buffer/utils.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![allow(unstable_name_collisions)]

use std::{ptr, slice::SliceIndex, sync::atomic::Ordering};

use portable_atomic::AtomicU8;
Expand Down Expand Up @@ -55,8 +53,8 @@ impl SliceRef<'_> {
#[cfg(debug_assertions)]
pub(crate) fn addr(&self) -> usize {
match self {
Self::Slice(buf) => sptr::Strict::addr(buf.as_ptr()),
Self::AtomicSlice(buf) => sptr::Strict::addr(buf.as_ptr()),
Self::Slice(buf) => buf.as_ptr().addr(),
Self::AtomicSlice(buf) => buf.as_ptr().addr(),
}
}

Expand Down Expand Up @@ -242,8 +240,8 @@ impl SliceRefMut<'_> {
#[cfg(debug_assertions)]
pub(crate) fn addr(&self) -> usize {
match self {
Self::Slice(buf) => sptr::Strict::addr(buf.as_ptr()),
Self::AtomicSlice(buf) => sptr::Strict::addr(buf.as_ptr()),
Self::Slice(buf) => buf.as_ptr().addr(),
Self::AtomicSlice(buf) => buf.as_ptr().addr(),
}
}

Expand Down
Loading

0 comments on commit 8f22a8e

Please sign in to comment.