diff options
| author | bors <bors@rust-lang.org> | 2018-11-02 12:45:03 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-11-02 12:45:03 +0000 |
| commit | 87a3c1ee7016bbfb782f2fd8adc75b46687ef929 (patch) | |
| tree | d1f5ce96602af0244456e01139806980d7730c8b /src/librustc_codegen_llvm | |
| parent | d0c869c323289c5ec4df83e1c9091fa0b3e2fc07 (diff) | |
| parent | d10304eeb5c9e63597b9ee1094aca0f63c4f31ca (diff) | |
| download | rust-87a3c1ee7016bbfb782f2fd8adc75b46687ef929.tar.gz rust-87a3c1ee7016bbfb782f2fd8adc75b46687ef929.zip | |
Auto merge of #55316 - RalfJung:retagging, r=oli-obk
Add Retagging statements This adds a `Retag` statement kind to MIR, used to perform the retagging operation from [Stacked Borrows](https://www.ralfj.de/blog/2018/08/07/stacked-borrows.html). It also kills the old `Validate` statements that I added last year. NOTE: This includes https://github.com/rust-lang/rust/pull/55270. Only [these commits are new](https://github.com/RalfJung/rust/compare/stacked-borrows-ng...RalfJung:retagging).
Diffstat (limited to 'src/librustc_codegen_llvm')
| -rw-r--r-- | src/librustc_codegen_llvm/mir/analyze.rs | 3 | ||||
| -rw-r--r-- | src/librustc_codegen_llvm/mir/statement.rs | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/librustc_codegen_llvm/mir/analyze.rs b/src/librustc_codegen_llvm/mir/analyze.rs index a63cbe70df6..a93c6faaf7b 100644 --- a/src/librustc_codegen_llvm/mir/analyze.rs +++ b/src/librustc_codegen_llvm/mir/analyze.rs @@ -219,7 +219,8 @@ impl Visitor<'tcx> for LocalAnalyzer<'mir, 'a, 'll, 'tcx> { self.assign(local, location); } - PlaceContext::NonUse(_) => {} + PlaceContext::NonUse(_) | + PlaceContext::MutatingUse(MutatingUseContext::Retag) => {} PlaceContext::NonMutatingUse(NonMutatingUseContext::Copy) | PlaceContext::NonMutatingUse(NonMutatingUseContext::Move) => { diff --git a/src/librustc_codegen_llvm/mir/statement.rs b/src/librustc_codegen_llvm/mir/statement.rs index 93be0074f6e..cc4e64e0788 100644 --- a/src/librustc_codegen_llvm/mir/statement.rs +++ b/src/librustc_codegen_llvm/mir/statement.rs @@ -109,7 +109,7 @@ impl FunctionCx<'a, 'll, 'tcx> { } mir::StatementKind::FakeRead(..) | mir::StatementKind::EndRegion(_) | - mir::StatementKind::Validate(..) | + mir::StatementKind::Retag { .. } | mir::StatementKind::AscribeUserType(..) | mir::StatementKind::Nop => bx, } |
