This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Expand file tree Collapse file tree 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"
168168useless_asref = " allow"
169169
170170# # Following lints should be tackled at some point
171- borrowed_box = " allow"
172171too_many_arguments = " allow"
173172type_complexity = " allow"
174173wrong_self_convention = " allow"
Original file line number Diff line number Diff line change @@ -264,7 +264,7 @@ impl GenericParamsCollector {
264264 self . add_where_predicate_from_bound (
265265 lower_ctx,
266266 bound,
267- lifetimes. as_ref ( ) ,
267+ lifetimes. as_deref ( ) ,
268268 target. clone ( ) ,
269269 ) ;
270270 }
@@ -275,14 +275,14 @@ impl GenericParamsCollector {
275275 & mut self ,
276276 lower_ctx : & LowerCtx < ' _ > ,
277277 bound : ast:: TypeBound ,
278- hrtb_lifetimes : Option < & Box < [ Name ] > > ,
278+ hrtb_lifetimes : Option < & [ Name ] > ,
279279 target : Either < TypeRef , LifetimeRef > ,
280280 ) {
281281 let bound = TypeBound :: from_ast ( lower_ctx, bound) ;
282282 let predicate = match ( target, bound) {
283283 ( Either :: Left ( type_ref) , bound) => match hrtb_lifetimes {
284284 Some ( hrtb_lifetimes) => WherePredicate :: ForLifetime {
285- lifetimes : hrtb_lifetimes. clone ( ) ,
285+ lifetimes : hrtb_lifetimes. to_vec ( ) . into_boxed_slice ( ) ,
286286 target : WherePredicateTypeTarget :: TypeRef ( Interned :: new ( type_ref) ) ,
287287 bound : Interned :: new ( bound) ,
288288 } ,
Original file line number Diff line number Diff line change @@ -228,7 +228,7 @@ impl MemoryMap {
228228 & self ,
229229 mut f : impl FnMut ( & [ u8 ] , usize ) -> Result < usize , MirEvalError > ,
230230 ) -> Result < FxHashMap < usize , usize > , MirEvalError > {
231- let mut transform = |( addr, val) : ( & usize , & Box < [ u8 ] > ) | {
231+ let mut transform = |( addr, val) : ( & usize , & [ u8 ] ) | {
232232 let addr = * addr;
233233 let align = if addr == 0 { 64 } else { ( addr - ( addr & ( addr - 1 ) ) ) . min ( 64 ) } ;
234234 f ( val, align) . map ( |it| ( addr, it) )
@@ -240,7 +240,9 @@ impl MemoryMap {
240240 map. insert ( addr, val) ;
241241 map
242242 } ) ,
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+ }
244246 }
245247 }
246248
You can’t perform that action at this time.
0 commit comments