diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-05-04 19:18:19 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-05-04 19:18:19 +0200 |
| commit | 0ac8ebdf11f7b288f3c62c12f97c57dd16f07808 (patch) | |
| tree | a3d41c2a8b44ba4049abde2acd0b96edeb864a2d /compiler/rustc_mir_transform/src | |
| parent | bf72b64b96a70b04d1a20096138856f525aaa7cf (diff) | |
| parent | 4ec76df4a9edc6c7a3a69a82bd3eab3881b70ffa (diff) | |
| download | rust-0ac8ebdf11f7b288f3c62c12f97c57dd16f07808.tar.gz rust-0ac8ebdf11f7b288f3c62c12f97c57dd16f07808.zip | |
Rollup merge of #110826 - cjgillot:place-mention-use, r=JakobDegen,lcnr
Make PlaceMention a non-mutating use. Fixes https://github.com/rust-lang/rust/issues/110781 r? `@JakobDegen` I don't agree with your statement in https://github.com/rust-lang/rust/issues/110781#issuecomment-1520841434. I suggest that we start fixing `PlaceContext` to be accurate enough for optimizations to use it. This structure is very convenient to use in visitors, and we perhaps have an opportunity to make it less of a footgun.
Diffstat (limited to 'compiler/rustc_mir_transform/src')
| -rw-r--r-- | compiler/rustc_mir_transform/src/const_prop.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_mir_transform/src/const_prop.rs b/compiler/rustc_mir_transform/src/const_prop.rs index deec66bbaf3..b3a3a25ebe8 100644 --- a/compiler/rustc_mir_transform/src/const_prop.rs +++ b/compiler/rustc_mir_transform/src/const_prop.rs @@ -752,6 +752,7 @@ impl Visitor<'_> for CanConstProp { | NonMutatingUse(NonMutatingUseContext::Move) | NonMutatingUse(NonMutatingUseContext::Inspect) | NonMutatingUse(NonMutatingUseContext::Projection) + | NonMutatingUse(NonMutatingUseContext::PlaceMention) | NonUse(_) => {} // These could be propagated with a smarter analysis or just some careful thinking about |
