File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
compiler/rustc_hir_analysis/src/check Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -425,15 +425,11 @@ fn extract_spans_for_error_reporting<'tcx>(
425425 ( sig. decl . inputs . iter ( ) . map ( |t| t. span ) . chain ( iter:: once ( sig. decl . output . span ( ) ) ) , ident)
426426 } ;
427427
428- let declaration_args = declaration. as_local ( ) . and_then ( |def_id| {
428+ let declaration_args = declaration. as_local ( ) . map ( |def_id| {
429429 if let Some ( sig) = get_declaration_sig ( tcx, def_id) {
430- Some ( sig. decl . inputs . iter ( ) . map ( |t| t. span ) . chain ( iter:: once ( sig. decl . output . span ( ) ) ) )
430+ sig. decl . inputs . iter ( ) . map ( |t| t. span ) . chain ( iter:: once ( sig. decl . output . span ( ) ) )
431431 } else {
432- tcx. dcx ( ) . span_delayed_bug (
433- tcx. def_span ( def_id) ,
434- format ! ( "expected {def_id:?} to be a foreign function" ) ,
435- ) ;
436- None
432+ panic ! ( "expected {def_id:?} to be a foreign function" ) ;
437433 }
438434 } ) ;
439435
You can’t perform that action at this time.
0 commit comments