lower msrv

This commit is contained in:
nora 2022-04-06 13:58:58 +02:00
parent 7f90bac1b2
commit 381c514b2e
2 changed files with 14 additions and 10 deletions

View file

@ -36,6 +36,9 @@ pub unsafe trait Backend<T> {
fn get_int(s: Self::Stored) -> Self; fn get_int(s: Self::Stored) -> Self;
} }
#[cfg(test)] // todo: this mustn't affect the msrv, fix this later
mod backend_size_asserts {
#[allow(dead_code)] // :/ #[allow(dead_code)] // :/
const fn assert_same_size<A, B>() { const fn assert_same_size<A, B>() {
let has_equal_size = mem::size_of::<A>() == mem::size_of::<B>(); let has_equal_size = mem::size_of::<A>() == mem::size_of::<B>();
@ -46,6 +49,7 @@ const fn assert_same_size<A, B>() {
const _: () = assert_same_size::<u128, <u128 as Backend<()>>::Stored>(); const _: () = assert_same_size::<u128, <u128 as Backend<()>>::Stored>();
const _: () = assert_same_size::<u64, <u64 as Backend<()>>::Stored>(); const _: () = assert_same_size::<u64, <u64 as Backend<()>>::Stored>();
const _: () = assert_same_size::<usize, <usize as Backend<()>>::Stored>(); const _: () = assert_same_size::<usize, <usize as Backend<()>>::Stored>();
}
unsafe impl<T> Backend<T> for usize { unsafe impl<T> Backend<T> for usize {
type Stored = *mut T; type Stored = *mut T;

View file

@ -89,9 +89,9 @@ extern crate alloc; // we want that for tests so we can use `Box`
mod backend; mod backend;
mod strategy; mod strategy;
use core::hash::{Hash, Hasher};
use core::{ use core::{
fmt::{Debug, Formatter}, fmt::{Debug, Formatter},
hash::{Hash, Hasher},
marker::PhantomData, marker::PhantomData,
mem, mem,
ops::Not, ops::Not,