@@ -20,9 +20,9 @@ use super::{
2020
2121#[ derive( Copy , Clone , Debug , Hash , PartialEq , Eq , HashStable ) ]
2222/// Information required for the sound usage of a `MemPlace`.
23- pub enum MemPlaceMeta < Tag = ( ) , Id = AllocId > {
23+ pub enum MemPlaceMeta < Tag = ( ) > {
2424 /// The unsized payload (e.g. length for slices or vtable pointer for trait objects).
25- Meta ( Scalar < Tag , Id > ) ,
25+ Meta ( Scalar < Tag > ) ,
2626 /// `Sized` types or unsized `extern type`
2727 None ,
2828 /// The address of this place may not be taken. This protects the `MemPlace` from coming from
@@ -32,8 +32,8 @@ pub enum MemPlaceMeta<Tag = (), Id = AllocId> {
3232 Poison ,
3333}
3434
35- impl < Tag , Id > MemPlaceMeta < Tag , Id > {
36- pub fn unwrap_meta ( self ) -> Scalar < Tag , Id > {
35+ impl < Tag > MemPlaceMeta < Tag > {
36+ pub fn unwrap_meta ( self ) -> Scalar < Tag > {
3737 match self {
3838 Self :: Meta ( s) => s,
3939 Self :: None | Self :: Poison => {
@@ -47,9 +47,7 @@ impl<Tag, Id> MemPlaceMeta<Tag, Id> {
4747 Self :: None | Self :: Poison => false ,
4848 }
4949 }
50- }
5150
52- impl < Tag > MemPlaceMeta < Tag > {
5351 pub fn erase_tag ( self ) -> MemPlaceMeta < ( ) > {
5452 match self {
5553 Self :: Meta ( s) => MemPlaceMeta :: Meta ( s. erase_tag ( ) ) ,
@@ -60,22 +58,22 @@ impl<Tag> MemPlaceMeta<Tag> {
6058}
6159
6260#[ derive( Copy , Clone , Debug , Hash , PartialEq , Eq , HashStable ) ]
63- pub struct MemPlace < Tag = ( ) , Id = AllocId > {
61+ pub struct MemPlace < Tag = ( ) > {
6462 /// A place may have an integral pointer for ZSTs, and since it might
6563 /// be turned back into a reference before ever being dereferenced.
6664 /// However, it may never be undef.
67- pub ptr : Scalar < Tag , Id > ,
65+ pub ptr : Scalar < Tag > ,
6866 pub align : Align ,
6967 /// Metadata for unsized places. Interpretation is up to the type.
7068 /// Must not be present for sized types, but can be missing for unsized types
7169 /// (e.g., `extern type`).
72- pub meta : MemPlaceMeta < Tag , Id > ,
70+ pub meta : MemPlaceMeta < Tag > ,
7371}
7472
7573#[ derive( Copy , Clone , Debug , Hash , PartialEq , Eq , HashStable ) ]
76- pub enum Place < Tag = ( ) , Id = AllocId > {
74+ pub enum Place < Tag = ( ) > {
7775 /// A place referring to a value allocated in the `Memory` system.
78- Ptr ( MemPlace < Tag , Id > ) ,
76+ Ptr ( MemPlace < Tag > ) ,
7977
8078 /// To support alloc-free locals, we are able to write directly to a local.
8179 /// (Without that optimization, we'd just always be a `MemPlace`.)
0 commit comments