@@ -85,12 +85,13 @@ use crate::db::{DefDatabase, HirDatabase};
8585pub use crate :: {
8686 attrs:: { HasAttrs , Namespace } ,
8787 diagnostics:: {
88- AnyDiagnostic , BreakOutsideOfLoop , ExpectedFunction , InactiveCode , IncoherentImpl ,
89- IncorrectCase , InvalidDeriveTarget , MacroError , MalformedDerive , MismatchedArgCount ,
90- MissingFields , MissingMatchArms , MissingUnsafe , NeedMut , NoSuchField , PrivateAssocItem ,
91- PrivateField , ReplaceFilterMapNextWithFindMap , TypeMismatch , UnimplementedBuiltinMacro ,
92- UnresolvedExternCrate , UnresolvedField , UnresolvedImport , UnresolvedMacroCall ,
93- UnresolvedMethodCall , UnresolvedModule , UnresolvedProcMacro , UnusedMut ,
88+ AnyDiagnostic , ExpectedFunction , InactiveCode , IncoherentImpl , IncorrectCase ,
89+ InvalidDeriveTarget , MacroError , MalformedDerive , MismatchedArgCount , MissingFields ,
90+ MissingMatchArms , MissingUnsafe , NeedMut , NoSuchField , PrivateAssocItem , PrivateField ,
91+ ReplaceFilterMapNextWithFindMap , TypeMismatch , UndeclaredLabel , UnimplementedBuiltinMacro ,
92+ UnreachableLabel , UnresolvedExternCrate , UnresolvedField , UnresolvedImport ,
93+ UnresolvedMacroCall , UnresolvedMethodCall , UnresolvedModule , UnresolvedProcMacro ,
94+ 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 }
0 commit comments