Skip to content

Commit

Permalink
Remove memoffset dependency.
Browse files Browse the repository at this point in the history
`std::mem::offset` has been availible on stable since 1.77.0.
`memoffset` uses this when compiled against a recent enough rustc.

Moving to the implementation in `std` lets us drop both `memoffset` and `autocfg` from our dependencies.
  • Loading branch information
aDotInTheVoid committed Jun 3, 2024
1 parent c082936 commit 4e2948c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
3 changes: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ repository = "https://github.com/rust-analyzer/rowan"
license = "MIT OR Apache-2.0"
description = "Library for generic lossless syntax trees"
edition = "2021"

rust-version = "1.77.0"
exclude = [".github/", "bors.toml", "rustfmt.toml"]

[workspace]
Expand All @@ -18,7 +18,6 @@ hashbrown = { version = "0.14.3", features = [
"inline-more",
], default-features = false }
text-size = "1.1.0"
memoffset = "0.9"
countme = "3.0.0"

serde = { version = "1.0.89", optional = true, default-features = false }
Expand Down
4 changes: 1 addition & 3 deletions src/arc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::{
cmp::Ordering,
hash::{Hash, Hasher},
marker::PhantomData,
mem::{self, ManuallyDrop},
mem::{self, offset_of, ManuallyDrop},
ops::Deref,
ptr,
sync::atomic::{
Expand All @@ -13,8 +13,6 @@ use std::{
},
};

use memoffset::offset_of;

/// A soft limit on the amount of references that may be made to an `Arc`.
///
/// Going above this limit will abort your program (although not
Expand Down

0 comments on commit 4e2948c

Please sign in to comment.