aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/tests
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2019-01-22 17:56:00 +0000
committerbors[bot] <bors[bot]@users.noreply.github.com>2019-01-22 17:56:00 +0000
commitb9f65b18b85c6e942979cb7e6026ba157488f193 (patch)
tree2f994b6fdfe67d839447a239094a49c25dbb4f8d /crates/ra_syntax/tests
parent595a2f9900d052d0c5cc3529602aec0cbcd52614 (diff)
parentc550c6759d2c684b5ebef141cebd602e90ee931a (diff)
Merge #599
599: Allow placeholder parameters in trait function definitions r=matklad a=regiontog fixes #597 Co-authored-by: Erlend Tobiassen <[email protected]>
Diffstat (limited to 'crates/ra_syntax/tests')
-rw-r--r--crates/ra_syntax/tests/data/parser/inline/ok/0116_trait_fn_placeholder_parameter.rs3
-rw-r--r--crates/ra_syntax/tests/data/parser/inline/ok/0116_trait_fn_placeholder_parameter.txt32
2 files changed, 35 insertions, 0 deletions
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0116_trait_fn_placeholder_parameter.rs b/crates/ra_syntax/tests/data/parser/inline/ok/0116_trait_fn_placeholder_parameter.rs
new file mode 100644
index 000000000..aede3f4fe
--- /dev/null
+++ b/crates/ra_syntax/tests/data/parser/inline/ok/0116_trait_fn_placeholder_parameter.rs
@@ -0,0 +1,3 @@
1trait Foo {
2 fn bar(_: u64);
3}
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0116_trait_fn_placeholder_parameter.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0116_trait_fn_placeholder_parameter.txt
new file mode 100644
index 000000000..248d491df
--- /dev/null
+++ b/crates/ra_syntax/tests/data/parser/inline/ok/0116_trait_fn_placeholder_parameter.txt
@@ -0,0 +1,32 @@
1SOURCE_FILE@[0; 34)
2 TRAIT_DEF@[0; 33)
3 TRAIT_KW@[0; 5)
4 WHITESPACE@[5; 6)
5 NAME@[6; 9)
6 IDENT@[6; 9) "Foo"
7 WHITESPACE@[9; 10)
8 ITEM_LIST@[10; 33)
9 L_CURLY@[10; 11)
10 WHITESPACE@[11; 16)
11 FN_DEF@[16; 31)
12 FN_KW@[16; 18)
13 WHITESPACE@[18; 19)
14 NAME@[19; 22)
15 IDENT@[19; 22) "bar"
16 PARAM_LIST@[22; 30)
17 L_PAREN@[22; 23)
18 PARAM@[23; 29)
19 PLACEHOLDER_PAT@[23; 24)
20 UNDERSCORE@[23; 24)
21 COLON@[24; 25)
22 WHITESPACE@[25; 26)
23 PATH_TYPE@[26; 29)
24 PATH@[26; 29)
25 PATH_SEGMENT@[26; 29)
26 NAME_REF@[26; 29)
27 IDENT@[26; 29) "u64"
28 R_PAREN@[29; 30)
29 SEMI@[30; 31)
30 WHITESPACE@[31; 32)
31 R_CURLY@[32; 33)
32 WHITESPACE@[33; 34)