hamt-rs 0.3.0
    Finished `test` profile [unoptimized + debuginfo] target(s) in 0.01s                                                                                                                                                                                        
info: for the target platform, using target runner `/root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo-miri runner` defined by `target.cfg(all()).runner` specified by `--config`                                                              
info: for the host platform, using target runner `/root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo-miri runner` defined by `target.cfg(all()).runner` specified by `--config`                                                                
    Starting 18 tests across 1 binary (run ID: 074bbf9d-e402-4af6-8595-7867f47f68b1, nextest profile: default-miri)                                                                                                                                             
        FAIL [   1.626s] hamt-rs hamt::tests::stress_test_copy                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                
--- STDOUT:              hamt-rs hamt::tests::stress_test_copy ---                                                                                                                                                                                              
                                                                                                                                                                                                                                                                
running 1 test                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                
--- STDERR:              hamt-rs hamt::tests::stress_test_copy ---                                                                                                                                                                                              
error: Undefined Behavior: attempting a write access using <279094> at alloc100334[0x18], but that tag does not exist in the borrow stack for this location                                                                                                     
    --> src/hamt.rs:305:21                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
305  |                     ptr::write(mem::transmute(entry_ptr), kvp);                                                                                                                                                                                          
     |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                           
     |                     |                                                                                                                                                                                                                                    
     |                     attempting a write access using <279094> at alloc100334[0x18], but that tag does not exist in the borrow stack for this location                                                                                                     
     |                     this error occurs as part of an access at alloc100334[0x18..0x28]                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
     = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental                                                                                                 
     = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information                                                                                                                                 
help: <279094> would have been created here, but this is a zero-size retag ([0x18..0x18]) so the tag in question does not exist anywhere                                                                                                                        
    --> src/hamt.rs:263:50                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
263  |             let base: *const u8 = mem::transmute(&self.__entries);                                                                                                                                                                                       
     |                                                  ^^^^^^^^^^^^^^^                                                                                                                                                                                         
     = note: BACKTRACE (of the first span) on thread `hamt::tests::st`:                                                                                                                                                                                         
     = note: inside `hamt::UnsafeNode::<u64, u64, item_store::CopyStore<u64, u64>, std::hash::DefaultHasher>::init_entry` at src/hamt.rs:305:21: 305:63                                                                                                         
note: inside `hamt::UnsafeNode::<u64, u64, item_store::CopyStore<u64, u64>, std::hash::DefaultHasher>::copy_with_new_entry`                                                                                                                                     
    --> src/hamt.rs:963:13                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
963  |             new_node.init_entry(new_i, new_entry);                                                                                                                                                                                                       
     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                        
note: inside `hamt::UnsafeNode::<u64, u64, item_store::CopyStore<u64, u64>, std::hash::DefaultHasher>::insert`                                                                                                                                                  
    --> src/hamt.rs:438:28                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
438  |             let new_node = self.copy_with_new_entry(local_key, NodeEntryOwned::Item(new_kvp));                                                                                                                                                           
     |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                            
note: inside `hamt::UnsafeNode::<u64, u64, item_store::CopyStore<u64, u64>, std::hash::DefaultHasher>::try_insert_in_place`                                                                                                                                     
    --> src/hamt.rs:552:29                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
552  |                 return Some(self.insert(hash, level, new_kvp, insertion_count));                                                                                                                                                                         
     |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                           
note: inside `hamt::HamtMap::<u64, u64, item_store::CopyStore<u64, u64>>::insert_internal`                                                                                                                                                                      
    --> src/hamt.rs:1226:52                                                                                                                                                                                                                                     
     |                                                                                                                                                                                                                                                          
1226 |             BorrowedNodeRef::Exclusive(mutable) => mutable.try_insert_in_place(hash, 0, kvp, &mut insertion_count),                                                                                                                                      
     |                                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                       
note: inside `hamt::HamtMap::<u64, u64, item_store::CopyStore<u64, u64>>::insert`                                                                                                                                                                               
    --> src/hamt.rs:1303:9                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
1303 |         self.insert_internal(ItemStore::new(key, value))                                                                                                                                                                                                 
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                 
note: inside `testing::Test::random_insert_remove_stress_test::<item_store::CopyStore<u64, u64>>`                                                                                                                                                               
    --> src/testing.rs:211:43                                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
211  |                 let (map1, size_change) = map.insert(value, value);                                                                                                                                                                                      
     |                                           ^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                       
note: inside `hamt::tests::stress_test_copy`                                                                                                                                                                                                                    
    --> src/hamt.rs:1678:9                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
1678 |         Test::random_insert_remove_stress_test(HamtMap::<u64, u64, CopyStore>::new());                                                                                                                                                                   
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                    
note: inside closure                                                                                                                                                                                                                                            
    --> src/hamt.rs:1677:26                                                                                                                                                                                                                                     
     |                                                                                                                                                                                                                                                          
1676 |     #[test]                                                                                                                                                                                                                                              
     |     ------- in this procedural macro expansion                                                                                                                                                                                                           
1677 |     fn stress_test_copy() {                                                                                                                                                                                                                              
     |                          ^                                                                                                                                                                                                                               
     = note: this error originates in the attribute macro `test` (in Nightly builds, run with -Z macro-backtrace for more info)                                                                                                                                 
                                                                                                                                                                                                                                                                
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace                                                                                                                                                              
                                                                                                                                                                                                                                                                
error: aborting due to 1 previous error                                                                                                                                                                                                                         
                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                
        FAIL [   1.681s] hamt-rs hamt::tests::stress_test_share                                                                                                                                                                                                 
                                                                                                                                                                                                                                                                
--- STDOUT:              hamt-rs hamt::tests::stress_test_share ---                                                                                                                                                                                             
                                                                                                                                                                                                                                                                
running 1 test                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                
--- STDERR:              hamt-rs hamt::tests::stress_test_share ---                                                                                                                                                                                             
error: Undefined Behavior: attempting a write access using <281403> at alloc101232[0x18], but that tag does not exist in the borrow stack for this location                                                                                                     
    --> src/hamt.rs:305:21                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
305  |                     ptr::write(mem::transmute(entry_ptr), kvp);                                                                                                                                                                                          
     |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                           
     |                     |                                                                                                                                                                                                                                    
     |                     attempting a write access using <281403> at alloc101232[0x18], but that tag does not exist in the borrow stack for this location                                                                                                     
     |                     this error occurs as part of an access at alloc101232[0x18..0x20]                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
     = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental                                                                                                 
     = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information                                                                                                                                 
help: <281403> would have been created here, but this is a zero-size retag ([0x18..0x18]) so the tag in question does not exist anywhere                                                                                                                        
    --> src/hamt.rs:263:50                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
263  |             let base: *const u8 = mem::transmute(&self.__entries);                                                                                                                                                                                       
     |                                                  ^^^^^^^^^^^^^^^                                                                                                                                                                                         
     = note: BACKTRACE (of the first span) on thread `hamt::tests::st`:                                                                                                                                                                                         
     = note: inside `hamt::UnsafeNode::<u64, u64, item_store::ShareStore<u64, u64>, std::hash::DefaultHasher>::init_entry` at src/hamt.rs:305:21: 305:63                                                                                                        
note: inside `hamt::UnsafeNode::<u64, u64, item_store::ShareStore<u64, u64>, std::hash::DefaultHasher>::copy_with_new_entry`                                                                                                                                    
    --> src/hamt.rs:963:13                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
963  |             new_node.init_entry(new_i, new_entry);                                                                                                                                                                                                       
     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                        
note: inside `hamt::UnsafeNode::<u64, u64, item_store::ShareStore<u64, u64>, std::hash::DefaultHasher>::insert`                                                                                                                                                 
    --> src/hamt.rs:438:28                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
438  |             let new_node = self.copy_with_new_entry(local_key, NodeEntryOwned::Item(new_kvp));                                                                                                                                                           
     |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                            
note: inside `hamt::UnsafeNode::<u64, u64, item_store::ShareStore<u64, u64>, std::hash::DefaultHasher>::try_insert_in_place`                                                                                                                                    
    --> src/hamt.rs:552:29                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
552  |                 return Some(self.insert(hash, level, new_kvp, insertion_count));                                                                                                                                                                         
     |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                           
note: inside `hamt::HamtMap::<u64, u64>::insert_internal`                                                                                                                                                                                                       
    --> src/hamt.rs:1226:52                                                                                                                                                                                                                                     
     |                                                                                                                                                                                                                                                          
1226 |             BorrowedNodeRef::Exclusive(mutable) => mutable.try_insert_in_place(hash, 0, kvp, &mut insertion_count),                                                                                                                                      
     |                                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                       
note: inside `hamt::HamtMap::<u64, u64>::insert`                                                                                                                                                                                                                
    --> src/hamt.rs:1303:9                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
1303 |         self.insert_internal(ItemStore::new(key, value))                                                                                                                                                                                                 
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                 
note: inside `testing::Test::random_insert_remove_stress_test::<item_store::ShareStore<u64, u64>>`                                                                                                                                                              
    --> src/testing.rs:211:43                                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
211  |                 let (map1, size_change) = map.insert(value, value);                                                                                                                                                                                      
     |                                           ^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                       
note: inside `hamt::tests::stress_test_share`                                                                                                                                                                                                                   
    --> src/hamt.rs:1735:9                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
1735 |         Test::random_insert_remove_stress_test(HamtMap::<u64, u64, ShareStore>::new());                                                                                                                                                                  
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                   
note: inside closure                                                                                                                                                                                                                                            
    --> src/hamt.rs:1734:27                                                                                                                                                                                                                                     
     |                                                                                                                                                                                                                                                          
1733 |     #[test]                                                                                                                                                                                                                                              
     |     ------- in this procedural macro expansion                                                                                                                                                                                                           
1734 |     fn stress_test_share() {                                                                                                                                                                                                                             
     |                           ^                                                                                                                                                                                                                              
     = note: this error originates in the attribute macro `test` (in Nightly builds, run with -Z macro-backtrace for more info)                                                                                                                                 
                                                                                                                                                                                                                                                                
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace                                                                                                                                                              
                                                                                                                                                                                                                                                                
error: aborting due to 1 previous error                                                                                                                                                                                                                         
                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                
        FAIL [   1.418s] hamt-rs hamt::tests::test_default_copy                                                                                                                                                                                                 
                                                                                                                                                                                                                                                                
--- STDOUT:              hamt-rs hamt::tests::test_default_copy ---                                                                                                                                                                                             
                                                                                                                                                                                                                                                                
running 1 test                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                
--- STDERR:              hamt-rs hamt::tests::test_default_copy ---                                                                                                                                                                                             
error: Undefined Behavior: deallocating while item [Unique for <199041>] is strongly protected by call 48980                                                                                                                                                    
    --> src/hamt.rs:1586:5                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
1586 |     libc::free(ptr as *mut libc::c_void)                                                                                                                                                                                                                 
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ deallocating while item [Unique for <199041>] is strongly protected by call 48980                                                                                                                               
     |                                                                                                                                                                                                                                                          
     = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental                                                                                                 
     = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information                                                                                                                                 
     = note: BACKTRACE on thread `hamt::tests::te`:                                                                                                                                                                                                             
     = note: inside `hamt::deallocate` at src/hamt.rs:1586:5: 1586:41                                                                                                                                                                                           
note: inside `hamt::UnsafeNode::<u64, u64, item_store::CopyStore<u64, u64>, std::hash::DefaultHasher>::destroy`                                                                                                                                                 
    --> src/hamt.rs:385:13                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
385  |             deallocate(mem::transmute(self), node_size, align);                                                                                                                                                                                          
     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                           
note: inside `<hamt::NodeRef<u64, u64, item_store::CopyStore<u64, u64>, std::hash::DefaultHasher> as std::ops::Drop>::drop`                                                                                                                                     
    --> src/hamt.rs:101:17                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
101  |                 node.destroy();                                                                                                                                                                                                                          
     |                 ^^^^^^^^^^^^^^                                                                                                                                                                                                                           
     = note: inside `std::ptr::drop_in_place::<hamt::NodeRef<u64, u64, item_store::CopyStore<u64, u64>, std::hash::DefaultHasher>> - shim(Some(hamt::NodeRef<u64, u64, item_store::CopyStore<u64, u64>, std::hash::DefaultHasher>))` at /root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:542:1: 542:56
     = note: inside `std::ptr::drop_in_place::<hamt::HamtMap<u64, u64, item_store::CopyStore<u64, u64>>> - shim(Some(hamt::HamtMap<u64, u64, item_store::CopyStore<u64, u64>>))` at /root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:542:1: 542:56
note: inside `testing::Test::test_default::<item_store::CopyStore<u64, u64>>`                                                                                                                                                                                   
    --> src/testing.rs:145:5                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
145  |     }                                                                                                                                                                                                                                                    
     |     ^                                                                                                                                                                                                                                                    
note: inside `hamt::tests::test_default_copy`                                                                                                                                                                                                                   
    --> src/hamt.rs:1663:9                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
1663 |         Test::test_default::<CopyStore>();                                                                                                                                                                                                               
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                
note: inside closure                                                                                                                                                                                                                                            
    --> src/hamt.rs:1662:27                                                                                                                                                                                                                                     
     |                                                                                                                                                                                                                                                          
1661 |     #[test]                                                                                                                                                                                                                                              
     |     ------- in this procedural macro expansion                                                                                                                                                                                                           
1662 |     fn test_default_copy() {                                                                                                                                                                                                                             
     |                           ^                                                                                                                                                                                                                              
     = note: this error originates in the attribute macro `test` (in Nightly builds, run with -Z macro-backtrace for more info)                                                                                                                                 
                                                                                                                                                                                                                                                                
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace                                                                                                                                                              
                                                                                                                                                                                                                                                                
error: aborting due to 1 previous error                                                                                                                                                                                                                         
                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                
        FAIL [   1.256s] hamt-rs hamt::tests::test_eq_empty_copy                                                                                                                                                                                                
                                                                                                                                                                                                                                                                
--- STDOUT:              hamt-rs hamt::tests::test_eq_empty_copy ---                                                                                                                                                                                            
                                                                                                                                                                                                                                                                
running 1 test                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                
--- STDERR:              hamt-rs hamt::tests::test_eq_empty_copy ---                                                                                                                                                                                            
error: Undefined Behavior: constructing invalid value at .value[0].0.<enum-variant(RegularNode)>.0: encountered a null reference                                                                                                                                
    --> src/hamt.rs:1477:33                                                                                                                                                                                                                                     
     |                                                                                                                                                                                                                                                          
1477 |             node_stack: unsafe{ mem::zeroed() },                                                                                                                                                                                                         
     |                                 ^^^^^^^^^^^^^ constructing invalid value at .value[0].0.<enum-variant(RegularNode)>.0: encountered a null reference                                                                                                      
     |                                                                                                                                                                                                                                                          
     = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior                                                                                                                                              
     = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information                                                                                                                                         
     = note: BACKTRACE on thread `hamt::tests::te`:                                                                                                                                                                                                             
     = note: inside `hamt::HamtMapIterator::<'_, u64, u64, item_store::CopyStore<u64, u64>, std::hash::DefaultHasher>::new` at src/hamt.rs:1477:33: 1477:46                                                                                                     
note: inside `hamt::HamtMap::<u64, u64, item_store::CopyStore<u64, u64>>::iter`                                                                                                                                                                                 
    --> src/hamt.rs:1175:9                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
1175 |         HamtMapIterator::new(self)                                                                                                                                                                                                                       
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                       
note: inside `<hamt::HamtMap<u64, u64, item_store::CopyStore<u64, u64>> as std::cmp::PartialEq>::eq`                                                                                                                                                            
    --> src/hamt.rs:1376:33                                                                                                                                                                                                                                     
     |                                                                                                                                                                                                                                                          
1376 |         for (k, other_value) in other.iter() {                                                                                                                                                                                                           
     |                                 ^^^^^^^^^^^^                                                                                                                                                                                                             
note: inside `testing::Test::test_eq_empty::<item_store::CopyStore<u64, u64>>`                                                                                                                                                                                  
    --> src/testing.rs:148:17                                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
148  |         assert!(HamtMap::<u64, u64, IS>::new() == HamtMap::<u64, u64, IS>::new());                                                                                                                                                                       
     |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                         
note: inside `hamt::tests::test_eq_empty_copy`                                                                                                                                                                                                                  
    --> src/hamt.rs:1668:9                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
1668 |         Test::test_eq_empty::<CopyStore>();                                                                                                                                                                                                              
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                               
note: inside closure                                                                                                                                                                                                                                            
    --> src/hamt.rs:1667:28                                                                                                                                                                                                                                     
     |                                                                                                                                                                                                                                                          
1666 |     #[test]                                                                                                                                                                                                                                              
     |     ------- in this procedural macro expansion                                                                                                                                                                                                           
1667 |     fn test_eq_empty_copy() {                                                                                                                                                                                                                            
     |                            ^                                                                                                                                                                                                                             
     = note: this error originates in the attribute macro `test` (in Nightly builds, run with -Z macro-backtrace for more info)                                                                                                                                 
                                                                                                                                                                                                                                                                
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace                                                                                                                                                              
                                                                                                                                                                                                                                                                
error: aborting due to 1 previous error                                                                                                                                                                                                                         
                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                
        FAIL [   2.918s] hamt-rs hamt::tests::test_eq_random_copy                                                                                                                                                                                               
                                                                                                                                                                                                                                                                
--- STDOUT:              hamt-rs hamt::tests::test_eq_random_copy ---                                                                                                                                                                                           
                                                                                                                                                                                                                                                                
running 1 test                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                
--- STDERR:              hamt-rs hamt::tests::test_eq_random_copy ---                                                                                                                                                                                           
error: Undefined Behavior: attempting a write access using <681549> at alloc225631[0x18], but that tag does not exist in the borrow stack for this location                                                                                                     
    --> src/hamt.rs:305:21                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
305  |                     ptr::write(mem::transmute(entry_ptr), kvp);                                                                                                                                                                                          
     |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                           
     |                     |                                                                                                                                                                                                                                    
     |                     attempting a write access using <681549> at alloc225631[0x18], but that tag does not exist in the borrow stack for this location                                                                                                     
     |                     this error occurs as part of an access at alloc225631[0x18..0x28]                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
     = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental                                                                                                 
     = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information                                                                                                                                 
help: <681549> would have been created here, but this is a zero-size retag ([0x18..0x18]) so the tag in question does not exist anywhere                                                                                                                        
    --> src/hamt.rs:263:50                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
263  |             let base: *const u8 = mem::transmute(&self.__entries);                                                                                                                                                                                       
     |                                                  ^^^^^^^^^^^^^^^                                                                                                                                                                                         
     = note: BACKTRACE (of the first span) on thread `hamt::tests::te`:                                                                                                                                                                                         
     = note: inside `hamt::UnsafeNode::<u64, u64, item_store::CopyStore<u64, u64>, std::hash::DefaultHasher>::init_entry` at src/hamt.rs:305:21: 305:63                                                                                                         
note: inside `hamt::UnsafeNode::<u64, u64, item_store::CopyStore<u64, u64>, std::hash::DefaultHasher>::copy_with_new_entry`                                                                                                                                     
    --> src/hamt.rs:963:13                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
963  |             new_node.init_entry(new_i, new_entry);                                                                                                                                                                                                       
     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                        
note: inside `hamt::UnsafeNode::<u64, u64, item_store::CopyStore<u64, u64>, std::hash::DefaultHasher>::insert`                                                                                                                                                  
    --> src/hamt.rs:438:28                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
438  |             let new_node = self.copy_with_new_entry(local_key, NodeEntryOwned::Item(new_kvp));                                                                                                                                                           
     |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                            
note: inside `hamt::UnsafeNode::<u64, u64, item_store::CopyStore<u64, u64>, std::hash::DefaultHasher>::try_insert_in_place`                                                                                                                                     
    --> src/hamt.rs:552:29                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
552  |                 return Some(self.insert(hash, level, new_kvp, insertion_count));                                                                                                                                                                         
     |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                           
note: inside `hamt::HamtMap::<u64, u64, item_store::CopyStore<u64, u64>>::insert_internal`                                                                                                                                                                      
    --> src/hamt.rs:1226:52                                                                                                                                                                                                                                     
     |                                                                                                                                                                                                                                                          
1226 |             BorrowedNodeRef::Exclusive(mutable) => mutable.try_insert_in_place(hash, 0, kvp, &mut insertion_count),                                                                                                                                      
     |                                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                       
note: inside `hamt::HamtMap::<u64, u64, item_store::CopyStore<u64, u64>>::insert`                                                                                                                                                                               
    --> src/hamt.rs:1303:9                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
1303 |         self.insert_internal(ItemStore::new(key, value))                                                                                                                                                                                                 
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                 
note: inside `hamt::HamtMap::<u64, u64, item_store::CopyStore<u64, u64>>::plus`                                                                                                                                                                                 
    --> src/hamt.rs:1317:9                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
1317 |         self.insert(key, val).0                                                                                                                                                                                                                          
     |         ^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                            
note: inside `<hamt::HamtMap<u64, u64, item_store::CopyStore<u64, u64>> as std::iter::FromIterator<(u64, u64)>>::from_iter::<std::iter::Map<std::slice::Iter<'_, u64>, {closure@src/testing.rs:157:72: 157:76}>>`                                               
    --> src/hamt.rs:1420:19                                                                                                                                                                                                                                     
     |                                                                                                                                                                                                                                                          
1420 |             map = map.plus(k, v);                                                                                                                                                                                                                        
     |                   ^^^^^^^^^^^^^^                                                                                                                                                                                                                         
note: inside `testing::Test::test_eq_random::<item_store::CopyStore<u64, u64>>`                                                                                                                                                                                 
    --> src/testing.rs:157:25                                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
157  |         let reference = HamtMap::<_, _, IS>::from_iter(data.iter().map(|&x| (x, x)));                                                                                                                                                                    
     |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                     
note: inside `hamt::tests::test_eq_random_copy`                                                                                                                                                                                                                 
    --> src/hamt.rs:1673:9                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
1673 |         Test::test_eq_random::<CopyStore>();                                                                                                                                                                                                             
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                              
note: inside closure                                                                                                                                                                                                                                            
    --> src/hamt.rs:1672:29                                                                                                                                                                                                                                     
     |                                                                                                                                                                                                                                                          
1671 |     #[test]                                                                                                                                                                                                                                              
     |     ------- in this procedural macro expansion                                                                                                                                                                                                           
1672 |     fn test_eq_random_copy() {                                                                                                                                                                                                                           
     |                             ^                                                                                                                                                                                                                            
     = note: this error originates in the attribute macro `test` (in Nightly builds, run with -Z macro-backtrace for more info)                                                                                                                                 
                                                                                                                                                                                                                                                                
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace                                                                                                                                                              
                                                                                                                                                                                                                                                                
error: aborting due to 1 previous error                                                                                                                                                                                                                         
                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                
        PASS [   1.338s] hamt-rs hamt::tests::test_get_index                                                                                                                                                                                                    
        FAIL [   1.671s] hamt-rs hamt::tests::test_insert_ascending_copy                                                                                                                                                                                        
                                                                                                                                                                                                                                                                
--- STDOUT:              hamt-rs hamt::tests::test_insert_ascending_copy ---                                                                                                                                                                                    
                                                                                                                                                                                                                                                                
running 1 test                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                
--- STDERR:              hamt-rs hamt::tests::test_insert_ascending_copy ---                                                                                                                                                                                    
error: Undefined Behavior: attempting a write access using <199675> at alloc66600[0x18], but that tag does not exist in the borrow stack for this location                                                                                                      
    --> src/hamt.rs:305:21                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
305  |                     ptr::write(mem::transmute(entry_ptr), kvp);                                                                                                                                                                                          
     |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                           
     |                     |                                                                                                                                                                                                                                    
     |                     attempting a write access using <199675> at alloc66600[0x18], but that tag does not exist in the borrow stack for this location                                                                                                      
     |                     this error occurs as part of an access at alloc66600[0x18..0x28]                                                                                                                                                                     
     |                                                                                                                                                                                                                                                          
     = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental                                                                                                 
     = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information                                                                                                                                 
help: <199675> would have been created here, but this is a zero-size retag ([0x18..0x18]) so the tag in question does not exist anywhere                                                                                                                        
    --> src/hamt.rs:263:50                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
263  |             let base: *const u8 = mem::transmute(&self.__entries);                                                                                                                                                                                       
     |                                                  ^^^^^^^^^^^^^^^                                                                                                                                                                                         
     = note: BACKTRACE (of the first span) on thread `hamt::tests::te`:                                                                                                                                                                                         
     = note: inside `hamt::UnsafeNode::<u64, u64, item_store::CopyStore<u64, u64>, std::hash::DefaultHasher>::init_entry` at src/hamt.rs:305:21: 305:63                                                                                                         
note: inside `hamt::UnsafeNode::<u64, u64, item_store::CopyStore<u64, u64>, std::hash::DefaultHasher>::copy_with_new_entry`                                                                                                                                     
    --> src/hamt.rs:963:13                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
963  |             new_node.init_entry(new_i, new_entry);                                                                                                                                                                                                       
     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                        
note: inside `hamt::UnsafeNode::<u64, u64, item_store::CopyStore<u64, u64>, std::hash::DefaultHasher>::insert`                                                                                                                                                  
    --> src/hamt.rs:438:28                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
438  |             let new_node = self.copy_with_new_entry(local_key, NodeEntryOwned::Item(new_kvp));                                                                                                                                                           
     |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                            
note: inside `hamt::UnsafeNode::<u64, u64, item_store::CopyStore<u64, u64>, std::hash::DefaultHasher>::try_insert_in_place`                                                                                                                                     
    --> src/hamt.rs:552:29                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
552  |                 return Some(self.insert(hash, level, new_kvp, insertion_count));                                                                                                                                                                         
     |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                           
note: inside `hamt::HamtMap::<u64, u64, item_store::CopyStore<u64, u64>>::insert_internal`                                                                                                                                                                      
    --> src/hamt.rs:1226:52                                                                                                                                                                                                                                     
     |                                                                                                                                                                                                                                                          
1226 |             BorrowedNodeRef::Exclusive(mutable) => mutable.try_insert_in_place(hash, 0, kvp, &mut insertion_count),                                                                                                                                      
     |                                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                       
note: inside `hamt::HamtMap::<u64, u64, item_store::CopyStore<u64, u64>>::insert`                                                                                                                                                                               
    --> src/hamt.rs:1303:9                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
1303 |         self.insert_internal(ItemStore::new(key, value))                                                                                                                                                                                                 
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                 
note: inside `testing::Test::test_insert_ascending::<item_store::CopyStore<u64, u64>>`                                                                                                                                                                          
    --> src/testing.rs:79:19                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
79   |             map = map.insert(x, x).0;                                                                                                                                                                                                                    
     |                   ^^^^^^^^^^^^^^^^                                                                                                                                                                                                                       
note: inside `hamt::tests::test_insert_ascending_copy`                                                                                                                                                                                                          
    --> src/hamt.rs:1643:9                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
1643 |         Test::test_insert_ascending(HamtMap::<u64, u64, CopyStore>::new());                                                                                                                                                                              
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                               
note: inside closure                                                                                                                                                                                                                                            
    --> src/hamt.rs:1642:36                                                                                                                                                                                                                                     
     |                                                                                                                                                                                                                                                          
1641 |     #[test]                                                                                                                                                                                                                                              
     |     ------- in this procedural macro expansion                                                                                                                                                                                                           
1642 |     fn test_insert_ascending_copy() {                                                                                                                                                                                                                    
     |                                    ^                                                                                                                                                                                                                     
     = note: this error originates in the attribute macro `test` (in Nightly builds, run with -Z macro-backtrace for more info)                                                                                                                                 
                                                                                                                                                                                                                                                                
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace                                                                                                                                                              
                                                                                                                                                                                                                                                                
error: aborting due to 1 previous error                                                                                                                                                                                                                         
                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                
        FAIL [   5.067s] hamt-rs hamt::tests::test_insert_ascending_share                                                                                                                                                                                       
                                                                                                                                                                                                                                                                
--- STDOUT:              hamt-rs hamt::tests::test_insert_ascending_share ---                                                                                                                                                                                   
                                                                                                                                                                                                                                                                
running 1 test                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                
--- STDERR:              hamt-rs hamt::tests::test_insert_ascending_share ---                                                                                                                                                                                   
error: Undefined Behavior: attempting a write access using <200976> at alloc66863[0x18], but that tag does not exist in the borrow stack for this location                                                                                                      
    --> src/hamt.rs:305:21                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
305  |                     ptr::write(mem::transmute(entry_ptr), kvp);                                                                                                                                                                                          
     |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                           
     |                     |                                                                                                                                                                                                                                    
     |                     attempting a write access using <200976> at alloc66863[0x18], but that tag does not exist in the borrow stack for this location                                                                                                      
     |                     this error occurs as part of an access at alloc66863[0x18..0x20]                                                                                                                                                                     
     |                                                                                                                                                                                                                                                          
     = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental                                                                                                 
     = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information                                                                                                                                 
help: <200976> would have been created here, but this is a zero-size retag ([0x18..0x18]) so the tag in question does not exist anywhere                                                                                                                        
    --> src/hamt.rs:263:50                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
263  |             let base: *const u8 = mem::transmute(&self.__entries);                                                                                                                                                                                       
     |                                                  ^^^^^^^^^^^^^^^                                                                                                                                                                                         
     = note: BACKTRACE (of the first span) on thread `hamt::tests::te`:                                                                                                                                                                                         
     = note: inside `hamt::UnsafeNode::<u64, u64, item_store::ShareStore<u64, u64>, std::hash::DefaultHasher>::init_entry` at src/hamt.rs:305:21: 305:63                                                                                                        
note: inside `hamt::UnsafeNode::<u64, u64, item_store::ShareStore<u64, u64>, std::hash::DefaultHasher>::copy_with_new_entry`                                                                                                                                    
    --> src/hamt.rs:963:13                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
963  |             new_node.init_entry(new_i, new_entry);                                                                                                                                                                                                       
     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                        
note: inside `hamt::UnsafeNode::<u64, u64, item_store::ShareStore<u64, u64>, std::hash::DefaultHasher>::insert`                                                                                                                                                 
    --> src/hamt.rs:438:28                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
438  |             let new_node = self.copy_with_new_entry(local_key, NodeEntryOwned::Item(new_kvp));                                                                                                                                                           
     |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                            
note: inside `hamt::UnsafeNode::<u64, u64, item_store::ShareStore<u64, u64>, std::hash::DefaultHasher>::try_insert_in_place`                                                                                                                                    
    --> src/hamt.rs:552:29                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
552  |                 return Some(self.insert(hash, level, new_kvp, insertion_count));                                                                                                                                                                         
     |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                           
note: inside `hamt::HamtMap::<u64, u64>::insert_internal`                                                                                                                                                                                                       
    --> src/hamt.rs:1226:52                                                                                                                                                                                                                                     
     |                                                                                                                                                                                                                                                          
1226 |             BorrowedNodeRef::Exclusive(mutable) => mutable.try_insert_in_place(hash, 0, kvp, &mut insertion_count),                                                                                                                                      
     |                                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                       
note: inside `hamt::HamtMap::<u64, u64>::insert`                                                                                                                                                                                                                
    --> src/hamt.rs:1303:9                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
1303 |         self.insert_internal(ItemStore::new(key, value))                                                                                                                                                                                                 
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                 
note: inside `testing::Test::test_insert_ascending::<item_store::ShareStore<u64, u64>>`                                                                                                                                                                         
    --> src/testing.rs:79:19                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
79   |             map = map.insert(x, x).0;                                                                                                                                                                                                                    
     |                   ^^^^^^^^^^^^^^^^                                                                                                                                                                                                                       
note: inside `hamt::tests::test_insert_ascending_share`                                                                                                                                                                                                         
    --> src/hamt.rs:1715:9                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
1715 |         Test::test_insert_ascending(HamtMap::<u64, u64, ShareStore>::new());                                                                                                                                                                             
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                              
note: inside closure                                                                                                                                                                                                                                            
    --> src/hamt.rs:1714:37                                                                                                                                                                                                                                     
     |                                                                                                                                                                                                                                                          
1713 |     #[test]                                                                                                                                                                                                                                              
     |     ------- in this procedural macro expansion                                                                                                                                                                                                           
1714 |     fn test_insert_ascending_share() {                                                                                                                                                                                                                   
     |                                     ^                                                                                                                                                                                                                    
     = note: this error originates in the attribute macro `test` (in Nightly builds, run with -Z macro-backtrace for more info)                                                                                                                                 
                                                                                                                                                                                                                                                                
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace                                                                                                                                                              
                                                                                                                                                                                                                                                                
error: aborting due to 1 previous error                                                                                                                                                                                                                         
                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                
        FAIL [   1.769s] hamt-rs hamt::tests::test_insert_copy                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                
--- STDOUT:              hamt-rs hamt::tests::test_insert_copy ---                                                                                                                                                                                              
                                                                                                                                                                                                                                                                
running 1 test                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                
--- STDERR:              hamt-rs hamt::tests::test_insert_copy ---                                                                                                                                                                                              
error: Undefined Behavior: attempting a write access using <203401> at alloc68038[0x18], but that tag does not exist in the borrow stack for this location                                                                                                      
    --> src/hamt.rs:305:21                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
305  |                     ptr::write(mem::transmute(entry_ptr), kvp);                                                                                                                                                                                          
     |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                           
     |                     |                                                                                                                                                                                                                                    
     |                     attempting a write access using <203401> at alloc68038[0x18], but that tag does not exist in the borrow stack for this location                                                                                                      
     |                     this error occurs as part of an access at alloc68038[0x18..0x28]                                                                                                                                                                     
     |                                                                                                                                                                                                                                                          
     = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental                                                                                                 
     = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information                                                                                                                                 
help: <203401> would have been created here, but this is a zero-size retag ([0x18..0x18]) so the tag in question does not exist anywhere                                                                                                                        
    --> src/hamt.rs:263:50                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
263  |             let base: *const u8 = mem::transmute(&self.__entries);                                                                                                                                                                                       
     |                                                  ^^^^^^^^^^^^^^^                                                                                                                                                                                         
     = note: BACKTRACE (of the first span) on thread `hamt::tests::te`:                                                                                                                                                                                         
     = note: inside `hamt::UnsafeNode::<u64, u64, item_store::CopyStore<u64, u64>, std::hash::DefaultHasher>::init_entry` at src/hamt.rs:305:21: 305:63                                                                                                         
note: inside `hamt::UnsafeNode::<u64, u64, item_store::CopyStore<u64, u64>, std::hash::DefaultHasher>::copy_with_new_entry`                                                                                                                                     
    --> src/hamt.rs:963:13                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
963  |             new_node.init_entry(new_i, new_entry);                                                                                                                                                                                                       
     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                        
note: inside `hamt::UnsafeNode::<u64, u64, item_store::CopyStore<u64, u64>, std::hash::DefaultHasher>::insert`                                                                                                                                                  
    --> src/hamt.rs:438:28                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
438  |             let new_node = self.copy_with_new_entry(local_key, NodeEntryOwned::Item(new_kvp));                                                                                                                                                           
     |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                            
note: inside `hamt::HamtMap::<u64, u64, item_store::CopyStore<u64, u64>>::insert_internal`                                                                                                                                                                      
    --> src/hamt.rs:1227:56                                                                                                                                                                                                                                     
     |                                                                                                                                                                                                                                                          
1227 |             BorrowedNodeRef::Shared(immutable) => Some(immutable.insert(hash, 0, kvp, &mut insertion_count))                                                                                                                                             
     |                                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                              
note: inside `hamt::HamtMap::<u64, u64, item_store::CopyStore<u64, u64>>::insert`                                                                                                                                                                               
    --> src/hamt.rs:1303:9                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
1303 |         self.insert_internal(ItemStore::new(key, value))                                                                                                                                                                                                 
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                 
note: inside `testing::Test::test_insert::<item_store::CopyStore<u64, u64>>`                                                                                                                                                                                    
    --> src/testing.rs:48:36                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
48   |         let (map01, new_entry01) = map00.clone().insert(1, 2);                                                                                                                                                                                           
     |                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                            
note: inside `hamt::tests::test_insert_copy`                                                                                                                                                                                                                    
    --> src/hamt.rs:1638:9                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
1638 |         Test::test_insert(HamtMap::<u64, u64, CopyStore>::new());                                                                                                                                                                                        
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                         
note: inside closure                                                                                                                                                                                                                                            
    --> src/hamt.rs:1637:26                                                                                                                                                                                                                                     
     |                                                                                                                                                                                                                                                          
1636 |     #[test]                                                                                                                                                                                                                                              
     |     ------- in this procedural macro expansion                                                                                                                                                                                                           
1637 |     fn test_insert_copy() {                                                                                                                                                                                                                              
     |                          ^                                                                                                                                                                                                                               
     = note: this error originates in the attribute macro `test` (in Nightly builds, run with -Z macro-backtrace for more info)                                                                                                                                 
                                                                                                                                                                                                                                                                
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace                                                                                                                                                              
                                                                                                                                                                                                                                                                
error: aborting due to 1 previous error                                                                                                                                                                                                                         
                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                
        FAIL [   1.713s] hamt-rs hamt::tests::test_insert_descending_copy                                                                                                                                                                                       
                                                                                                                                                                                                                                                                
--- STDOUT:              hamt-rs hamt::tests::test_insert_descending_copy ---                                                                                                                                                                                   
                                                                                                                                                                                                                                                                
running 1 test                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                
--- STDERR:              hamt-rs hamt::tests::test_insert_descending_copy ---                                                                                                                                                                                   
error: Undefined Behavior: attempting a write access using <201687> at alloc67290[0x18], but that tag does not exist in the borrow stack for this location                                                                                                      
    --> src/hamt.rs:305:21                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
305  |                     ptr::write(mem::transmute(entry_ptr), kvp);                                                                                                                                                                                          
     |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                           
     |                     |                                                                                                                                                                                                                                    
     |                     attempting a write access using <201687> at alloc67290[0x18], but that tag does not exist in the borrow stack for this location                                                                                                      
     |                     this error occurs as part of an access at alloc67290[0x18..0x28]                                                                                                                                                                     
     |                                                                                                                                                                                                                                                          
     = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental                                                                                                 
     = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information                                                                                                                                 
help: <201687> would have been created here, but this is a zero-size retag ([0x18..0x18]) so the tag in question does not exist anywhere                                                                                                                        
    --> src/hamt.rs:263:50                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
263  |             let base: *const u8 = mem::transmute(&self.__entries);                                                                                                                                                                                       
     |                                                  ^^^^^^^^^^^^^^^                                                                                                                                                                                         
     = note: BACKTRACE (of the first span) on thread `hamt::tests::te`:                                                                                                                                                                                         
     = note: inside `hamt::UnsafeNode::<u64, u64, item_store::CopyStore<u64, u64>, std::hash::DefaultHasher>::init_entry` at src/hamt.rs:305:21: 305:63                                                                                                         
note: inside `hamt::UnsafeNode::<u64, u64, item_store::CopyStore<u64, u64>, std::hash::DefaultHasher>::copy_with_new_entry`                                                                                                                                     
    --> src/hamt.rs:963:13                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
963  |             new_node.init_entry(new_i, new_entry);                                                                                                                                                                                                       
     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                        
note: inside `hamt::UnsafeNode::<u64, u64, item_store::CopyStore<u64, u64>, std::hash::DefaultHasher>::insert`                                                                                                                                                  
    --> src/hamt.rs:438:28                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
438  |             let new_node = self.copy_with_new_entry(local_key, NodeEntryOwned::Item(new_kvp));                                                                                                                                                           
     |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                            
note: inside `hamt::UnsafeNode::<u64, u64, item_store::CopyStore<u64, u64>, std::hash::DefaultHasher>::try_insert_in_place`                                                                                                                                     
    --> src/hamt.rs:552:29                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
552  |                 return Some(self.insert(hash, level, new_kvp, insertion_count));                                                                                                                                                                         
     |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                           
note: inside `hamt::HamtMap::<u64, u64, item_store::CopyStore<u64, u64>>::insert_internal`                                                                                                                                                                      
    --> src/hamt.rs:1226:52                                                                                                                                                                                                                                     
     |                                                                                                                                                                                                                                                          
1226 |             BorrowedNodeRef::Exclusive(mutable) => mutable.try_insert_in_place(hash, 0, kvp, &mut insertion_count),                                                                                                                                      
     |                                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                       
note: inside `hamt::HamtMap::<u64, u64, item_store::CopyStore<u64, u64>>::insert`                                                                                                                                                                               
    --> src/hamt.rs:1303:9                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
1303 |         self.insert_internal(ItemStore::new(key, value))                                                                                                                                                                                                 
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                 
note: inside `testing::Test::test_insert_descending::<item_store::CopyStore<u64, u64>>`                                                                                                                                                                         
    --> src/testing.rs:90:19                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
90   |             map = map.insert(key, x).0;                                                                                                                                                                                                                  
     |                   ^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                     
note: inside `hamt::tests::test_insert_descending_copy`                                                                                                                                                                                                         
    --> src/hamt.rs:1648:9                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
1648 |         Test::test_insert_descending(HamtMap::<u64, u64, CopyStore>::new());                                                                                                                                                                             
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                              
note: inside closure                                                                                                                                                                                                                                            
    --> src/hamt.rs:1647:37                                                                                                                                                                                                                                     
     |                                                                                                                                                                                                                                                          
1646 |     #[test]                                                                                                                                                                                                                                              
     |     ------- in this procedural macro expansion                                                                                                                                                                                                           
1647 |     fn test_insert_descending_copy() {                                                                                                                                                                                                                   
     |                                     ^                                                                                                                                                                                                                    
     = note: this error originates in the attribute macro `test` (in Nightly builds, run with -Z macro-backtrace for more info)                                                                                                                                 
                                                                                                                                                                                                                                                                
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace                                                                                                                                                              
                                                                                                                                                                                                                                                                
error: aborting due to 1 previous error                                                                                                                                                                                                                         
                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                
        FAIL [   1.525s] hamt-rs hamt::tests::test_insert_descending_share                                                                                                                                                                                      
                                                                                                                                                                                                                                                                
--- STDOUT:              hamt-rs hamt::tests::test_insert_descending_share ---                                                                                                                                                                                  
                                                                                                                                                                                                                                                                
running 1 test                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                
--- STDERR:              hamt-rs hamt::tests::test_insert_descending_share ---                                                                                                                                                                                  
error: Undefined Behavior: attempting a write access using <201651> at alloc67306[0x18], but that tag does not exist in the borrow stack for this location                                                                                                      
    --> src/hamt.rs:305:21                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
305  |                     ptr::write(mem::transmute(entry_ptr), kvp);                                                                                                                                                                                          
     |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                           
     |                     |                                                                                                                                                                                                                                    
     |                     attempting a write access using <201651> at alloc67306[0x18], but that tag does not exist in the borrow stack for this location                                                                                                      
     |                     this error occurs as part of an access at alloc67306[0x18..0x20]                                                                                                                                                                     
     |                                                                                                                                                                                                                                                          
     = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental                                                                                                 
     = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information                                                                                                                                 
help: <201651> would have been created here, but this is a zero-size retag ([0x18..0x18]) so the tag in question does not exist anywhere                                                                                                                        
    --> src/hamt.rs:263:50                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
263  |             let base: *const u8 = mem::transmute(&self.__entries);                                                                                                                                                                                       
     |                                                  ^^^^^^^^^^^^^^^                                                                                                                                                                                         
     = note: BACKTRACE (of the first span) on thread `hamt::tests::te`:                                                                                                                                                                                         
     = note: inside `hamt::UnsafeNode::<u64, u64, item_store::ShareStore<u64, u64>, std::hash::DefaultHasher>::init_entry` at src/hamt.rs:305:21: 305:63                                                                                                        
note: inside `hamt::UnsafeNode::<u64, u64, item_store::ShareStore<u64, u64>, std::hash::DefaultHasher>::copy_with_new_entry`                                                                                                                                    
    --> src/hamt.rs:963:13                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
963  |             new_node.init_entry(new_i, new_entry);                                                                                                                                                                                                       
     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                        
note: inside `hamt::UnsafeNode::<u64, u64, item_store::ShareStore<u64, u64>, std::hash::DefaultHasher>::insert`                                                                                                                                                 
    --> src/hamt.rs:438:28                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
438  |             let new_node = self.copy_with_new_entry(local_key, NodeEntryOwned::Item(new_kvp));                                                                                                                                                           
     |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                            
note: inside `hamt::UnsafeNode::<u64, u64, item_store::ShareStore<u64, u64>, std::hash::DefaultHasher>::try_insert_in_place`                                                                                                                                    
    --> src/hamt.rs:552:29                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
552  |                 return Some(self.insert(hash, level, new_kvp, insertion_count));                                                                                                                                                                         
     |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                           
note: inside `hamt::HamtMap::<u64, u64>::insert_internal`                                                                                                                                                                                                       
    --> src/hamt.rs:1226:52                                                                                                                                                                                                                                     
     |                                                                                                                                                                                                                                                          
1226 |             BorrowedNodeRef::Exclusive(mutable) => mutable.try_insert_in_place(hash, 0, kvp, &mut insertion_count),                                                                                                                                      
     |                                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                       
note: inside `hamt::HamtMap::<u64, u64>::insert`                                                                                                                                                                                                                
    --> src/hamt.rs:1303:9                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
1303 |         self.insert_internal(ItemStore::new(key, value))                                                                                                                                                                                                 
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                 
note: inside `testing::Test::test_insert_descending::<item_store::ShareStore<u64, u64>>`                                                                                                                                                                        
    --> src/testing.rs:90:19                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
90   |             map = map.insert(key, x).0;                                                                                                                                                                                                                  
     |                   ^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                     
note: inside `hamt::tests::test_insert_descending_share`                                                                                                                                                                                                        
    --> src/hamt.rs:1720:9                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
1720 |         Test::test_insert_descending(HamtMap::<u64, u64, ShareStore>::new());                                                                                                                                                                            
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                             
note: inside closure                                                                                                                                                                                                                                            
    --> src/hamt.rs:1719:38                                                                                                                                                                                                                                     
     |                                                                                                                                                                                                                                                          
1718 |     #[test]                                                                                                                                                                                                                                              
     |     ------- in this procedural macro expansion                                                                                                                                                                                                           
1719 |     fn test_insert_descending_share() {                                                                                                                                                                                                                  
     |                                      ^                                                                                                                                                                                                                   
     = note: this error originates in the attribute macro `test` (in Nightly builds, run with -Z macro-backtrace for more info)                                                                                                                                 
                                                                                                                                                                                                                                                                
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace                                                                                                                                                              
                                                                                                                                                                                                                                                                
error: aborting due to 1 previous error                                                                                                                                                                                                                         
                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                
        FAIL [   1.513s] hamt-rs hamt::tests::test_insert_overwrite_copy                                                                                                                                                                                        
                                                                                                                                                                                                                                                                
--- STDOUT:              hamt-rs hamt::tests::test_insert_overwrite_copy ---                                                                                                                                                                                    
                                                                                                                                                                                                                                                                
running 1 test                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                
--- STDERR:              hamt-rs hamt::tests::test_insert_overwrite_copy ---                                                                                                                                                                                    
error: Undefined Behavior: attempting a write access using <200869> at alloc66785[0x18], but that tag does not exist in the borrow stack for this location                                                                                                      
    --> src/hamt.rs:305:21                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
305  |                     ptr::write(mem::transmute(entry_ptr), kvp);                                                                                                                                                                                          
     |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                           
     |                     |                                                                                                                                                                                                                                    
     |                     attempting a write access using <200869> at alloc66785[0x18], but that tag does not exist in the borrow stack for this location                                                                                                      
     |                     this error occurs as part of an access at alloc66785[0x18..0x28]                                                                                                                                                                     
     |                                                                                                                                                                                                                                                          
     = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental                                                                                                 
     = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information                                                                                                                                 
help: <200869> would have been created here, but this is a zero-size retag ([0x18..0x18]) so the tag in question does not exist anywhere                                                                                                                        
    --> src/hamt.rs:263:50                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
263  |             let base: *const u8 = mem::transmute(&self.__entries);                                                                                                                                                                                       
     |                                                  ^^^^^^^^^^^^^^^                                                                                                                                                                                         
     = note: BACKTRACE (of the first span) on thread `hamt::tests::te`:                                                                                                                                                                                         
     = note: inside `hamt::UnsafeNode::<u64, u64, item_store::CopyStore<u64, u64>, std::hash::DefaultHasher>::init_entry` at src/hamt.rs:305:21: 305:63                                                                                                         
note: inside `hamt::UnsafeNode::<u64, u64, item_store::CopyStore<u64, u64>, std::hash::DefaultHasher>::copy_with_new_entry`                                                                                                                                     
    --> src/hamt.rs:963:13                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
963  |             new_node.init_entry(new_i, new_entry);                                                                                                                                                                                                       
     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                        
note: inside `hamt::UnsafeNode::<u64, u64, item_store::CopyStore<u64, u64>, std::hash::DefaultHasher>::insert`                                                                                                                                                  
    --> src/hamt.rs:438:28                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
438  |             let new_node = self.copy_with_new_entry(local_key, NodeEntryOwned::Item(new_kvp));                                                                                                                                                           
     |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                            
note: inside `hamt::HamtMap::<u64, u64, item_store::CopyStore<u64, u64>>::insert_internal`                                                                                                                                                                      
    --> src/hamt.rs:1227:56                                                                                                                                                                                                                                     
     |                                                                                                                                                                                                                                                          
1227 |             BorrowedNodeRef::Shared(immutable) => Some(immutable.insert(hash, 0, kvp, &mut insertion_count))                                                                                                                                             
     |                                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                              
note: inside `hamt::HamtMap::<u64, u64, item_store::CopyStore<u64, u64>>::insert`                                                                                                                                                                               
    --> src/hamt.rs:1303:9                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
1303 |         self.insert_internal(ItemStore::new(key, value))                                                                                                                                                                                                 
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                 
note: inside `testing::Test::test_insert_overwrite::<item_store::CopyStore<u64, u64>>`                                                                                                                                                                          
    --> src/testing.rs:96:34                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
96   |         let (map1, new_entry1) = empty.clone().insert(1, 2);                                                                                                                                                                                             
     |                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                              
note: inside `hamt::tests::test_insert_overwrite_copy`                                                                                                                                                                                                          
    --> src/hamt.rs:1653:9                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
1653 |         Test::test_insert_overwrite(HamtMap::<u64, u64, CopyStore>::new());                                                                                                                                                                              
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                               
note: inside closure                                                                                                                                                                                                                                            
    --> src/hamt.rs:1652:36                                                                                                                                                                                                                                     
     |                                                                                                                                                                                                                                                          
1651 |     #[test]                                                                                                                                                                                                                                              
     |     ------- in this procedural macro expansion                                                                                                                                                                                                           
1652 |     fn test_insert_overwrite_copy() {                                                                                                                                                                                                                    
     |                                    ^                                                                                                                                                                                                                     
     = note: this error originates in the attribute macro `test` (in Nightly builds, run with -Z macro-backtrace for more info)                                                                                                                                 
                                                                                                                                                                                                                                                                
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace                                                                                                                                                              
                                                                                                                                                                                                                                                                
error: aborting due to 1 previous error                                                                                                                                                                                                                         
                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                
        FAIL [   1.756s] hamt-rs hamt::tests::test_insert_overwrite_share                                                                                                                                                                                       
                                                                                                                                                                                                                                                                
--- STDOUT:              hamt-rs hamt::tests::test_insert_overwrite_share ---                                                                                                                                                                                   
                                                                                                                                                                                                                                                                
running 1 test                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                
--- STDERR:              hamt-rs hamt::tests::test_insert_overwrite_share ---                                                                                                                                                                                   
error: Undefined Behavior: attempting a write access using <201593> at alloc67300[0x18], but that tag does not exist in the borrow stack for this location                                                                                                      
    --> src/hamt.rs:305:21                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
305  |                     ptr::write(mem::transmute(entry_ptr), kvp);                                                                                                                                                                                          
     |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                           
     |                     |                                                                                                                                                                                                                                    
     |                     attempting a write access using <201593> at alloc67300[0x18], but that tag does not exist in the borrow stack for this location                                                                                                      
     |                     this error occurs as part of an access at alloc67300[0x18..0x20]                                                                                                                                                                     
     |                                                                                                                                                                                                                                                          
     = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental                                                                                                 
     = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information                                                                                                                                 
help: <201593> would have been created here, but this is a zero-size retag ([0x18..0x18]) so the tag in question does not exist anywhere                                                                                                                        
    --> src/hamt.rs:263:50                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
263  |             let base: *const u8 = mem::transmute(&self.__entries);                                                                                                                                                                                       
     |                                                  ^^^^^^^^^^^^^^^                                                                                                                                                                                         
     = note: BACKTRACE (of the first span) on thread `hamt::tests::te`:                                                                                                                                                                                         
     = note: inside `hamt::UnsafeNode::<u64, u64, item_store::ShareStore<u64, u64>, std::hash::DefaultHasher>::init_entry` at src/hamt.rs:305:21: 305:63                                                                                                        
note: inside `hamt::UnsafeNode::<u64, u64, item_store::ShareStore<u64, u64>, std::hash::DefaultHasher>::copy_with_new_entry`                                                                                                                                    
    --> src/hamt.rs:963:13                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
963  |             new_node.init_entry(new_i, new_entry);                                                                                                                                                                                                       
     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                        
note: inside `hamt::UnsafeNode::<u64, u64, item_store::ShareStore<u64, u64>, std::hash::DefaultHasher>::insert`                                                                                                                                                 
    --> src/hamt.rs:438:28                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
438  |             let new_node = self.copy_with_new_entry(local_key, NodeEntryOwned::Item(new_kvp));                                                                                                                                                           
     |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                            
note: inside `hamt::HamtMap::<u64, u64>::insert_internal`                                                                                                                                                                                                       
    --> src/hamt.rs:1227:56                                                                                                                                                                                                                                     
     |                                                                                                                                                                                                                                                          
1227 |             BorrowedNodeRef::Shared(immutable) => Some(immutable.insert(hash, 0, kvp, &mut insertion_count))                                                                                                                                             
     |                                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                              
note: inside `hamt::HamtMap::<u64, u64>::insert`                                                                                                                                                                                                                
    --> src/hamt.rs:1303:9                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
1303 |         self.insert_internal(ItemStore::new(key, value))                                                                                                                                                                                                 
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                 
note: inside `testing::Test::test_insert_overwrite::<item_store::ShareStore<u64, u64>>`                                                                                                                                                                         
    --> src/testing.rs:96:34                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
96   |         let (map1, new_entry1) = empty.clone().insert(1, 2);                                                                                                                                                                                             
     |                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                              
note: inside `hamt::tests::test_insert_overwrite_share`                                                                                                                                                                                                         
    --> src/hamt.rs:1725:9                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
1725 |         Test::test_insert_overwrite(HamtMap::<u64, u64, ShareStore>::new());                                                                                                                                                                             
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                              
note: inside closure                                                                                                                                                                                                                                            
    --> src/hamt.rs:1724:37                                                                                                                                                                                                                                     
     |                                                                                                                                                                                                                                                          
1723 |     #[test]                                                                                                                                                                                                                                              
     |     ------- in this procedural macro expansion                                                                                                                                                                                                           
1724 |     fn test_insert_overwrite_share() {                                                                                                                                                                                                                   
     |                                     ^                                                                                                                                                                                                                    
     = note: this error originates in the attribute macro `test` (in Nightly builds, run with -Z macro-backtrace for more info)                                                                                                                                 
                                                                                                                                                                                                                                                                
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace                                                                                                                                                              
                                                                                                                                                                                                                                                                
error: aborting due to 1 previous error                                                                                                                                                                                                                         
                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                
        FAIL [   1.642s] hamt-rs hamt::tests::test_insert_share                                                                                                                                                                                                 
                                                                                                                                                                                                                                                                
--- STDOUT:              hamt-rs hamt::tests::test_insert_share ---                                                                                                                                                                                             
                                                                                                                                                                                                                                                                
running 1 test                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                
--- STDERR:              hamt-rs hamt::tests::test_insert_share ---                                                                                                                                                                                             
error: Undefined Behavior: attempting a write access using <200365> at alloc66658[0x18], but that tag does not exist in the borrow stack for this location                                                                                                      
    --> src/hamt.rs:305:21                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
305  |                     ptr::write(mem::transmute(entry_ptr), kvp);                                                                                                                                                                                          
     |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                           
     |                     |                                                                                                                                                                                                                                    
     |                     attempting a write access using <200365> at alloc66658[0x18], but that tag does not exist in the borrow stack for this location                                                                                                      
     |                     this error occurs as part of an access at alloc66658[0x18..0x20]                                                                                                                                                                     
     |                                                                                                                                                                                                                                                          
     = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental                                                                                                 
     = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information                                                                                                                                 
help: <200365> would have been created here, but this is a zero-size retag ([0x18..0x18]) so the tag in question does not exist anywhere                                                                                                                        
    --> src/hamt.rs:263:50                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
263  |             let base: *const u8 = mem::transmute(&self.__entries);                                                                                                                                                                                       
     |                                                  ^^^^^^^^^^^^^^^                                                                                                                                                                                         
     = note: BACKTRACE (of the first span) on thread `hamt::tests::te`:                                                                                                                                                                                         
     = note: inside `hamt::UnsafeNode::<u64, u64, item_store::ShareStore<u64, u64>, std::hash::DefaultHasher>::init_entry` at src/hamt.rs:305:21: 305:63                                                                                                        
note: inside `hamt::UnsafeNode::<u64, u64, item_store::ShareStore<u64, u64>, std::hash::DefaultHasher>::copy_with_new_entry`                                                                                                                                    
    --> src/hamt.rs:963:13                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
963  |             new_node.init_entry(new_i, new_entry);                                                                                                                                                                                                       
     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                        
note: inside `hamt::UnsafeNode::<u64, u64, item_store::ShareStore<u64, u64>, std::hash::DefaultHasher>::insert`                                                                                                                                                 
    --> src/hamt.rs:438:28                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
438  |             let new_node = self.copy_with_new_entry(local_key, NodeEntryOwned::Item(new_kvp));                                                                                                                                                           
     |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                            
note: inside `hamt::HamtMap::<u64, u64>::insert_internal`                                                                                                                                                                                                       
    --> src/hamt.rs:1227:56                                                                                                                                                                                                                                     
     |                                                                                                                                                                                                                                                          
1227 |             BorrowedNodeRef::Shared(immutable) => Some(immutable.insert(hash, 0, kvp, &mut insertion_count))                                                                                                                                             
     |                                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                              
note: inside `hamt::HamtMap::<u64, u64>::insert`                                                                                                                                                                                                                
    --> src/hamt.rs:1303:9                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
1303 |         self.insert_internal(ItemStore::new(key, value))                                                                                                                                                                                                 
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                 
note: inside `testing::Test::test_insert::<item_store::ShareStore<u64, u64>>`                                                                                                                                                                                   
    --> src/testing.rs:48:36                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
48   |         let (map01, new_entry01) = map00.clone().insert(1, 2);                                                                                                                                                                                           
     |                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                            
note: inside `hamt::tests::test_insert_share`                                                                                                                                                                                                                   
    --> src/hamt.rs:1710:9                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
1710 |         Test::test_insert(HamtMap::<u64, u64, ShareStore>::new());                                                                                                                                                                                       
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                        
note: inside closure                                                                                                                                                                                                                                            
    --> src/hamt.rs:1709:27                                                                                                                                                                                                                                     
     |                                                                                                                                                                                                                                                          
1708 |     #[test]                                                                                                                                                                                                                                              
     |     ------- in this procedural macro expansion                                                                                                                                                                                                           
1709 |     fn test_insert_share() {                                                                                                                                                                                                                             
     |                           ^                                                                                                                                                                                                                              
     = note: this error originates in the attribute macro `test` (in Nightly builds, run with -Z macro-backtrace for more info)                                                                                                                                 
                                                                                                                                                                                                                                                                
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace                                                                                                                                                              
                                                                                                                                                                                                                                                                
error: aborting due to 1 previous error                                                                                                                                                                                                                         
                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                
        FAIL [   1.545s] hamt-rs hamt::tests::test_iterator_copy                                                                                                                                                                                                
                                                                                                                                                                                                                                                                
--- STDOUT:              hamt-rs hamt::tests::test_iterator_copy ---                                                                                                                                                                                            
                                                                                                                                                                                                                                                                
running 1 test                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                
--- STDERR:              hamt-rs hamt::tests::test_iterator_copy ---                                                                                                                                                                                            
error: Undefined Behavior: attempting a write access using <201042> at alloc66949[0x18], but that tag does not exist in the borrow stack for this location                                                                                                      
    --> src/hamt.rs:305:21                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
305  |                     ptr::write(mem::transmute(entry_ptr), kvp);                                                                                                                                                                                          
     |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                           
     |                     |                                                                                                                                                                                                                                    
     |                     attempting a write access using <201042> at alloc66949[0x18], but that tag does not exist in the borrow stack for this location                                                                                                      
     |                     this error occurs as part of an access at alloc66949[0x18..0x28]                                                                                                                                                                     
     |                                                                                                                                                                                                                                                          
     = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental                                                                                                 
     = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information                                                                                                                                 
help: <201042> would have been created here, but this is a zero-size retag ([0x18..0x18]) so the tag in question does not exist anywhere                                                                                                                        
    --> src/hamt.rs:263:50                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
263  |             let base: *const u8 = mem::transmute(&self.__entries);                                                                                                                                                                                       
     |                                                  ^^^^^^^^^^^^^^^                                                                                                                                                                                         
     = note: BACKTRACE (of the first span) on thread `hamt::tests::te`:                                                                                                                                                                                         
     = note: inside `hamt::UnsafeNode::<u64, u64, item_store::CopyStore<u64, u64>, std::hash::DefaultHasher>::init_entry` at src/hamt.rs:305:21: 305:63                                                                                                         
note: inside `hamt::UnsafeNode::<u64, u64, item_store::CopyStore<u64, u64>, std::hash::DefaultHasher>::copy_with_new_entry`                                                                                                                                     
    --> src/hamt.rs:963:13                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
963  |             new_node.init_entry(new_i, new_entry);                                                                                                                                                                                                       
     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                        
note: inside `hamt::UnsafeNode::<u64, u64, item_store::CopyStore<u64, u64>, std::hash::DefaultHasher>::insert`                                                                                                                                                  
    --> src/hamt.rs:438:28                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
438  |             let new_node = self.copy_with_new_entry(local_key, NodeEntryOwned::Item(new_kvp));                                                                                                                                                           
     |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                            
note: inside `hamt::UnsafeNode::<u64, u64, item_store::CopyStore<u64, u64>, std::hash::DefaultHasher>::try_insert_in_place`                                                                                                                                     
    --> src/hamt.rs:552:29                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
552  |                 return Some(self.insert(hash, level, new_kvp, insertion_count));                                                                                                                                                                         
     |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                           
note: inside `hamt::HamtMap::<u64, u64, item_store::CopyStore<u64, u64>>::insert_internal`                                                                                                                                                                      
    --> src/hamt.rs:1226:52                                                                                                                                                                                                                                     
     |                                                                                                                                                                                                                                                          
1226 |             BorrowedNodeRef::Exclusive(mutable) => mutable.try_insert_in_place(hash, 0, kvp, &mut insertion_count),                                                                                                                                      
     |                                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                       
note: inside `hamt::HamtMap::<u64, u64, item_store::CopyStore<u64, u64>>::insert`                                                                                                                                                                               
    --> src/hamt.rs:1303:9                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
1303 |         self.insert_internal(ItemStore::new(key, value))                                                                                                                                                                                                 
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                 
note: inside `hamt::HamtMap::<u64, u64, item_store::CopyStore<u64, u64>>::plus`                                                                                                                                                                                 
    --> src/hamt.rs:1317:9                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
1317 |         self.insert(key, val).0                                                                                                                                                                                                                          
     |         ^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                            
note: inside `hamt::tests::test_iterator_copy`                                                                                                                                                                                                                  
    --> src/hamt.rs:1621:19                                                                                                                                                                                                                                     
     |                                                                                                                                                                                                                                                          
1621 |             map = map.plus(i, i);                                                                                                                                                                                                                        
     |                   ^^^^^^^^^^^^^^                                                                                                                                                                                                                         
note: inside closure                                                                                                                                                                                                                                            
    --> src/hamt.rs:1616:28                                                                                                                                                                                                                                     
     |                                                                                                                                                                                                                                                          
1615 |     #[test]                                                                                                                                                                                                                                              
     |     ------- in this procedural macro expansion                                                                                                                                                                                                           
1616 |     fn test_iterator_copy() {                                                                                                                                                                                                                            
     |                            ^                                                                                                                                                                                                                             
     = note: this error originates in the attribute macro `test` (in Nightly builds, run with -Z macro-backtrace for more info)                                                                                                                                 
                                                                                                                                                                                                                                                                
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace                                                                                                                                                              
                                                                                                                                                                                                                                                                
error: aborting due to 1 previous error                                                                                                                                                                                                                         
                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                
        FAIL [   1.457s] hamt-rs hamt::tests::test_iterator_share                                                                                                                                                                                               
                                                                                                                                                                                                                                                                
--- STDOUT:              hamt-rs hamt::tests::test_iterator_share ---                                                                                                                                                                                           
                                                                                                                                                                                                                                                                
running 1 test                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                
--- STDERR:              hamt-rs hamt::tests::test_iterator_share ---                                                                                                                                                                                           
error: Undefined Behavior: attempting a write access using <200828> at alloc66876[0x18], but that tag does not exist in the borrow stack for this location                                                                                                      
    --> src/hamt.rs:305:21                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
305  |                     ptr::write(mem::transmute(entry_ptr), kvp);                                                                                                                                                                                          
     |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                           
     |                     |                                                                                                                                                                                                                                    
     |                     attempting a write access using <200828> at alloc66876[0x18], but that tag does not exist in the borrow stack for this location                                                                                                      
     |                     this error occurs as part of an access at alloc66876[0x18..0x20]                                                                                                                                                                     
     |                                                                                                                                                                                                                                                          
     = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental                                                                                                 
     = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information                                                                                                                                 
help: <200828> would have been created here, but this is a zero-size retag ([0x18..0x18]) so the tag in question does not exist anywhere                                                                                                                        
    --> src/hamt.rs:263:50                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
263  |             let base: *const u8 = mem::transmute(&self.__entries);                                                                                                                                                                                       
     |                                                  ^^^^^^^^^^^^^^^                                                                                                                                                                                         
     = note: BACKTRACE (of the first span) on thread `hamt::tests::te`:                                                                                                                                                                                         
     = note: inside `hamt::UnsafeNode::<u64, u64, item_store::ShareStore<u64, u64>, std::hash::DefaultHasher>::init_entry` at src/hamt.rs:305:21: 305:63                                                                                                        
note: inside `hamt::UnsafeNode::<u64, u64, item_store::ShareStore<u64, u64>, std::hash::DefaultHasher>::copy_with_new_entry`                                                                                                                                    
    --> src/hamt.rs:963:13                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
963  |             new_node.init_entry(new_i, new_entry);                                                                                                                                                                                                       
     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                        
note: inside `hamt::UnsafeNode::<u64, u64, item_store::ShareStore<u64, u64>, std::hash::DefaultHasher>::insert`                                                                                                                                                 
    --> src/hamt.rs:438:28                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
438  |             let new_node = self.copy_with_new_entry(local_key, NodeEntryOwned::Item(new_kvp));                                                                                                                                                           
     |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                            
note: inside `hamt::UnsafeNode::<u64, u64, item_store::ShareStore<u64, u64>, std::hash::DefaultHasher>::try_insert_in_place`                                                                                                                                    
    --> src/hamt.rs:552:29                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
552  |                 return Some(self.insert(hash, level, new_kvp, insertion_count));                                                                                                                                                                         
     |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                           
note: inside `hamt::HamtMap::<u64, u64>::insert_internal`                                                                                                                                                                                                       
    --> src/hamt.rs:1226:52                                                                                                                                                                                                                                     
     |                                                                                                                                                                                                                                                          
1226 |             BorrowedNodeRef::Exclusive(mutable) => mutable.try_insert_in_place(hash, 0, kvp, &mut insertion_count),                                                                                                                                      
     |                                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                       
note: inside `hamt::HamtMap::<u64, u64>::insert`                                                                                                                                                                                                                
    --> src/hamt.rs:1303:9                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
1303 |         self.insert_internal(ItemStore::new(key, value))                                                                                                                                                                                                 
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                 
note: inside `hamt::HamtMap::<u64, u64>::plus`                                                                                                                                                                                                                  
    --> src/hamt.rs:1317:9                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
1317 |         self.insert(key, val).0                                                                                                                                                                                                                          
     |         ^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                            
note: inside `hamt::tests::test_iterator_share`                                                                                                                                                                                                                 
    --> src/hamt.rs:1693:19                                                                                                                                                                                                                                     
     |                                                                                                                                                                                                                                                          
1693 |             map = map.plus(i, i);                                                                                                                                                                                                                        
     |                   ^^^^^^^^^^^^^^                                                                                                                                                                                                                         
note: inside closure                                                                                                                                                                                                                                            
    --> src/hamt.rs:1688:29                                                                                                                                                                                                                                     
     |                                                                                                                                                                                                                                                          
1687 |     #[test]                                                                                                                                                                                                                                              
     |     ------- in this procedural macro expansion                                                                                                                                                                                                           
1688 |     fn test_iterator_share() {                                                                                                                                                                                                                           
     |                             ^                                                                                                                                                                                                                            
     = note: this error originates in the attribute macro `test` (in Nightly builds, run with -Z macro-backtrace for more info)                                                                                                                                 
                                                                                                                                                                                                                                                                
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace                                                                                                                                                              
                                                                                                                                                                                                                                                                
error: aborting due to 1 previous error                                                                                                                                                                                                                         
                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                
        FAIL [   1.429s] hamt-rs hamt::tests::test_remove_copy                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                
--- STDOUT:              hamt-rs hamt::tests::test_remove_copy ---                                                                                                                                                                                              
                                                                                                                                                                                                                                                                
running 1 test                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                
--- STDERR:              hamt-rs hamt::tests::test_remove_copy ---                                                                                                                                                                                              
error: Undefined Behavior: attempting a write access using <200183> at alloc66791[0x18], but that tag does not exist in the borrow stack for this location                                                                                                      
    --> src/hamt.rs:305:21                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
305  |                     ptr::write(mem::transmute(entry_ptr), kvp);                                                                                                                                                                                          
     |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                           
     |                     |                                                                                                                                                                                                                                    
     |                     attempting a write access using <200183> at alloc66791[0x18], but that tag does not exist in the borrow stack for this location                                                                                                      
     |                     this error occurs as part of an access at alloc66791[0x18..0x28]                                                                                                                                                                     
     |                                                                                                                                                                                                                                                          
     = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental                                                                                                 
     = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information                                                                                                                                 
help: <200183> would have been created here, but this is a zero-size retag ([0x18..0x18]) so the tag in question does not exist anywhere                                                                                                                        
    --> src/hamt.rs:263:50                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
263  |             let base: *const u8 = mem::transmute(&self.__entries);                                                                                                                                                                                       
     |                                                  ^^^^^^^^^^^^^^^                                                                                                                                                                                         
     = note: BACKTRACE (of the first span) on thread `hamt::tests::te`:                                                                                                                                                                                         
     = note: inside `hamt::UnsafeNode::<u64, u64, item_store::CopyStore<u64, u64>, std::hash::DefaultHasher>::init_entry` at src/hamt.rs:305:21: 305:63                                                                                                         
note: inside `hamt::UnsafeNode::<u64, u64, item_store::CopyStore<u64, u64>, std::hash::DefaultHasher>::copy_with_new_entry`                                                                                                                                     
    --> src/hamt.rs:963:13                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
963  |             new_node.init_entry(new_i, new_entry);                                                                                                                                                                                                       
     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                        
note: inside `hamt::UnsafeNode::<u64, u64, item_store::CopyStore<u64, u64>, std::hash::DefaultHasher>::insert`                                                                                                                                                  
    --> src/hamt.rs:438:28                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
438  |             let new_node = self.copy_with_new_entry(local_key, NodeEntryOwned::Item(new_kvp));                                                                                                                                                           
     |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                            
note: inside `hamt::UnsafeNode::<u64, u64, item_store::CopyStore<u64, u64>, std::hash::DefaultHasher>::try_insert_in_place`                                                                                                                                     
    --> src/hamt.rs:552:29                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
552  |                 return Some(self.insert(hash, level, new_kvp, insertion_count));                                                                                                                                                                         
     |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                           
note: inside `hamt::HamtMap::<u64, u64, item_store::CopyStore<u64, u64>>::insert_internal`                                                                                                                                                                      
    --> src/hamt.rs:1226:52                                                                                                                                                                                                                                     
     |                                                                                                                                                                                                                                                          
1226 |             BorrowedNodeRef::Exclusive(mutable) => mutable.try_insert_in_place(hash, 0, kvp, &mut insertion_count),                                                                                                                                      
     |                                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                       
note: inside `hamt::HamtMap::<u64, u64, item_store::CopyStore<u64, u64>>::insert`                                                                                                                                                                               
    --> src/hamt.rs:1303:9                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
1303 |         self.insert_internal(ItemStore::new(key, value))                                                                                                                                                                                                 
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                 
note: inside `testing::Test::test_remove::<item_store::CopyStore<u64, u64>>`                                                                                                                                                                                    
    --> src/testing.rs:116:26                                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
116  |           let (map00, _) = (empty                                                                                                                                                                                                                        
     |  __________________________^                                                                                                                                                                                                                             
117  | |             .insert(1, 2)).0                                                                                                                                                                                                                           
     | |__________________________^                                                                                                                                                                                                                             
note: inside `hamt::tests::test_remove_copy`                                                                                                                                                                                                                    
    --> src/hamt.rs:1658:9                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
1658 |         Test::test_remove(HamtMap::<u64, u64, CopyStore>::new());                                                                                                                                                                                        
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                         
note: inside closure                                                                                                                                                                                                                                            
    --> src/hamt.rs:1657:26                                                                                                                                                                                                                                     
     |                                                                                                                                                                                                                                                          
1656 |     #[test]                                                                                                                                                                                                                                              
     |     ------- in this procedural macro expansion                                                                                                                                                                                                           
1657 |     fn test_remove_copy() {                                                                                                                                                                                                                              
     |                          ^                                                                                                                                                                                                                               
     = note: this error originates in the attribute macro `test` (in Nightly builds, run with -Z macro-backtrace for more info)                                                                                                                                 
                                                                                                                                                                                                                                                                
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace                                                                                                                                                              
                                                                                                                                                                                                                                                                
error: aborting due to 1 previous error                                                                                                                                                                                                                         
                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                
        FAIL [   1.405s] hamt-rs hamt::tests::test_remove_share                                                                                                                                                                                                 
                                                                                                                                                                                                                                                                
--- STDOUT:              hamt-rs hamt::tests::test_remove_share ---                                                                                                                                                                                             
                                                                                                                                                                                                                                                                
running 1 test                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                
--- STDERR:              hamt-rs hamt::tests::test_remove_share ---                                                                                                                                                                                             
error: Undefined Behavior: attempting a write access using <200553> at alloc66836[0x18], but that tag does not exist in the borrow stack for this location                                                                                                      
    --> src/hamt.rs:305:21                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
305  |                     ptr::write(mem::transmute(entry_ptr), kvp);                                                                                                                                                                                          
     |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                           
     |                     |                                                                                                                                                                                                                                    
     |                     attempting a write access using <200553> at alloc66836[0x18], but that tag does not exist in the borrow stack for this location                                                                                                      
     |                     this error occurs as part of an access at alloc66836[0x18..0x20]                                                                                                                                                                     
     |                                                                                                                                                                                                                                                          
     = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental                                                                                                 
     = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information                                                                                                                                 
help: <200553> would have been created here, but this is a zero-size retag ([0x18..0x18]) so the tag in question does not exist anywhere                                                                                                                        
    --> src/hamt.rs:263:50                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
263  |             let base: *const u8 = mem::transmute(&self.__entries);                                                                                                                                                                                       
     |                                                  ^^^^^^^^^^^^^^^                                                                                                                                                                                         
     = note: BACKTRACE (of the first span) on thread `hamt::tests::te`:                                                                                                                                                                                         
     = note: inside `hamt::UnsafeNode::<u64, u64, item_store::ShareStore<u64, u64>, std::hash::DefaultHasher>::init_entry` at src/hamt.rs:305:21: 305:63                                                                                                        
note: inside `hamt::UnsafeNode::<u64, u64, item_store::ShareStore<u64, u64>, std::hash::DefaultHasher>::copy_with_new_entry`                                                                                                                                    
    --> src/hamt.rs:963:13                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
963  |             new_node.init_entry(new_i, new_entry);                                                                                                                                                                                                       
     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                        
note: inside `hamt::UnsafeNode::<u64, u64, item_store::ShareStore<u64, u64>, std::hash::DefaultHasher>::insert`                                                                                                                                                 
    --> src/hamt.rs:438:28                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
438  |             let new_node = self.copy_with_new_entry(local_key, NodeEntryOwned::Item(new_kvp));                                                                                                                                                           
     |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                            
note: inside `hamt::UnsafeNode::<u64, u64, item_store::ShareStore<u64, u64>, std::hash::DefaultHasher>::try_insert_in_place`                                                                                                                                    
    --> src/hamt.rs:552:29                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
552  |                 return Some(self.insert(hash, level, new_kvp, insertion_count));                                                                                                                                                                         
     |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                           
note: inside `hamt::HamtMap::<u64, u64>::insert_internal`                                                                                                                                                                                                       
    --> src/hamt.rs:1226:52                                                                                                                                                                                                                                     
     |                                                                                                                                                                                                                                                          
1226 |             BorrowedNodeRef::Exclusive(mutable) => mutable.try_insert_in_place(hash, 0, kvp, &mut insertion_count),                                                                                                                                      
     |                                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                       
note: inside `hamt::HamtMap::<u64, u64>::insert`                                                                                                                                                                                                                
    --> src/hamt.rs:1303:9                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
1303 |         self.insert_internal(ItemStore::new(key, value))                                                                                                                                                                                                 
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                 
note: inside `testing::Test::test_remove::<item_store::ShareStore<u64, u64>>`                                                                                                                                                                                   
    --> src/testing.rs:116:26                                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
116  |           let (map00, _) = (empty                                                                                                                                                                                                                        
     |  __________________________^                                                                                                                                                                                                                             
117  | |             .insert(1, 2)).0                                                                                                                                                                                                                           
     | |__________________________^                                                                                                                                                                                                                             
note: inside `hamt::tests::test_remove_share`                                                                                                                                                                                                                   
    --> src/hamt.rs:1730:9                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
1730 |         Test::test_remove(HamtMap::<u64, u64, ShareStore>::new());                                                                                                                                                                                       
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                        
note: inside closure                                                                                                                                                                                                                                            
    --> src/hamt.rs:1729:27                                                                                                                                                                                                                                     
     |                                                                                                                                                                                                                                                          
1728 |     #[test]                                                                                                                                                                                                                                              
     |     ------- in this procedural macro expansion                                                                                                                                                                                                           
1729 |     fn test_remove_share() {                                                                                                                                                                                                                             
     |                           ^                                                                                                                                                                                                                              
     = note: this error originates in the attribute macro `test` (in Nightly builds, run with -Z macro-backtrace for more info)                                                                                                                                 
                                                                                                                                                                                                                                                                
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace                                                                                                                                                              
                                                                                                                                                                                                                                                                
error: aborting due to 1 previous error                                                                                                                                                                                                                         
                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                
------------                                                                                                                                                                                                                                                    
     Summary [  32.730s] 18 tests run: 1 passed, 17 failed, 0 skipped                                                                                                                                                                                           
        FAIL [   1.626s] hamt-rs hamt::tests::stress_test_copy                                                                                                                                                                                                  
        FAIL [   1.681s] hamt-rs hamt::tests::stress_test_share                                                                                                                                                                                                 
        FAIL [   1.418s] hamt-rs hamt::tests::test_default_copy                                                                                                                                                                                                 
        FAIL [   1.256s] hamt-rs hamt::tests::test_eq_empty_copy                                                                                                                                                                                                
        FAIL [   2.918s] hamt-rs hamt::tests::test_eq_random_copy                                                                                                                                                                                               
        FAIL [   1.671s] hamt-rs hamt::tests::test_insert_ascending_copy                                                                                                                                                                                        
        FAIL [   5.067s] hamt-rs hamt::tests::test_insert_ascending_share                                                                                                                                                                                       
        FAIL [   1.769s] hamt-rs hamt::tests::test_insert_copy                                                                                                                                                                                                  
        FAIL [   1.713s] hamt-rs hamt::tests::test_insert_descending_copy                                                                                                                                                                                       
        FAIL [   1.525s] hamt-rs hamt::tests::test_insert_descending_share                                                                                                                                                                                      
        FAIL [   1.513s] hamt-rs hamt::tests::test_insert_overwrite_copy                                                                                                                                                                                        
        FAIL [   1.756s] hamt-rs hamt::tests::test_insert_overwrite_share                                                                                                                                                                                       
        FAIL [   1.642s] hamt-rs hamt::tests::test_insert_share                                                                                                                                                                                                 
        FAIL [   1.545s] hamt-rs hamt::tests::test_iterator_copy                                                                                                                                                                                                
        FAIL [   1.457s] hamt-rs hamt::tests::test_iterator_share                                                                                                                                                                                               
        FAIL [   1.429s] hamt-rs hamt::tests::test_remove_copy                                                                                                                                                                                                  
        FAIL [   1.405s] hamt-rs hamt::tests::test_remove_share                                                                                                                                                                                                 
error: test run failed                                                                                                                                                                                                                                          
    Finished `test` profile [unoptimized + debuginfo] target(s) in 0.01s                                                                                                                                                                                        
   Doc-tests hamt_rs                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                
running 0 tests                                                                                                                                                                                                                                                 
                                                                                                                                                                                                                                                                
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s