@@ -96,19 +96,19 @@ impl<'a, 'gcx, 'tcx> MirBorrowckCtxt<'a, 'gcx, 'tcx> {
96
96
. map ( |stmt| & stmt. kind )
97
97
{
98
98
let local_decl = & self . mir . local_decls [ * local] ;
99
+ // opt_match_place is the
100
+ // match_span is the span of the expression being matched on
101
+ // match *x.y { ... } match_place is Some(*x.y)
102
+ // ^^^^ match_span is the span of *x.y
103
+ //
104
+ // opt_match_place is None for let [mut] x = ... statements,
105
+ // whether or not the right-hand side is a place expression
99
106
if let Some ( ClearCrossCrate :: Set ( BindingForm :: Var ( VarBindingForm {
100
107
opt_match_place : Some ( ( ref opt_match_place, match_span) ) ,
101
108
binding_mode : _,
102
109
opt_ty_info : _,
103
110
} ) ) ) = local_decl. is_user_variable
104
111
{
105
- // opt_match_place is the
106
- // match_span is the span of the expression being matched on
107
- // match *x.y { ... } match_place is Some(*x.y)
108
- // ^^^^ match_span is the span of *x.y
109
- // opt_match_place is None for let [mut] x = ... statements,
110
- // whether or not the right-hand side is a place expression
111
-
112
112
// HACK use scopes to determine if this assignment is
113
113
// the initialization of a variable.
114
114
// FIXME(matthewjasper) This would probably be more
@@ -127,8 +127,8 @@ impl<'a, 'gcx, 'tcx> MirBorrowckCtxt<'a, 'gcx, 'tcx> {
127
127
opt_match_place,
128
128
match_span,
129
129
) ;
130
+ return ;
130
131
}
131
- return ;
132
132
}
133
133
}
134
134
grouped_errors. push ( GroupedMoveError :: OtherIllegalMove {
0 commit comments