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.rs17
1 files changed, 16 insertions, 1 deletions
diff --git a/crates/hir/src/diagnostics.rs b/crates/hir/src/diagnostics.rs
index c5dc60f1ec..54d43fa8dc 100644
--- a/crates/hir/src/diagnostics.rs
+++ b/crates/hir/src/diagnostics.rs
@@ -10,7 +10,7 @@ use hir_def::path::ModPath;
use hir_expand::{name::Name, HirFileId, InFile};
use syntax::{ast, AstPtr, SyntaxNodePtr, TextRange};
-use crate::{MacroKind, Type};
+use crate::{AssocItem, Field, MacroKind, Type};
macro_rules! diagnostics {
($($diag:ident,)*) => {
@@ -41,6 +41,8 @@ diagnostics![
MissingMatchArms,
MissingUnsafe,
NoSuchField,
+ PrivateAssocItem,
+ PrivateField,
ReplaceFilterMapNextWithFindMap,
TypeMismatch,
UnimplementedBuiltinMacro,
@@ -122,6 +124,19 @@ pub struct NoSuchField {
}
#[derive(Debug)]
+pub struct PrivateAssocItem {
+ pub expr_or_pat:
+ InFile<Either<AstPtr<ast::Expr>, Either<AstPtr<ast::Pat>, AstPtr<ast::SelfParam>>>>,
+ pub item: AssocItem,
+}
+
+#[derive(Debug)]
+pub struct PrivateField {
+ pub expr: InFile<AstPtr<ast::Expr>>,
+ pub field: Field,
+}
+
+#[derive(Debug)]
pub struct BreakOutsideOfLoop {
pub expr: InFile<AstPtr<ast::Expr>>,
pub is_break: bool,