1
Fork 0

Rollup merge of #106012 - JakobDegen:retag-raw, r=RalfJung

Clarify that raw retags are not permitted in Mir

Not sure when this changed, but documentation and the validator needed to be updated. This also removes raw retags from custom mir.

cc rust-lang/miri#2735

r? `@RalfJung`
This commit is contained in:
Matthias Krüger 2022-12-22 01:01:15 +01:00 committed by GitHub
commit d0d0ccdca2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 16 additions and 19 deletions

View file

@ -320,8 +320,10 @@ pub enum StatementKind<'tcx> {
/// <https://internals.rust-lang.org/t/stacked-borrows-an-aliasing-model-for-rust/8153/> for
/// more details.
///
/// For code that is not specific to stacked borrows, you should consider retags to read
/// and modify the place in an opaque way.
/// For code that is not specific to stacked borrows, you should consider retags to read and
/// modify the place in an opaque way.
///
/// Only `RetagKind::Default` and `RetagKind::FnEntry` are permitted.
Retag(RetagKind, Box<Place<'tcx>>),
/// Encodes a user's type ascription. These need to be preserved