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 Nov 7, 2024
1 parent 2c27400 commit fe034e7
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 fe034e7

Please sign in to comment.