From 8a11da40a789e5d73c5c11d69ba87638ddff8676 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Sun, 22 Nov 2020 20:43:00 -0800 Subject: Parse unsafe extern block --- .../syntax/test_data/parser/ok/0068_item_modifiers.rast | 16 ++++++++++++++-- crates/syntax/test_data/parser/ok/0068_item_modifiers.rs | 2 ++ 2 files changed, 16 insertions(+), 2 deletions(-) (limited to 'crates/syntax/test_data/parser/ok') diff --git a/crates/syntax/test_data/parser/ok/0068_item_modifiers.rast b/crates/syntax/test_data/parser/ok/0068_item_modifiers.rast index 50a6d8ee9..87eebf185 100644 --- a/crates/syntax/test_data/parser/ok/0068_item_modifiers.rast +++ b/crates/syntax/test_data/parser/ok/0068_item_modifiers.rast @@ -1,4 +1,4 @@ -SOURCE_FILE@0..304 +SOURCE_FILE@0..328 FN@0..17 ASYNC_KW@0..5 "async" WHITESPACE@5..6 " " @@ -215,4 +215,16 @@ SOURCE_FILE@0..304 ASSOC_ITEM_LIST@301..303 L_CURLY@301..302 "{" R_CURLY@302..303 "}" - WHITESPACE@303..304 "\n" + WHITESPACE@303..305 "\n\n" + EXTERN_BLOCK@305..327 + UNSAFE_KW@305..311 "unsafe" + WHITESPACE@311..312 " " + ABI@312..324 + EXTERN_KW@312..318 "extern" + WHITESPACE@318..319 " " + STRING@319..324 "\"C++\"" + WHITESPACE@324..325 " " + EXTERN_ITEM_LIST@325..327 + L_CURLY@325..326 "{" + R_CURLY@326..327 "}" + WHITESPACE@327..328 "\n" diff --git a/crates/syntax/test_data/parser/ok/0068_item_modifiers.rs b/crates/syntax/test_data/parser/ok/0068_item_modifiers.rs index 8d697c04b..6d27a082c 100644 --- a/crates/syntax/test_data/parser/ok/0068_item_modifiers.rs +++ b/crates/syntax/test_data/parser/ok/0068_item_modifiers.rs @@ -14,3 +14,5 @@ unsafe auto trait T {} unsafe impl Foo {} default impl Foo {} unsafe default impl Foo {} + +unsafe extern "C++" {} -- cgit v1.2.3