aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/test_data
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-02-07 13:21:02 +0000
committerGitHub <[email protected]>2020-02-07 13:21:02 +0000
commit8337dcd9e277feac8e9cff621c752a3e86ba19e6 (patch)
treef9658afc43f76b864a7a6e49b6349d12283632c8 /crates/ra_syntax/test_data
parent6d6a995e09c74a8b1075842fb3cd7232354389ae (diff)
parent73ec2ab184f6d8828ebcdca418a7ae83bb60b0bc (diff)
Merge #3047
3047: Update async unsafe fn ordering in parser r=matklad a=kiljacken As of rust-lang/rust#61319 the correct order for functions that are both unsafe and async is: `async unsafe fn` and not `unsafe async fn`. This commit updates the parser tests to reflect this, and corrects parsing behavior to accept the correct ordering. Fixes #3025 Co-authored-by: Emil Lauridsen <[email protected]>
Diffstat (limited to 'crates/ra_syntax/test_data')
-rw-r--r--crates/ra_syntax/test_data/parser/inline/err/0010_wrong_order_fns.rs2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/err/0010_wrong_order_fns.txt12
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0128_combined_fns.rs2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0128_combined_fns.txt6
4 files changed, 11 insertions, 11 deletions
diff --git a/crates/ra_syntax/test_data/parser/inline/err/0010_wrong_order_fns.rs b/crates/ra_syntax/test_data/parser/inline/err/0010_wrong_order_fns.rs
index 16edee95d..731e58013 100644
--- a/crates/ra_syntax/test_data/parser/inline/err/0010_wrong_order_fns.rs
+++ b/crates/ra_syntax/test_data/parser/inline/err/0010_wrong_order_fns.rs
@@ -1,2 +1,2 @@
1async unsafe fn foo() {} 1unsafe async fn foo() {}
2unsafe const fn bar() {} 2unsafe const fn bar() {}
diff --git a/crates/ra_syntax/test_data/parser/inline/err/0010_wrong_order_fns.txt b/crates/ra_syntax/test_data/parser/inline/err/0010_wrong_order_fns.txt
index 2ea6a566d..289193b9e 100644
--- a/crates/ra_syntax/test_data/parser/inline/err/0010_wrong_order_fns.txt
+++ b/crates/ra_syntax/test_data/parser/inline/err/0010_wrong_order_fns.txt
@@ -1,9 +1,9 @@
1SOURCE_FILE@[0; 50) 1SOURCE_FILE@[0; 50)
2 ERROR@[0; 5) 2 ERROR@[0; 6)
3 ASYNC_KW@[0; 5) "async" 3 UNSAFE_KW@[0; 6) "unsafe"
4 WHITESPACE@[5; 6) " " 4 WHITESPACE@[6; 7) " "
5 FN_DEF@[6; 24) 5 FN_DEF@[7; 24)
6 UNSAFE_KW@[6; 12) "unsafe" 6 ASYNC_KW@[7; 12) "async"
7 WHITESPACE@[12; 13) " " 7 WHITESPACE@[12; 13) " "
8 FN_KW@[13; 15) "fn" 8 FN_KW@[13; 15) "fn"
9 WHITESPACE@[15; 16) " " 9 WHITESPACE@[15; 16) " "
@@ -37,5 +37,5 @@ SOURCE_FILE@[0; 50)
37 L_CURLY@[47; 48) "{" 37 L_CURLY@[47; 48) "{"
38 R_CURLY@[48; 49) "}" 38 R_CURLY@[48; 49) "}"
39 WHITESPACE@[49; 50) "\n" 39 WHITESPACE@[49; 50) "\n"
40error 5: expected existential, fn, trait or impl 40error 6: expected existential, fn, trait or impl
41error 31: expected existential, fn, trait or impl 41error 31: expected existential, fn, trait or impl
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0128_combined_fns.rs b/crates/ra_syntax/test_data/parser/inline/ok/0128_combined_fns.rs
index 46af91b82..126287145 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0128_combined_fns.rs
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0128_combined_fns.rs
@@ -1,2 +1,2 @@
1unsafe async fn foo() {} 1async unsafe fn foo() {}
2const unsafe fn bar() {} 2const unsafe fn bar() {}
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0128_combined_fns.txt b/crates/ra_syntax/test_data/parser/inline/ok/0128_combined_fns.txt
index cae75c41d..8a972cdb2 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0128_combined_fns.txt
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0128_combined_fns.txt
@@ -1,8 +1,8 @@
1SOURCE_FILE@[0; 50) 1SOURCE_FILE@[0; 50)
2 FN_DEF@[0; 24) 2 FN_DEF@[0; 24)
3 UNSAFE_KW@[0; 6) "unsafe" 3 ASYNC_KW@[0; 5) "async"
4 WHITESPACE@[6; 7) " " 4 WHITESPACE@[5; 6) " "
5 ASYNC_KW@[7; 12) "async" 5 UNSAFE_KW@[6; 12) "unsafe"
6 WHITESPACE@[12; 13) " " 6 WHITESPACE@[12; 13) " "
7 FN_KW@[13; 15) "fn" 7 FN_KW@[13; 15) "fn"
8 WHITESPACE@[15; 16) " " 8 WHITESPACE@[15; 16) " "