You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR updates the features list using data from the UI test suite's
LLVM run, the integration tests, plus specific targeted checks to update
the Status and add a Notes column with high level info.
|`Option` / `Result`|Supported|construction and matching work; decoding niche/with-field variants from raw bytes not yet (see Enums)|
88
+
|Floating point|Not supported|float decoding and arithmetic not yet implemented|
89
+
|Slices|Partially supported|indexing and `split_at` work; slice rest-patterns and fat-pointer length metadata not yet|
90
+
|Arrays|Partially supported|indexing and multi-dimensional arrays work; slice rest-patterns (`[head, tail @ ..]`) not yet|
91
+
|Pointers|Partially supported|place-based pointers partly work (some pointer casts still produce thunks and fail); **Requires the address model** for integer↔pointer casts|
92
+
|References (`&`)|Supported|references to stack data work; **Requires the address model** for references to constant/static/heap data|
93
+
|Mutable references (`&mut`)|Supported|references to stack data work; **Requires the address model** for references to constant/static/heap data|
94
+
|Never type (`!`)|Not supported||
95
+
|Function pointer types|Partially supported|passing a function or closure as an argument works; calling indirectly through a stored function pointer not yet|
96
+
|Closure types|Supported|`dyn Fn` dispatch: see Trait objects|
|`Mutex`, `RwLock` (from standard library)|Not supported
121
-
|Verified lock implementations|Not supported
122
-
|Atomics|Not supported|
123
-
|`spawn` and `join`|Not supported|
124
-
|Interior mutability|Not supported|
128
+
|Feature|Status|Notes|
129
+
|-------|------|-----|
130
+
|`Mutex`, `RwLock` (from standard library)|Not supported|**Requires heap allocation** and concurrency|
131
+
|Verified lock implementations|Not supported||
132
+
|Atomics|Not supported||
133
+
|`spawn` and `join`|Not supported|no threading model|
134
+
|Interior mutability|Partially supported|`Cell` works; `RefCell` not yet (see Cell/RefCell)|
125
135
126
136
## Unsafe
127
-
|Feature|Status|
128
-
|-------|------|
129
-
|Raw pointers|Not supported|
130
-
|Transmute|Not supported|
131
-
|Unions|Not supported|
132
-
|`UnsafeCell`|Not supported|
137
+
|Feature|Status|Notes|
138
+
|-------|------|-----|
139
+
|Raw pointers|Partially supported|place-based pointers partly work (some pointer casts still produce thunks and fail); **Requires the address model** for integer↔pointer casts|
140
+
|Transmute|Partially supported|byte / wrapper / enum transmutes work; **Requires the address model** for transmutes involving pointer/address values|
141
+
|Unions|Partially supported|reading the field last written works; cross-field type-punning not yet|
142
+
|`UnsafeCell`|Not supported|**Requires the address model**: direct use fails on a pointer-alignment check; `Cell`, built on it, works (see Cell/RefCell)|
143
+
|FFI / `extern` functions|Not supported|external functions have no MIR body to execute|
The statuses above were derived from three sources, cross-checked:
156
+
157
+
1. A full run of the Rust **UI test suite** under the LLVM (concrete) backend (~2888 tests).
158
+
2. The repository's **integration tests**: the curated `prove-rs` suite (each `*-fail.rs` is *expected* to fail), the `decode-value` cases, and `verify-rust-std`.
159
+
3.**Targeted checks**: small programs run directly to probe a specific feature.
160
+
161
+
A feature is only marked **Supported** when it both has a passing test that exercises it *and* no failing
162
+
test has it as the **root cause**. Distinguishing "root cause" from "where execution stops" matters: a test
163
+
often gets stuck far from the real problem (e.g. an arithmetic test that fails only because it prints its
164
+
result). To attribute correctly we **tracked thunks** (when the semantics cannot yet rewrite an evaluation it
165
+
records it as a *thunk*, noting where that thunk was created) and traced each failure back to the thunk that
166
+
caused it. This allows us to say that a feature works while its nominal-category failures are due to *other*
167
+
unsupported features.
168
+
169
+
In the table below, *Passing* gives tests that exercise the feature and succeed (integration tests are under
170
+
`kmir/src/tests/integration/data/`, UI tests under `tests/ui/`). *Failures attributed to* gives, for the
171
+
not-fully-passing rows, representative failing tests in the same area with the **other** feature their failure
172
+
actually traces to. UI directories are nominal groupings, so a directory rarely passes entirely even when the
173
+
named feature works. A few directories do pass entirely, noted as such.
174
+
175
+
| Row | Status | Passing | Failures attributed to |
| Const functions | Supported | run like normal functions; `tests/ui/const-generics/min_const_generics/const_fn_in_generics`, targeted `const fn` checks ||
184
+
| Type aliases | Supported | resolved before MIR; `tests/ui/type-alias-enum-variants/` (both tests pass) ||
185
+
| Const items | Supported | value constants work (targeted `const C: u32` checks; no dedicated UI dir); constants holding references into data (`&str`, `&[T]`) need the address model ||
186
+
| Function pointer types | Partially supported | fn-item/closure-as-argument: `488-support-function-pointer-calls`| calling indirectly through a stored/cast function pointer not yet (the `tests/ui/` indirect-call failures) |
0 commit comments