Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir/src/diagnostics.rs')
| -rw-r--r-- | crates/hir/src/diagnostics.rs | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/crates/hir/src/diagnostics.rs b/crates/hir/src/diagnostics.rs index 253d62dafc..f756832f0f 100644 --- a/crates/hir/src/diagnostics.rs +++ b/crates/hir/src/diagnostics.rs @@ -50,7 +50,9 @@ diagnostics![ PrivateField, ReplaceFilterMapNextWithFindMap, TypeMismatch, + UndeclaredLabel, UnimplementedBuiltinMacro, + UnreachableLabel, UnresolvedExternCrate, UnresolvedField, UnresolvedImport, @@ -62,6 +64,13 @@ diagnostics![ ]; #[derive(Debug)] +pub struct BreakOutsideOfLoop { + pub expr: InFile<AstPtr<ast::Expr>>, + pub is_break: bool, + pub bad_value_break: bool, +} + +#[derive(Debug)] pub struct UnresolvedModule { pub decl: InFile<AstPtr<ast::Module>>, pub candidates: Box<[String]>, @@ -84,6 +93,17 @@ pub struct UnresolvedMacroCall { pub path: ModPath, pub is_bang: bool, } +#[derive(Debug, Clone, Eq, PartialEq)] +pub struct UnreachableLabel { + pub node: InFile<AstPtr<ast::Lifetime>>, + pub name: Name, +} + +#[derive(Debug, Clone, Eq, PartialEq)] +pub struct UndeclaredLabel { + pub node: InFile<AstPtr<ast::Lifetime>>, + pub name: Name, +} #[derive(Debug, Clone, Eq, PartialEq)] pub struct InactiveCode { @@ -167,13 +187,6 @@ pub struct PrivateField { } #[derive(Debug)] -pub struct BreakOutsideOfLoop { - pub expr: InFile<AstPtr<ast::Expr>>, - pub is_break: bool, - pub bad_value_break: bool, -} - -#[derive(Debug)] pub struct MissingUnsafe { pub expr: InFile<AstPtr<ast::Expr>>, } |