File tree 3 files changed +7
-6
lines changed
3 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -168,7 +168,6 @@ new_ret_no_self = "allow"
168
168
useless_asref = " allow"
169
169
170
170
# # Following lints should be tackled at some point
171
- borrowed_box = " allow"
172
171
too_many_arguments = " allow"
173
172
type_complexity = " allow"
174
173
wrong_self_convention = " allow"
Original file line number Diff line number Diff line change @@ -264,7 +264,7 @@ impl GenericParamsCollector {
264
264
self . add_where_predicate_from_bound (
265
265
lower_ctx,
266
266
bound,
267
- lifetimes. as_ref ( ) ,
267
+ lifetimes. as_deref ( ) ,
268
268
target. clone ( ) ,
269
269
) ;
270
270
}
@@ -275,14 +275,14 @@ impl GenericParamsCollector {
275
275
& mut self ,
276
276
lower_ctx : & LowerCtx < ' _ > ,
277
277
bound : ast:: TypeBound ,
278
- hrtb_lifetimes : Option < & Box < [ Name ] > > ,
278
+ hrtb_lifetimes : Option < & [ Name ] > ,
279
279
target : Either < TypeRef , LifetimeRef > ,
280
280
) {
281
281
let bound = TypeBound :: from_ast ( lower_ctx, bound) ;
282
282
let predicate = match ( target, bound) {
283
283
( Either :: Left ( type_ref) , bound) => match hrtb_lifetimes {
284
284
Some ( hrtb_lifetimes) => WherePredicate :: ForLifetime {
285
- lifetimes : hrtb_lifetimes. clone ( ) ,
285
+ lifetimes : hrtb_lifetimes. to_vec ( ) . into_boxed_slice ( ) ,
286
286
target : WherePredicateTypeTarget :: TypeRef ( Interned :: new ( type_ref) ) ,
287
287
bound : Interned :: new ( bound) ,
288
288
} ,
Original file line number Diff line number Diff line change @@ -228,7 +228,7 @@ impl MemoryMap {
228
228
& self ,
229
229
mut f : impl FnMut ( & [ u8 ] , usize ) -> Result < usize , MirEvalError > ,
230
230
) -> Result < FxHashMap < usize , usize > , MirEvalError > {
231
- let mut transform = |( addr, val) : ( & usize , & Box < [ u8 ] > ) | {
231
+ let mut transform = |( addr, val) : ( & usize , & [ u8 ] ) | {
232
232
let addr = * addr;
233
233
let align = if addr == 0 { 64 } else { ( addr - ( addr & ( addr - 1 ) ) ) . min ( 64 ) } ;
234
234
f ( val, align) . map ( |it| ( addr, it) )
@@ -240,7 +240,9 @@ impl MemoryMap {
240
240
map. insert ( addr, val) ;
241
241
map
242
242
} ) ,
243
- MemoryMap :: Complex ( cm) => cm. memory . iter ( ) . map ( transform) . collect ( ) ,
243
+ MemoryMap :: Complex ( cm) => {
244
+ cm. memory . iter ( ) . map ( |( addr, val) | transform ( ( addr, val) ) ) . collect ( )
245
+ }
244
246
}
245
247
}
246
248
You can’t perform that action at this time.
0 commit comments