@@ -88,9 +88,10 @@ pub use crate::{
88
88
AnyDiagnostic , BreakOutsideOfLoop , ExpectedFunction , InactiveCode , IncoherentImpl ,
89
89
IncorrectCase , InvalidDeriveTarget , MacroError , MalformedDerive , MismatchedArgCount ,
90
90
MissingFields , MissingMatchArms , MissingUnsafe , NeedMut , NoSuchField , PrivateAssocItem ,
91
- PrivateField , ReplaceFilterMapNextWithFindMap , TypeMismatch , UnimplementedBuiltinMacro ,
92
- UnresolvedExternCrate , UnresolvedField , UnresolvedImport , UnresolvedMacroCall ,
93
- UnresolvedMethodCall , UnresolvedModule , UnresolvedProcMacro , UnusedMut ,
91
+ PrivateField , ReplaceFilterMapNextWithFindMap , TypeMismatch , UndeclaredLabel ,
92
+ UnimplementedBuiltinMacro , UnreachableLabel , UnresolvedExternCrate , UnresolvedField ,
93
+ UnresolvedImport , UnresolvedMacroCall , UnresolvedMethodCall , UnresolvedModule ,
94
+ UnresolvedProcMacro , UnusedMut ,
94
95
} ,
95
96
has_source:: HasSource ,
96
97
semantics:: { PathResolution , Semantics , SemanticsScope , TypeInfo , VisibleTraits } ,
@@ -1393,6 +1394,12 @@ impl DefWithBody {
1393
1394
}
1394
1395
. into ( ) ,
1395
1396
) ,
1397
+ BodyDiagnostic :: UnreachableLabel { node, name } => {
1398
+ acc. push ( UnreachableLabel { node : node. clone ( ) , name : name. clone ( ) } . into ( ) )
1399
+ }
1400
+ BodyDiagnostic :: UndeclaredLabel { node, name } => {
1401
+ acc. push ( UndeclaredLabel { node : node. clone ( ) , name : name. clone ( ) } . into ( ) )
1402
+ }
1396
1403
}
1397
1404
}
1398
1405
@@ -1405,14 +1412,6 @@ impl DefWithBody {
1405
1412
let field = source_map. field_syntax ( expr) ;
1406
1413
acc. push ( NoSuchField { field } . into ( ) )
1407
1414
}
1408
- & hir_ty:: InferenceDiagnostic :: BreakOutsideOfLoop {
1409
- expr,
1410
- is_break,
1411
- bad_value_break,
1412
- } => {
1413
- let expr = expr_syntax ( expr) ;
1414
- acc. push ( BreakOutsideOfLoop { expr, is_break, bad_value_break } . into ( ) )
1415
- }
1416
1415
& hir_ty:: InferenceDiagnostic :: MismatchedArgCount { call_expr, expected, found } => {
1417
1416
acc. push (
1418
1417
MismatchedArgCount { call_expr : expr_syntax ( call_expr) , expected, found }
@@ -1484,6 +1483,14 @@ impl DefWithBody {
1484
1483
. into ( ) ,
1485
1484
)
1486
1485
}
1486
+ & hir_ty:: InferenceDiagnostic :: BreakOutsideOfLoop {
1487
+ expr,
1488
+ is_break,
1489
+ bad_value_break,
1490
+ } => {
1491
+ let expr = expr_syntax ( expr) ;
1492
+ acc. push ( BreakOutsideOfLoop { expr, is_break, bad_value_break } . into ( ) )
1493
+ }
1487
1494
}
1488
1495
}
1489
1496
for ( pat_or_expr, mismatch) in infer. type_mismatches ( ) {
0 commit comments