Skip to content

Commit

Permalink
[unstable-rust] Use feature(negative_impls).
Browse files Browse the repository at this point in the history
  • Loading branch information
kpreid committed Dec 15, 2024
1 parent f8e4df4 commit 58a6c90
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions all-is-cubes/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
2 changes: 2 additions & 0 deletions all-is-cubes/src/space/space_txn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,8 @@ pub struct CubeTransaction {
fluff: Vec<Fluff>,
}

impl !Transaction for CubeTransaction {}

impl fmt::Debug for CubeTransaction {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let Self {
Expand Down
4 changes: 4 additions & 0 deletions all-is-cubes/src/transaction/generic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ impl<K: fmt::Debug, C> fmt::Display for MapConflict<K, C> {
}
}

impl<K, V> !Transaction for BTreeMap<K, V> {}

impl<K, V> Merge for BTreeMap<K, V>
where
K: Clone + Ord + fmt::Debug + 'static,
Expand Down Expand Up @@ -105,6 +107,8 @@ where

macro_rules! hashmap_merge {
($module:ident) => {
impl<K, V, S> !Transaction for $module::HashMap<K, V, S> {}

impl<K, V, S> Merge for $module::HashMap<K, V, S>
where
K: Clone + Eq + Hash + fmt::Debug + 'static,
Expand Down

0 comments on commit 58a6c90

Please sign in to comment.