From c550c6759d2c684b5ebef141cebd602e90ee931a Mon Sep 17 00:00:00 2001 From: Erlend Tobiassen Date: Tue, 22 Jan 2019 18:46:15 +0100 Subject: Add test for placeholder parameters in trait fn defs --- .../ok/0116_trait_fn_placeholder_parameter.rs | 3 ++ .../ok/0116_trait_fn_placeholder_parameter.txt | 32 ++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 crates/ra_syntax/tests/data/parser/inline/ok/0116_trait_fn_placeholder_parameter.rs create mode 100644 crates/ra_syntax/tests/data/parser/inline/ok/0116_trait_fn_placeholder_parameter.txt (limited to 'crates/ra_syntax/tests') 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 @@ +trait Foo { + fn bar(_: u64); +} 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 @@ +SOURCE_FILE@[0; 34) + TRAIT_DEF@[0; 33) + TRAIT_KW@[0; 5) + WHITESPACE@[5; 6) + NAME@[6; 9) + IDENT@[6; 9) "Foo" + WHITESPACE@[9; 10) + ITEM_LIST@[10; 33) + L_CURLY@[10; 11) + WHITESPACE@[11; 16) + FN_DEF@[16; 31) + FN_KW@[16; 18) + WHITESPACE@[18; 19) + NAME@[19; 22) + IDENT@[19; 22) "bar" + PARAM_LIST@[22; 30) + L_PAREN@[22; 23) + PARAM@[23; 29) + PLACEHOLDER_PAT@[23; 24) + UNDERSCORE@[23; 24) + COLON@[24; 25) + WHITESPACE@[25; 26) + PATH_TYPE@[26; 29) + PATH@[26; 29) + PATH_SEGMENT@[26; 29) + NAME_REF@[26; 29) + IDENT@[26; 29) "u64" + R_PAREN@[29; 30) + SEMI@[30; 31) + WHITESPACE@[31; 32) + R_CURLY@[32; 33) + WHITESPACE@[33; 34) -- cgit v1.2.3