Merge "Update memoffset to 0.9.1" into main
diff --git a/crates/memoffset/.android-checksum.json b/crates/memoffset/.android-checksum.json
index 9bdb560..5cb5e61 100644
--- a/crates/memoffset/.android-checksum.json
+++ b/crates/memoffset/.android-checksum.json
@@ -1 +1 @@
-{"package":null,"files":{".cargo-checksum.json":"b49f16087c7086b02f8333f5511860833bc850983eee850753856448e5c219cf","Android.bp":"c989c4d57e91ccfb16b80b670210bd83ba12bd60e1f5be9211167aaa3a7481ca","Cargo.toml":"9af91b97b27ea0453853bdc45c70f6f96f9438ab0ee830a1f068ee4eee4a1208","LICENSE":"ac13cdaa1e9ba8b68a3dbd3136fcaf5d1c22e8cc0d310b58547c60e25f5b1ca8","METADATA":"c1a31ed356d797aef6f9610a8797f976ec3a14d539446beb2a2648e1af3772a3","MODULE_LICENSE_MIT":"0d6f8afa3940b7f06bebee651376d43bc8b0d5b437337be2696d30377451e93a","README.md":"21172881491abcc5b49d4e0c014c4ca28a7360f4f76fe685fec462cbe828456f","TEST_MAPPING":"c528eb3aae8a5dc27dfd693486b9d23b2d472810667c67c894a2778bbb5d2bf5","build.rs":"6be2557069f324a9a302ac9b4cf8a7c3a45219018823ec3f206b48624d1bee42","cargo_embargo.json":"2c90cb26c44ebcd52241cce56e0f18ef2af9e79d024d78839a05609503a53993","src/lib.rs":"5a94ab1ce0756cf16e72d1bada0ea49eab75e41b3af46b175e0684a01a7a1863","src/offset_of.rs":"a18bcdde54da112aa5dbf1b1a61ba23e9a8fbff6b355ea66e79be72b54f8eb0a","src/raw_field.rs":"9a052863cc5f7f03b5ccdf790ea188f859fa2240cd71513a866d105e5efca420","src/span_of.rs":"2c6a040d5061613c54e5b869cc4e5195965c2484878dfc0c1335c197b5af9c7f"}}
\ No newline at end of file
+{"package":null,"files":{".cargo-checksum.json":"e4d160493a4e5edd93e9a6699f0a307b3e560c2aa685d3b5b01d5daf96953e72","Android.bp":"ef70d00b40cca5ed16c946f66c7c4cfa2f06cd9c167b601ad90818fc02ce6600","CHANGELOG.md":"d1a767f0b72b210c2fdfd5261e6854db96ade400fa899607e61f31eb797c2f4e","Cargo.toml":"8c76315525b109f283da051f625af5823a8272ecbfff0e9c7df8e8136d26cad8","LICENSE":"ac13cdaa1e9ba8b68a3dbd3136fcaf5d1c22e8cc0d310b58547c60e25f5b1ca8","METADATA":"7fe8c50e491fca8c5fc591fd593f9b58ee600fe4fc2158ed004c39924ffbac60","MODULE_LICENSE_MIT":"0d6f8afa3940b7f06bebee651376d43bc8b0d5b437337be2696d30377451e93a","README.md":"162bcfe670b608fd58ec3838443e75f6ba4c703a34afc6e6cc8095a0641eb1d4","TEST_MAPPING":"c528eb3aae8a5dc27dfd693486b9d23b2d472810667c67c894a2778bbb5d2bf5","build.rs":"f7acdb973b2a1cca0d70c4262ac0eee605d0310523890d12ca115eb533609703","cargo_embargo.json":"2c90cb26c44ebcd52241cce56e0f18ef2af9e79d024d78839a05609503a53993","src/lib.rs":"efe36c6a27ecdcfbf94473cda3e0ec992706fcd8f0046a617050b1aee2de2a13","src/offset_of.rs":"4be8782618b7675601ab0d8068f92c62219f5231c641f4fe6d1b40be2972d874","src/raw_field.rs":"97e9bdc23899594d1ba2bb1d43b8d7da46b2ce2983da88da86e0fd0ea3bcf3f9","src/span_of.rs":"067f813fa8ded3cb0f74c2d759186ced99e267e747ce777e6a8923a885e281ce"}}
\ No newline at end of file
diff --git a/crates/memoffset/.cargo-checksum.json b/crates/memoffset/.cargo-checksum.json
index 07f8b91..82c1868 100644
--- a/crates/memoffset/.cargo-checksum.json
+++ b/crates/memoffset/.cargo-checksum.json
@@ -1 +1 @@
-{"files":{"Cargo.toml":"9039cd9c621a44a65a2fe19c2e883a7b06c6801c64bb9d2255c94adc2051880f","LICENSE":"3234ac55816264ee7b6c7ee27efd61cf0a1fe775806870e3d9b4c41ea73c5cb1","README.md":"a673f0b4b5ac46034590a670572bd1a87837fdedb5170dabbea08d392e6cfa4b","build.rs":"df34c830dbb08eba3474304eed481bc2c8a29e897bc50f46d37b5dbb6e443a2b","src/lib.rs":"a91af41fef48edc5295a99cf90b14273e04db201ed65d88dea101496112c8cd5","src/offset_of.rs":"501f3eb9ec2ada6bd9cd18c73eafdd8ac75bfbfe7e7b543428d9bb97e1cbc478","src/raw_field.rs":"ef54087d5f507c2b639a4f61f2881eb1e41a46e22191ffd0e23b2fe9e3f17c25","src/span_of.rs":"b900faef2b852b52c37c55a172c05c9144bfff7d84dbc06e943fb0453d68adfc"},"package":"5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c"}
\ No newline at end of file
+{"files":{"CHANGELOG.md":"badae1c4dc22e994d6e29d892bd925083d948d941f11ee7b767a535bd4ff5f9a","Cargo.toml":"772e523da630871e710cc229f36282205713bba853d4d3f78e5a5d099bb3a814","LICENSE":"3234ac55816264ee7b6c7ee27efd61cf0a1fe775806870e3d9b4c41ea73c5cb1","README.md":"c04d939e7dc8bc21010cae6d22bf7f16e019960c0adbae4f894f47c24c54e109","build.rs":"0ddaae191a4091fe1318177d12244ff0dbabc17a18f25a54059f4badc9a20876","src/lib.rs":"c4034868e7f7b5c03848a735589081bc763f62f6fe8eb4175873c97db1f855a3","src/offset_of.rs":"fdd36253329210293cc867d7fb0a5bca2ec7f12befa9a30c88b85932ead4cd34","src/raw_field.rs":"95a17510c77b11ecb68b170f724ca1c71517ff1476024bcba48c70ca712c21cc","src/span_of.rs":"268505154f4ae3df1a961da047fef50200339f4d75d8e4d6b9340ee14028943a"},"package":"488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a"}
\ No newline at end of file
diff --git a/crates/memoffset/Android.bp b/crates/memoffset/Android.bp
index 52914d6..9302556 100644
--- a/crates/memoffset/Android.bp
+++ b/crates/memoffset/Android.bp
@@ -18,7 +18,7 @@
     host_supported: true,
     crate_name: "memoffset",
     cargo_env_compat: true,
-    cargo_pkg_version: "0.9.0",
+    cargo_pkg_version: "0.9.1",
     crate_root: "src/lib.rs",
     edition: "2015",
     features: ["default"],
@@ -29,6 +29,7 @@
         "maybe_uninit",
         "raw_ref_macros",
         "stable_const",
+        "stable_offset_of",
         "tuple_ty",
     ],
     apex_available: [
@@ -45,7 +46,7 @@
     host_supported: true,
     crate_name: "memoffset",
     cargo_env_compat: true,
-    cargo_pkg_version: "0.9.0",
+    cargo_pkg_version: "0.9.1",
     crate_root: "src/lib.rs",
     test_suites: ["general-tests"],
     auto_gen_config: true,
@@ -61,6 +62,7 @@
         "maybe_uninit",
         "raw_ref_macros",
         "stable_const",
+        "stable_offset_of",
         "tuple_ty",
     ],
 }
@@ -69,7 +71,7 @@
     name: "libmemoffset_nostd",
     crate_name: "memoffset",
     cargo_env_compat: true,
-    cargo_pkg_version: "0.9.0",
+    cargo_pkg_version: "0.9.1",
     crate_root: "src/lib.rs",
     edition: "2015",
     features: ["default"],
@@ -79,6 +81,7 @@
         "maybe_uninit",
         "raw_ref_macros",
         "stable_const",
+        "stable_offset_of",
         "tuple_ty",
     ],
     apex_available: [
diff --git a/crates/memoffset/CHANGELOG.md b/crates/memoffset/CHANGELOG.md
new file mode 100644
index 0000000..b1b0e63
--- /dev/null
+++ b/crates/memoffset/CHANGELOG.md
@@ -0,0 +1,32 @@
+# Changelog
+
+## Unreleased
+
+## v0.9.1 (26/03/2024)
+### Added
+ - Added changelog
+
+### Changed
+ - Clarify documentation about macro indirection
+ - Turn the crate into a thin stdlib wrapper on rustc>=1.77
+ - Turn `unstable_offset_of` and `unstable_const` into NOPs; they are not needed any more on recent nightlies
+
+## v0.9.0 (18/05/2023)
+### Added
+ - Cargo feature `unstable_offset_of` which turns the crate into a stdlib polyfill
+
+## v0.8.0 (15/12/2022)
+### Changed
+ - Constant-evaluation is automatically enabled
+
+## v0.7.1 (17/10/2022)
+### Changed
+ - Version in `README.md`
+
+## v0.7.0 (17/10/2022)
+### Added
+ - `offset_of_union!`
+
+## v0.6.5 (03/12/2021)
+### Removed
+ - [nightly] `#![feature(const_raw_ptr_deref, const_maybe_uninit_as_ptr)]`
diff --git a/crates/memoffset/Cargo.toml b/crates/memoffset/Cargo.toml
index 77fe68f..24fefcc 100644
--- a/crates/memoffset/Cargo.toml
+++ b/crates/memoffset/Cargo.toml
@@ -11,7 +11,7 @@
 
 [package]
 name = "memoffset"
-version = "0.9.0"
+version = "0.9.1"
 authors = ["Gilad Naaman <[email protected]>"]
 description = "offset_of functionality for Rust structs."
 readme = "README.md"
diff --git a/crates/memoffset/METADATA b/crates/memoffset/METADATA
index 6b3f9f6..cccbadf 100644
--- a/crates/memoffset/METADATA
+++ b/crates/memoffset/METADATA
@@ -1,17 +1,17 @@
 name: "memoffset"
 description: "offset_of functionality for Rust structs."
 third_party {
-  version: "0.9.0"
+  version: "0.9.1"
   license_type: NOTICE
   last_upgrade_date {
-    year: 2023
-    month: 9
-    day: 5
+    year: 2025
+    month: 1
+    day: 14
   }
   homepage: "https://crates.io/crates/memoffset"
   identifier {
     type: "Archive"
-    value: "https://static.crates.io/crates/memoffset/memoffset-0.9.0.crate"
-    version: "0.9.0"
+    value: "https://static.crates.io/crates/memoffset/memoffset-0.9.1.crate"
+    version: "0.9.1"
   }
 }
diff --git a/crates/memoffset/README.md b/crates/memoffset/README.md
index b0bfd10..fd621db 100644
--- a/crates/memoffset/README.md
+++ b/crates/memoffset/README.md
@@ -12,12 +12,14 @@
 
 `memoffset` works under `no_std` environments.
 
+If you're using a rustc version greater or equal to 1.77, this crate's `offset_of!()` macro simply forwards to `core::mem::offset_of!()`.
+
 ## Usage ##
 Add the following dependency to your `Cargo.toml`:
 
 ```toml
 [dependencies]
-memoffset = "0.8"
+memoffset = "0.9"
 ```
 
 These versions will compile fine with rustc versions greater or equal to 1.19.
@@ -47,39 +49,7 @@
 ```
 
 ## Usage in constants ##
-`memoffset` has support for compile-time `offset_of!` on rust>=1.65, or on older nightly compilers.
+`memoffset` has support for compile-time `offset_of!` on rust>=1.65.
 
-### Usage on stable Rust ###
-Constant evaluation is automatically enabled and avilable on stable compilers starting with rustc 1.65.
-
-This is an incomplete implementation with one caveat:
+On versions below 1.77, this is an incomplete implementation with one caveat:
 Due to dependence on [`#![feature(const_refs_to_cell)]`](https://github.com/rust-lang/rust/issues/80384), you cannot get the offset of a `Cell` field in a const-context.
-
-This means that if need to get the offset of a cell, you'll have to remain on nightly for now.
-
-### Usage on recent nightlies ###
-
-If you're using a new-enough nightly and you require the ability to get the offset of a `Cell`,
-you'll have to enable the `unstable_const` cargo feature, as well as enabling `const_refs_to_cell` in your crate root.
-
-Do note that `unstable_const` is an unstable feature that is set to be removed in a future version of `memoffset`.
-
-Cargo.toml:
-```toml
-[dependencies.memoffset]
-version = "0.8"
-features = ["unstable_const"]
-```
-
-Your crate root: (`lib.rs`/`main.rs`)
-```rust,ignore
-#![feature(const_refs_to_cell)]
-```
-
-### Usage on older nightlies ###
-In order to use it on an older nightly compiler, you must enable the `unstable_const` crate feature and several compiler features.
-
-Your crate root: (`lib.rs`/`main.rs`)
-```rust,ignore
-#![feature(const_ptr_offset_from, const_refs_to_cell)]
-```
diff --git a/crates/memoffset/build.rs b/crates/memoffset/build.rs
index e18810f..0ef8901 100644
--- a/crates/memoffset/build.rs
+++ b/crates/memoffset/build.rs
@@ -22,4 +22,7 @@
     if ac.probe_rustc_version(1, 65) {
         println!("cargo:rustc-cfg=stable_const");
     }
+    if ac.probe_rustc_version(1, 77) {
+        println!("cargo:rustc-cfg=stable_offset_of");
+    }
 }
diff --git a/crates/memoffset/src/lib.rs b/crates/memoffset/src/lib.rs
index ccf182b..7e305b3 100644
--- a/crates/memoffset/src/lib.rs
+++ b/crates/memoffset/src/lib.rs
@@ -32,11 +32,9 @@
 //!     a: u32
 //! }
 //!
-//! fn main() {
-//!     assert_eq!(offset_of!(HelpMeIAmTrappedInAStructFactory, a), 15);
-//!     assert_eq!(span_of!(HelpMeIAmTrappedInAStructFactory, a), 15..19);
-//!     assert_eq!(span_of!(HelpMeIAmTrappedInAStructFactory, help_me_before_they_ .. a), 0..15);
-//! }
+//! assert_eq!(offset_of!(HelpMeIAmTrappedInAStructFactory, a), 15);
+//! assert_eq!(span_of!(HelpMeIAmTrappedInAStructFactory, a), 15..19);
+//! assert_eq!(span_of!(HelpMeIAmTrappedInAStructFactory, help_me_before_they_ .. a), 0..15);
 //! ```
 //!
 //! This functionality can be useful, for example, for checksum calculations:
@@ -56,12 +54,6 @@
 //! ```
 
 #![no_std]
-#![cfg_attr(
-    all(feature = "unstable_const", not(stable_const)),
-    feature(const_ptr_offset_from)
-)]
-#![cfg_attr(feature = "unstable_const", feature(const_refs_to_cell))]
-#![cfg_attr(feature = "unstable_offset_of", feature(allow_internal_unstable))]
 
 #[macro_use]
 #[cfg(doctests)]
diff --git a/crates/memoffset/src/offset_of.rs b/crates/memoffset/src/offset_of.rs
index 190ca72..33bf2bb 100644
--- a/crates/memoffset/src/offset_of.rs
+++ b/crates/memoffset/src/offset_of.rs
@@ -46,7 +46,7 @@
 }
 
 /// Macro to compute the distance between two pointers.
-#[cfg(any(feature = "unstable_const", stable_const))]
+#[cfg(stable_const)]
 #[macro_export]
 #[doc(hidden)]
 macro_rules! _memoffset_offset_from_unsafe {
@@ -58,7 +58,7 @@
         unsafe { (field as *const u8).offset_from(base as *const u8) as usize }
     }};
 }
-#[cfg(not(any(feature = "unstable_const", stable_const)))]
+#[cfg(not(stable_const))]
 #[macro_export]
 #[doc(hidden)]
 macro_rules! _memoffset_offset_from_unsafe {
@@ -67,7 +67,7 @@
         ($field as usize) - ($base as usize)
     };
 }
-#[cfg(not(feature = "unstable_offset_of"))]
+#[cfg(not(stable_offset_of))]
 #[macro_export(local_inner_macros)]
 #[doc(hidden)]
 macro_rules! _memoffset__offset_of_impl {
@@ -80,10 +80,9 @@
         _memoffset_offset_from_unsafe!(field_ptr, base_ptr)
     }};
 }
-#[cfg(feature = "unstable_offset_of")]
+#[cfg(stable_offset_of)]
 #[macro_export]
 #[doc(hidden)]
-#[allow_internal_unstable(offset_of)]
 macro_rules! _memoffset__offset_of_impl {
     ($parent:path, $field:tt) => {{
         $crate::__priv::mem::offset_of!($parent, $field)
@@ -103,10 +102,8 @@
 ///     c: [u8; 5]
 /// }
 ///
-/// fn main() {
-///     assert_eq!(offset_of!(Foo, a), 0);
-///     assert_eq!(offset_of!(Foo, b), 4);
-/// }
+/// assert_eq!(offset_of!(Foo, a), 0);
+/// assert_eq!(offset_of!(Foo, b), 4);
 /// ```
 ///
 /// ## Notes
@@ -121,23 +118,17 @@
 #[macro_export(local_inner_macros)]
 macro_rules! offset_of {
     ($parent:path, $field:tt) => {
+        // Macro implementation is delegated to another macro to have a
+        // single top-level macro to attach documentation to.
         _memoffset__offset_of_impl!($parent, $field)
     };
 }
 
-/// Calculates the offset of the specified field from the start of the tuple.
-///
-/// ## Examples
-/// ```
-/// use memoffset::offset_of_tuple;
-///
-/// fn main() {
-///     assert!(offset_of_tuple!((u8, u32), 1) >= 0, "Tuples do not have a defined layout");
-/// }
-/// ```
 #[cfg(tuple_ty)]
+#[cfg(not(stable_offset_of))]
 #[macro_export(local_inner_macros)]
-macro_rules! offset_of_tuple {
+#[doc(hidden)]
+macro_rules! _memoffset__offset_of_tuple_impl {
     ($parent:ty, $field:tt) => {{
         // Get a base pointer (non-dangling if rustc supports `MaybeUninit`).
         _memoffset__let_base_ptr!(base_ptr, $parent);
@@ -148,7 +139,35 @@
     }};
 }
 
-#[cfg(not(feature = "unstable_offset_of"))]
+#[cfg(tuple_ty)]
+#[cfg(stable_offset_of)]
+#[macro_export(local_inner_macros)]
+#[doc(hidden)]
+macro_rules! _memoffset__offset_of_tuple_impl {
+    ($parent:ty, $field:tt) => {{
+        $crate::__priv::mem::offset_of!($parent, $field)
+    }};
+}
+
+/// Calculates the offset of the specified field from the start of the tuple.
+///
+/// ## Examples
+/// ```
+/// use memoffset::offset_of_tuple;
+///
+/// assert!(offset_of_tuple!((u8, u32), 1) >= 0, "Tuples do not have a defined layout");
+/// ```
+#[cfg(tuple_ty)]
+#[macro_export(local_inner_macros)]
+macro_rules! offset_of_tuple {
+    ($parent:ty, $field:tt) => {{
+        // Macro implementation is delegated to another macro to have a
+        // single top-level macro to attach documentation to.
+        _memoffset__offset_of_tuple_impl!($parent, $field)
+    }};
+}
+
+#[cfg(not(stable_offset_of))]
 #[macro_export(local_inner_macros)]
 #[doc(hidden)]
 macro_rules! _memoffset__offset_of_union_impl {
@@ -162,10 +181,9 @@
     }};
 }
 
-#[cfg(feature = "unstable_offset_of")]
+#[cfg(stable_offset_of)]
 #[macro_export(local_inner_macros)]
 #[doc(hidden)]
-#[allow_internal_unstable(offset_of)]
 macro_rules! _memoffset__offset_of_union_impl {
     ($parent:path, $field:tt) => {{
         $crate::__priv::mem::offset_of!($parent, $field)
@@ -184,24 +202,26 @@
 ///     foo64: i64,
 /// }
 ///
-/// fn main() {
-///     assert!(offset_of_union!(Foo, foo64) == 0);
-/// }
+/// assert!(offset_of_union!(Foo, foo64) == 0);
 /// ```
 ///
 /// ## Note
-/// Due to macro_rules limitations, this macro will accept structs with a single field as well as unions.
+/// Due to `macro_rules!` limitations, this macro will accept structs with a single field as well as unions.
 /// This is not a stable guarantee, and future versions of this crate might fail
 /// on any use of this macro with a struct, without a semver bump.
 #[macro_export(local_inner_macros)]
 macro_rules! offset_of_union {
     ($parent:path, $field:tt) => {{
+        // Macro implementation is delegated to another macro to have a
+        // single top-level macro to attach documentation to.
         _memoffset__offset_of_union_impl!($parent, $field)
     }};
 }
 
 #[cfg(test)]
 mod tests {
+    #![cfg_attr(allow_clippy, allow(clippy::identity_op))] // For `... + 0` constructs below.
+
     #[test]
     fn offset_simple() {
         #[repr(C)]
@@ -217,7 +237,6 @@
     }
 
     #[test]
-    #[cfg_attr(miri, ignore)] // this creates unaligned references
     fn offset_simple_packed() {
         #[repr(C, packed)]
         struct Foo {
@@ -348,11 +367,7 @@
         assert_eq!(f_ptr as usize + 0, raw_field_union!(f_ptr, Foo, c) as usize);
     }
 
-    #[cfg(any(
-        feature = "unstable_const",
-        feature = "unstable_offset_of",
-        stable_const
-    ))]
+    #[cfg(any(stable_offset_of, stable_const))]
     #[test]
     fn const_offset() {
         #[repr(C)]
@@ -365,7 +380,7 @@
         assert_eq!([0; offset_of!(Foo, b)].len(), 4);
     }
 
-    #[cfg(feature = "unstable_const")]
+    #[cfg(stable_offset_of)]
     #[test]
     fn const_offset_interior_mutable() {
         #[repr(C)]
@@ -377,11 +392,7 @@
         assert_eq!([0; offset_of!(Foo, b)].len(), 4);
     }
 
-    #[cfg(any(
-        feature = "unstable_const",
-        feature = "unstable_offset_of",
-        stable_const
-    ))]
+    #[cfg(any(stable_offset_of, stable_const))]
     #[test]
     fn const_fn_offset() {
         const fn test_fn() -> usize {
diff --git a/crates/memoffset/src/raw_field.rs b/crates/memoffset/src/raw_field.rs
index e16df9f..c9e81fd 100644
--- a/crates/memoffset/src/raw_field.rs
+++ b/crates/memoffset/src/raw_field.rs
@@ -40,7 +40,7 @@
 
 /// Deref-coercion protection macro.
 ///
-/// Prevents complilation if the specified field name is not a part of the
+/// Prevents compilation if the specified field name is not a part of the
 /// struct definition.
 ///
 /// ```compile_fail
@@ -80,7 +80,7 @@
 
 /// Deref-coercion protection macro.
 ///
-/// Prevents complilation if the specified type is not a tuple.
+/// Prevents compilation if the specified type is not a tuple.
 ///
 /// ```compile_fail
 /// use memoffset::_memoffset__field_check_tuple;
@@ -176,7 +176,7 @@
 }
 
 /// Computes a const raw pointer to the given field of the given base pointer
-/// to the given parent tuple typle.
+/// to the given parent tuple type.
 ///
 /// The `base` pointer *must not* be dangling, but it *may* point to
 /// uninitialized memory.
@@ -198,7 +198,7 @@
 }
 
 /// Computes a const raw pointer to the given field of the given base pointer
-/// to the given parent tuple typle.
+/// to the given parent tuple type.
 ///
 /// The `base` pointer *must not* be dangling, but it *may* point to
 /// uninitialized memory.
@@ -206,7 +206,7 @@
 /// ## Note
 /// This macro is the same as `raw_field`, except for a different Deref-coercion check that
 /// supports unions.
-/// Due to macro_rules limitations, this check will accept structs with a single field as well as unions.
+/// Due to `macro_rules!` limitations, this check will accept structs with a single field as well as unions.
 /// This is not a stable guarantee, and future versions of this crate might fail
 /// on any use of this macro with a struct, without a semver bump.
 #[macro_export(local_inner_macros)]
diff --git a/crates/memoffset/src/span_of.rs b/crates/memoffset/src/span_of.rs
index 89fccce..5543b92 100644
--- a/crates/memoffset/src/span_of.rs
+++ b/crates/memoffset/src/span_of.rs
@@ -60,7 +60,7 @@
 /// ### Safety
 /// The inter-field form mentioned above assumes that the first field is positioned before the
 /// second.
-/// This is only guarenteed for `repr(C)` structs.
+/// This is only guaranteed for `repr(C)` structs.
 /// Usage with `repr(Rust)` structs may yield unexpected results, like downward-going ranges,
 /// spans that include unexpected fields, empty spans, or spans that include *unexpected* padding bytes.
 ///
@@ -81,15 +81,13 @@
 ///     egg: [[u8; 4]; 4]
 /// }
 ///
-/// fn main() {
-///     assert_eq!(0..84,  span_of!(Blarg, ..));
-///     assert_eq!(0..8,   span_of!(Blarg, .. y));
-///     assert_eq!(0..64,  span_of!(Blarg, ..= y));
-///     assert_eq!(0..8,   span_of!(Blarg, x));
-///     assert_eq!(8..84,  span_of!(Blarg, y ..));
-///     assert_eq!(0..8,   span_of!(Blarg, x .. y));
-///     assert_eq!(0..64,  span_of!(Blarg, x ..= y));
-/// }
+/// assert_eq!(0..84,  span_of!(Blarg, ..));
+/// assert_eq!(0..8,   span_of!(Blarg, .. y));
+/// assert_eq!(0..64,  span_of!(Blarg, ..= y));
+/// assert_eq!(0..8,   span_of!(Blarg, x));
+/// assert_eq!(8..84,  span_of!(Blarg, y ..));
+/// assert_eq!(0..8,   span_of!(Blarg, x .. y));
+/// assert_eq!(0..64,  span_of!(Blarg, x ..= y));
 /// ```
 #[macro_export(local_inner_macros)]
 macro_rules! span_of {
diff --git a/pseudo_crate/Cargo.lock b/pseudo_crate/Cargo.lock
index 23aabc1..70a1107 100644
--- a/pseudo_crate/Cargo.lock
+++ b/pseudo_crate/Cargo.lock
@@ -3126,9 +3126,9 @@
 
 [[package]]
 name = "memoffset"
-version = "0.9.0"
+version = "0.9.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c"
+checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a"
 dependencies = [
  "autocfg",
 ]
diff --git a/pseudo_crate/Cargo.toml b/pseudo_crate/Cargo.toml
index 5eb0c22..0ae1106 100644
--- a/pseudo_crate/Cargo.toml
+++ b/pseudo_crate/Cargo.toml
@@ -188,7 +188,7 @@
 maybe-async = "=0.2.10"
 memchr = "=2.7.4"
 memmap2 = "=0.9.5"
-memoffset = "=0.9.0"
+memoffset = "=0.9.1"
 merge = "=0.1.0"
 merge_derive = "=0.1.0"
 miette = "=5.10.0"