File tree Expand file tree Collapse file tree 4 files changed +42
-2
lines changed
kotlin/org/rust/lang/core/parser
test/resources/org/rust/lang/core/parser/fixtures/complete Expand file tree Collapse file tree 4 files changed +42
-2
lines changed Original file line number Diff line number Diff line change @@ -708,7 +708,7 @@ upper ModDeclItem ::= unsafe? mod identifier ';' {
708708 elementTypeFactory = "org.rust.lang.core.stubs.StubImplementationsKt.factory"
709709}
710710
711- upper ForeignModItem ::= ExternAbi ForeignModBody {
711+ upper ForeignModItem ::= unsafe? ExternAbi ForeignModBody {
712712 name = ""
713713 implements = [ "org.rust.lang.core.psi.ext.RsItemElement"
714714 "org.rust.lang.core.psi.ext.RsInnerAttributeOwner" ]
Original file line number Diff line number Diff line change @@ -104,6 +104,6 @@ class RustParserDefinition : ParserDefinition {
104104 /* *
105105 * Should be increased after any change of parser rules
106106 */
107- const val PARSER_VERSION : Int = LEXER_VERSION + 30
107+ const val PARSER_VERSION : Int = LEXER_VERSION + 31
108108 }
109109}
Original file line number Diff line number Diff line change @@ -16,3 +16,6 @@ extern "C" {}
1616extern "R\u{0075} st" { }
1717extern r"system" { }
1818extern 'C' { } // semantically invalid
19+ pub extern { } // semantically invalid
20+ unsafe extern { } // semantically invalid
21+ pub unsafe extern { } // semantically invalid
Original file line number Diff line number Diff line change @@ -193,4 +193,41 @@ FILE
193193 PsiElement({)('{')
194194 PsiElement(})('}')
195195 PsiWhiteSpace(' ')
196+ RsForeignModItemImpl(FOREIGN_MOD_ITEM)
197+ PsiComment(<EOL_COMMENT>)('// semantically invalid')
198+ PsiWhiteSpace('\n')
199+ RsVisImpl(VIS)
200+ PsiElement(pub)('pub')
201+ PsiWhiteSpace(' ')
202+ RsExternAbiImpl(EXTERN_ABI)
203+ PsiElement(extern)('extern')
204+ PsiWhiteSpace(' ')
205+ PsiElement({)('{')
206+ PsiElement(})('}')
207+ PsiWhiteSpace(' ')
208+ RsForeignModItemImpl(FOREIGN_MOD_ITEM)
209+ PsiComment(<EOL_COMMENT>)('// semantically invalid')
210+ PsiWhiteSpace('\n')
211+ PsiElement(unsafe)('unsafe')
212+ PsiWhiteSpace(' ')
213+ RsExternAbiImpl(EXTERN_ABI)
214+ PsiElement(extern)('extern')
215+ PsiWhiteSpace(' ')
216+ PsiElement({)('{')
217+ PsiElement(})('}')
218+ PsiWhiteSpace(' ')
219+ RsForeignModItemImpl(FOREIGN_MOD_ITEM)
220+ PsiComment(<EOL_COMMENT>)('// semantically invalid')
221+ PsiWhiteSpace('\n')
222+ RsVisImpl(VIS)
223+ PsiElement(pub)('pub')
224+ PsiWhiteSpace(' ')
225+ PsiElement(unsafe)('unsafe')
226+ PsiWhiteSpace(' ')
227+ RsExternAbiImpl(EXTERN_ABI)
228+ PsiElement(extern)('extern')
229+ PsiWhiteSpace(' ')
230+ PsiElement({)('{')
231+ PsiElement(})('}')
232+ PsiWhiteSpace(' ')
196233 PsiComment(<EOL_COMMENT>)('// semantically invalid')
You can’t perform that action at this time.
0 commit comments