From a028b8117f06b7d5274ae3d0cf671a3f5fd4fee8 Mon Sep 17 00:00:00 2001 From: Nilstrieb <48135649+Nilstrieb@users.noreply.github.com> Date: Sat, 16 Mar 2024 20:04:46 +0100 Subject: [PATCH] update --- Cargo.lock | 8 ++++---- src/hashmaps/mod.rs | 4 ++-- src/lib.rs | 4 +--- src/scratch.rs | 2 +- src/thin_u128.rs | 2 +- 5 files changed, 9 insertions(+), 11 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 786c8b0..efb9dae 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -13,18 +13,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.71" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75cb1540fadbd5b8fbccc4dddad2734eba435053f725621c070711a14bb5f4b8" +checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.33" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" dependencies = [ "proc-macro2", ] diff --git a/src/hashmaps/mod.rs b/src/hashmaps/mod.rs index 6266272..5726bf7 100644 --- a/src/hashmaps/mod.rs +++ b/src/hashmaps/mod.rs @@ -2,11 +2,11 @@ use std::hash::{BuildHasher, Hash}; pub mod simple_open_addressing; -trait HashMapFamily { +pub trait HashMapFamily { type Map: HashMap; } -trait HashMap: IntoIterator { +pub trait HashMap: IntoIterator { fn with_hasher(state: S) -> Self; fn len(&self) -> usize; diff --git a/src/lib.rs b/src/lib.rs index 53bd25b..cfa10ab 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,13 +1,11 @@ #![feature(ptr_metadata)] -#![feature(trace_macros)] -#![feature(auto_traits)] -#![feature(negative_impls)] #![feature(strict_provenance)] pub mod cfg_match; pub mod hashmaps; pub mod innocent_linked_list; pub mod scratch; +#[cfg(FALSE)] pub mod sendsync; pub mod thin_u128; pub mod unroll_int; diff --git a/src/scratch.rs b/src/scratch.rs index 9dd9250..078c57a 100644 --- a/src/scratch.rs +++ b/src/scratch.rs @@ -67,7 +67,7 @@ pub use {actual_scratch_read, actual_scratch_write, define_scratch, scratch_read mod tests { use pm::scratch_space; - use super::{define_scratch, Scratch}; + use super::Scratch; #[scratch_space] fn has_scratch_space(mut scratch: Scratch<'_>) { diff --git a/src/thin_u128.rs b/src/thin_u128.rs index c49c4b9..0c5afe2 100644 --- a/src/thin_u128.rs +++ b/src/thin_u128.rs @@ -31,7 +31,7 @@ impl ThinU128 { } else { let value = (int as usize) << 2; let repr = value | TAG_MASK | ALWAYS_ONE_NICHE; - Self(NonNull::new(ptr::invalid_mut(repr)).unwrap()) + Self(NonNull::new(ptr::without_provenance_mut(repr)).unwrap()) } }