File tree Expand file tree Collapse file tree 5 files changed +5
-1955
lines changed
compiler/rustc_data_structures/src Expand file tree Collapse file tree 5 files changed +5
-1955
lines changed Original file line number Diff line number Diff line change 2626#![ feature( test) ]
2727#![ feature( thread_id_value) ]
2828#![ feature( vec_into_raw_parts) ]
29+ #![ feature( ptr_sub_ptr) ]
2930#![ allow( rustc:: default_hash_types) ]
3031#![ allow( rustc:: potential_query_instability) ]
3132
@@ -76,7 +77,6 @@ pub mod jobserver;
7677pub mod macros;
7778pub mod map_in_place;
7879pub mod obligation_forest;
79- pub mod owning_ref;
8080pub mod sip128;
8181pub mod small_c_str;
8282pub mod small_str;
@@ -103,6 +103,7 @@ pub mod vec_map;
103103pub mod work_queue;
104104pub use atomic_ref:: AtomicRef ;
105105pub mod frozen;
106+ pub mod owned_slice;
106107pub mod sso;
107108pub mod steal;
108109pub mod tagged_ptr;
Original file line number Diff line number Diff line change @@ -2,9 +2,10 @@ use std::fs::File;
22use std:: io;
33use std:: ops:: Deref ;
44
5- use crate :: owning_ref:: StableAddress ;
5+ // FIXME(nilstrieb): This was created to implement owning_ref::StableAddress.
6+ // Since owning_ref has been deleted, this can be removed as well.
67
7- /// A trivial wrapper for [`memmap2::Mmap`] that implements [` StableAddress`] .
8+ /// A trivial wrapper for [`memmap2::Mmap`] that implements owning_ref:: StableAddress.
89#[ cfg( not( target_arch = "wasm32" ) ) ]
910pub struct Mmap ( memmap2:: Mmap ) ;
1011
@@ -39,9 +40,3 @@ impl Deref for Mmap {
3940 & * self . 0
4041 }
4142}
42-
43- // SAFETY: On architectures other than WASM, mmap is used as backing storage. The address of this
44- // memory map is stable. On WASM, `Vec<u8>` is used as backing storage. The `Mmap` type doesn't
45- // export any function that can cause the `Vec` to be re-allocated. As such the address of the
46- // bytes inside this `Vec` is stable.
47- unsafe impl StableAddress for Mmap { }
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments