diff options
| author | bors <bors@rust-lang.org> | 2024-08-16 15:48:55 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-08-16 15:48:55 +0000 |
| commit | 1a51dd9247c5ecf9efa99ebf644bb12e33dcf3b5 (patch) | |
| tree | 45b98300bf22532abcb9bed6b5b47b83b6aa56c2 /compiler/rustc_codegen_llvm/src | |
| parent | 86783bef33457473c5e96c8a89d71e11a7d1a5ba (diff) | |
| parent | 2c166f4f55f4b3062f907e8a72cff56a98978e58 (diff) | |
| download | rust-1a51dd9247c5ecf9efa99ebf644bb12e33dcf3b5.tar.gz rust-1a51dd9247c5ecf9efa99ebf644bb12e33dcf3b5.zip | |
Auto merge of #3754 - Vanille-N:master, r=RalfJung
Make unused states of Reserved unrepresentable
In the [previous TB update](https://github.com/rust-lang/miri/pull/3742) we discovered that the existence of `Reserved + !ty_is_freeze + protected` is undesirable.
This has the side effect of making `Reserved { conflicted: true, ty_is_freeze: false }` unreachable.
As such it is desirable that this state would also be unrepresentable.
This PR eliminates the unused configuration by changing
```rs
enum PermissionPriv {
Reserved { ty_is_freeze: bool, conflicted: bool },
...
}
```
into
```rs
enum PermissionPriv {
ReservedFrz { conflicted: bool },
ReservedIM,
...
}
```
but this is not the only solution and `Reserved(Activable | Conflicted | InteriorMut)` could be discussed.
In addition to making the unreachable state not representable anymore, this change has the nice side effect of enabling `foreign_read` to no longer depend explicitly on the `protected` flag.
Currently waiting for
- `@JoJoDeveloping` to confirm that this is the same representation of `Reserved` as what is being implemented in simuliris,
- `@RalfJung` to approve that this does not introduce too much overhead in the trusted codebase.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions
