@@ -106,34 +106,30 @@ pub enum Abi {
106
106
}
107
107
```
108
108
109
- where
109
+ where:
110
110
111
111
``` rust,norun
112
112
enum Integer { I8, I16, I32, I64, I128, }
113
113
enum FloatTy { F32, F64, }
114
114
115
- enum Primitive {
115
+ enum Scalar {
116
116
Int(Integer, /*signedness:*/ bool),
117
117
Float(FloatTy),
118
118
Pointer
119
119
}
120
-
121
- struct Scalar {
122
- value: Primitive,
123
- valid_range: RangeInclusive<u128>,
124
- }
125
120
```
126
121
127
- For example, right now, the call ABI of:
122
+ For example, the call ABI of:
128
123
129
124
* ` i32 ` is ` Scalar ` ,
130
- * ` struct Wrapper(i32); ` (without ` repr(transparent) ` ) is also ` Scalar ` (only larger ` struct ` s are aggregates),
131
- * ` #[repr(C)] struct Wrapper(i32); ` is ` Aggregate { sized: true } ` - required by `repr(C**** .
125
+ * ` #[repr(C)] struct Wrapper(i32); ` is ` Aggregate { sized: true } ` .
126
+ * ` #[repr(transparent)] struct Wrapper(i32); ` is ` Scalar ` .
127
+
128
+ The call ABI of ` repr(Rust) ` types is unspecified. The following is not
129
+ guaranteed, but right now the call ABI of:
132
130
133
- ** NOTE** : the call ABI of ` repr(Rust) ` types is unspecified, so the "call ABI"
134
- of ` repr(Rust) ` types is not guaranteed and ` unsafe ` code shall not rely on it.
135
- That is, code that requires ` struct Wrapper(i32); ` to have the same ABI as ` i32 `
136
- needs to use ` repr(transparent) ` . f
131
+ * ` /*#[repr(Rust)]*/ struct Wrapper(i32); ` (without ` repr(transparent) ` ) is also
132
+ ` Scalar ` - only larger ` struct ` s are aggregates.
137
133
138
134
### TODO
139
135
0 commit comments