diff --git a/all-is-cubes/src/lib.rs b/all-is-cubes/src/lib.rs index 15f04e7db..c56075a50 100644 --- a/all-is-cubes/src/lib.rs +++ b/all-is-cubes/src/lib.rs @@ -3,6 +3,7 @@ #![feature(large_assignments)] #![move_size_limit = "2000"] #![feature(let_chains)] +#![feature(negative_impls)] #![feature(never_type)] #![feature(trait_upcasting)] #![feature(try_blocks)] diff --git a/all-is-cubes/src/space/space_txn.rs b/all-is-cubes/src/space/space_txn.rs index 6c8b9f0ea..5c2f991ed 100644 --- a/all-is-cubes/src/space/space_txn.rs +++ b/all-is-cubes/src/space/space_txn.rs @@ -477,6 +477,8 @@ pub struct CubeTransaction { fluff: Vec, } +impl !Transaction for CubeTransaction {} + impl fmt::Debug for CubeTransaction { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { let Self { diff --git a/all-is-cubes/src/transaction/generic.rs b/all-is-cubes/src/transaction/generic.rs index 64f8ba872..7c1304328 100644 --- a/all-is-cubes/src/transaction/generic.rs +++ b/all-is-cubes/src/transaction/generic.rs @@ -50,6 +50,8 @@ impl fmt::Display for MapConflict { } } +impl !Transaction for BTreeMap {} + impl Merge for BTreeMap where K: Clone + Ord + fmt::Debug + 'static, @@ -105,6 +107,8 @@ where macro_rules! hashmap_merge { ($module:ident) => { + impl !Transaction for $module::HashMap {} + impl Merge for $module::HashMap where K: Clone + Eq + Hash + fmt::Debug + 'static,