@@ -88,9 +88,10 @@ pub use crate::{
8888 AnyDiagnostic , BreakOutsideOfLoop , ExpectedFunction , InactiveCode , IncoherentImpl ,
8989 IncorrectCase , InvalidDeriveTarget , MacroError , MalformedDerive , MismatchedArgCount ,
9090 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 ,
9495 } ,
9596 has_source:: HasSource ,
9697 semantics:: { PathResolution , Semantics , SemanticsScope , TypeInfo , VisibleTraits } ,
@@ -1393,6 +1394,12 @@ impl DefWithBody {
13931394 }
13941395 . into ( ) ,
13951396 ) ,
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+ }
13961403 }
13971404 }
13981405
@@ -1405,14 +1412,6 @@ impl DefWithBody {
14051412 let field = source_map. field_syntax ( expr) ;
14061413 acc. push ( NoSuchField { field } . into ( ) )
14071414 }
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- }
14161415 & hir_ty:: InferenceDiagnostic :: MismatchedArgCount { call_expr, expected, found } => {
14171416 acc. push (
14181417 MismatchedArgCount { call_expr : expr_syntax ( call_expr) , expected, found }
@@ -1484,6 +1483,14 @@ impl DefWithBody {
14841483 . into ( ) ,
14851484 )
14861485 }
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+ }
14871494 }
14881495 }
14891496 for ( pat_or_expr, mismatch) in infer. type_mismatches ( ) {
0 commit comments