File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ pub enum DiagnosticKind {
6565 UnknownField ,
6666 FieldNotOnNodeType ,
6767 InvalidFieldChildType ,
68+ InvalidChildType ,
6869
6970 // Often consequences of earlier errors
7071 UnnamedDefNotLast ,
@@ -168,6 +169,7 @@ impl DiagnosticKind {
168169 Self :: UnknownField => "unknown field" ,
169170 Self :: FieldNotOnNodeType => "field not valid on this node type" ,
170171 Self :: InvalidFieldChildType => "node type not valid for this field" ,
172+ Self :: InvalidChildType => "node type not valid as child" ,
171173
172174 // Structural
173175 Self :: UnnamedDefNotLast => "only the last definition can be unnamed" ,
@@ -194,6 +196,7 @@ impl DiagnosticKind {
194196 Self :: UnknownField => "`{}` is not a valid field" . to_string ( ) ,
195197 Self :: FieldNotOnNodeType => "field `{}` is not valid on this node type" . to_string ( ) ,
196198 Self :: InvalidFieldChildType => "node type `{}` is not valid for this field" . to_string ( ) ,
199+ Self :: InvalidChildType => "`{}` cannot be a child of this node" . to_string ( ) ,
197200
198201 // Recursion with cycle path
199202 Self :: RecursionNoEscape => "infinite recursion: {}" . to_string ( ) ,
You can’t perform that action at this time.
0 commit comments