File tree 1 file changed +2
-7
lines changed
compiler/rustc_codegen_ssa/src/back
1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -332,9 +332,7 @@ fn exported_symbols_provider_local(
332
332
rustc_middle:: ty:: CoroutineClosure ( def_id, _) => * def_id,
333
333
rustc_middle:: ty:: CoroutineWitness ( def_id, _) => * def_id,
334
334
rustc_middle:: ty:: Foreign ( def_id) => * def_id,
335
- _ => {
336
- return false ;
337
- }
335
+ _ => return false ,
338
336
} ;
339
337
let Some ( root_def_id) = root_def_id. as_local ( ) else {
340
338
return false ;
@@ -347,10 +345,7 @@ fn exported_symbols_provider_local(
347
345
let is_instantiable_downstream = |did, type_args| {
348
346
std:: iter:: once ( tcx. type_of ( did) . skip_binder ( ) ) . chain ( type_args) . all ( |arg| {
349
347
arg. walk ( ) . all ( |ty| {
350
- let Some ( ty) = ty. as_type ( ) else {
351
- return true ;
352
- } ;
353
- !is_local_to_current_crate ( ty)
348
+ ty. as_type ( ) . map_or ( true , |ty| !is_local_to_current_crate ( ty) )
354
349
} )
355
350
} )
356
351
} ;
You can’t perform that action at this time.
0 commit comments