@@ -20,9 +20,9 @@ use super::{
20
20
21
21
#[ derive( Copy , Clone , Debug , Hash , PartialEq , Eq , HashStable ) ]
22
22
/// Information required for the sound usage of a `MemPlace`.
23
- pub enum MemPlaceMeta < Tag = ( ) , Id = AllocId > {
23
+ pub enum MemPlaceMeta < Tag = ( ) > {
24
24
/// The unsized payload (e.g. length for slices or vtable pointer for trait objects).
25
- Meta ( Scalar < Tag , Id > ) ,
25
+ Meta ( Scalar < Tag > ) ,
26
26
/// `Sized` types or unsized `extern type`
27
27
None ,
28
28
/// 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> {
32
32
Poison ,
33
33
}
34
34
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 > {
37
37
match self {
38
38
Self :: Meta ( s) => s,
39
39
Self :: None | Self :: Poison => {
@@ -47,9 +47,7 @@ impl<Tag, Id> MemPlaceMeta<Tag, Id> {
47
47
Self :: None | Self :: Poison => false ,
48
48
}
49
49
}
50
- }
51
50
52
- impl < Tag > MemPlaceMeta < Tag > {
53
51
pub fn erase_tag ( self ) -> MemPlaceMeta < ( ) > {
54
52
match self {
55
53
Self :: Meta ( s) => MemPlaceMeta :: Meta ( s. erase_tag ( ) ) ,
@@ -60,22 +58,22 @@ impl<Tag> MemPlaceMeta<Tag> {
60
58
}
61
59
62
60
#[ derive( Copy , Clone , Debug , Hash , PartialEq , Eq , HashStable ) ]
63
- pub struct MemPlace < Tag = ( ) , Id = AllocId > {
61
+ pub struct MemPlace < Tag = ( ) > {
64
62
/// A place may have an integral pointer for ZSTs, and since it might
65
63
/// be turned back into a reference before ever being dereferenced.
66
64
/// However, it may never be undef.
67
- pub ptr : Scalar < Tag , Id > ,
65
+ pub ptr : Scalar < Tag > ,
68
66
pub align : Align ,
69
67
/// Metadata for unsized places. Interpretation is up to the type.
70
68
/// Must not be present for sized types, but can be missing for unsized types
71
69
/// (e.g., `extern type`).
72
- pub meta : MemPlaceMeta < Tag , Id > ,
70
+ pub meta : MemPlaceMeta < Tag > ,
73
71
}
74
72
75
73
#[ derive( Copy , Clone , Debug , Hash , PartialEq , Eq , HashStable ) ]
76
- pub enum Place < Tag = ( ) , Id = AllocId > {
74
+ pub enum Place < Tag = ( ) > {
77
75
/// A place referring to a value allocated in the `Memory` system.
78
- Ptr ( MemPlace < Tag , Id > ) ,
76
+ Ptr ( MemPlace < Tag > ) ,
79
77
80
78
/// To support alloc-free locals, we are able to write directly to a local.
81
79
/// (Without that optimization, we'd just always be a `MemPlace`.)
0 commit comments