We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 603ab5b commit f7bf282Copy full SHA for f7bf282
compiler/rustc_middle/src/mir/visit.rs
@@ -1017,11 +1017,13 @@ macro_rules! visit_place_fns {
1017
let mut context = context;
1018
1019
if !place.projection.is_empty() {
1020
- context = if context.is_mutating_use() {
1021
- PlaceContext::MutatingUse(MutatingUseContext::Projection)
1022
- } else {
1023
- PlaceContext::NonMutatingUse(NonMutatingUseContext::Projection)
1024
- };
+ if context.is_use() {
+ context = if context.is_mutating_use() {
+ PlaceContext::MutatingUse(MutatingUseContext::Projection)
+ } else {
+ PlaceContext::NonMutatingUse(NonMutatingUseContext::Projection)
1025
+ };
1026
+ }
1027
}
1028
1029
self.visit_local(&place.local, context, location);
0 commit comments