@@ -34,7 +34,7 @@ pub trait Qualif {
34
34
35
35
fn in_projection_structurally (
36
36
cx : & ConstCx < ' _ , ' tcx > ,
37
- per_local : & impl Fn ( Local ) -> bool ,
37
+ per_local : & mut impl FnMut ( Local ) -> bool ,
38
38
place : PlaceRef < ' _ , ' tcx > ,
39
39
) -> bool {
40
40
if let [ proj_base @ .., elem] = place. projection {
@@ -66,15 +66,15 @@ pub trait Qualif {
66
66
67
67
fn in_projection (
68
68
cx : & ConstCx < ' _ , ' tcx > ,
69
- per_local : & impl Fn ( Local ) -> bool ,
69
+ per_local : & mut impl FnMut ( Local ) -> bool ,
70
70
place : PlaceRef < ' _ , ' tcx > ,
71
71
) -> bool {
72
72
Self :: in_projection_structurally ( cx, per_local, place)
73
73
}
74
74
75
75
fn in_place (
76
76
cx : & ConstCx < ' _ , ' tcx > ,
77
- per_local : & impl Fn ( Local ) -> bool ,
77
+ per_local : & mut impl FnMut ( Local ) -> bool ,
78
78
place : PlaceRef < ' _ , ' tcx > ,
79
79
) -> bool {
80
80
match place {
@@ -85,7 +85,7 @@ pub trait Qualif {
85
85
86
86
fn in_operand (
87
87
cx : & ConstCx < ' _ , ' tcx > ,
88
- per_local : & impl Fn ( Local ) -> bool ,
88
+ per_local : & mut impl FnMut ( Local ) -> bool ,
89
89
operand : & Operand < ' tcx > ,
90
90
) -> bool {
91
91
match * operand {
@@ -126,7 +126,7 @@ pub trait Qualif {
126
126
127
127
fn in_rvalue_structurally (
128
128
cx : & ConstCx < ' _ , ' tcx > ,
129
- per_local : & impl Fn ( Local ) -> bool ,
129
+ per_local : & mut impl FnMut ( Local ) -> bool ,
130
130
rvalue : & Rvalue < ' tcx > ,
131
131
) -> bool {
132
132
match * rvalue {
@@ -170,15 +170,15 @@ pub trait Qualif {
170
170
171
171
fn in_rvalue (
172
172
cx : & ConstCx < ' _ , ' tcx > ,
173
- per_local : & impl Fn ( Local ) -> bool ,
173
+ per_local : & mut impl FnMut ( Local ) -> bool ,
174
174
rvalue : & Rvalue < ' tcx > ,
175
175
) -> bool {
176
176
Self :: in_rvalue_structurally ( cx, per_local, rvalue)
177
177
}
178
178
179
179
fn in_call (
180
180
cx : & ConstCx < ' _ , ' tcx > ,
181
- _per_local : & impl Fn ( Local ) -> bool ,
181
+ _per_local : & mut impl FnMut ( Local ) -> bool ,
182
182
_callee : & Operand < ' tcx > ,
183
183
_args : & [ Operand < ' tcx > ] ,
184
184
return_ty : Ty < ' tcx > ,
@@ -208,7 +208,7 @@ impl Qualif for HasMutInterior {
208
208
209
209
fn in_rvalue (
210
210
cx : & ConstCx < ' _ , ' tcx > ,
211
- per_local : & impl Fn ( Local ) -> bool ,
211
+ per_local : & mut impl FnMut ( Local ) -> bool ,
212
212
rvalue : & Rvalue < ' tcx > ,
213
213
) -> bool {
214
214
match * rvalue {
@@ -249,7 +249,7 @@ impl Qualif for NeedsDrop {
249
249
250
250
fn in_rvalue (
251
251
cx : & ConstCx < ' _ , ' tcx > ,
252
- per_local : & impl Fn ( Local ) -> bool ,
252
+ per_local : & mut impl FnMut ( Local ) -> bool ,
253
253
rvalue : & Rvalue < ' tcx > ,
254
254
) -> bool {
255
255
if let Rvalue :: Aggregate ( ref kind, _) = * rvalue {
0 commit comments