Rename PtrKey as Interned and improve it.

In particular, there's now more protection against incorrect usage,
because you can only create one via `Interned::new_unchecked`, which
makes it more obvious that you must be careful.

There are also some tests.
This commit is contained in:
Nicholas Nethercote 2022-02-04 14:26:29 +11:00
parent 028e57ba1d
commit 0c2ebbd412
7 changed files with 177 additions and 50 deletions

View file

@ -21,6 +21,7 @@
#![feature(type_alias_impl_trait)]
#![feature(new_uninit)]
#![feature(once_cell)]
#![feature(rustc_attrs)]
#![feature(test)]
#![feature(thread_id_value)]
#![feature(vec_into_raw_parts)]
@ -68,12 +69,12 @@ pub mod flock;
pub mod functor;
pub mod fx;
pub mod graph;
pub mod intern;
pub mod jobserver;
pub mod macros;
pub mod map_in_place;
pub mod obligation_forest;
pub mod owning_ref;
pub mod ptr_key;
pub mod sip128;
pub mod small_c_str;
pub mod snapshot_map;