From 0a19f4f1b4a12bd50032249be4c9298284c08e3c Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 4 Mar 2019 16:38:54 +0300 Subject: allow aliases in underscores this helps with use foo::Trait as _; syntax --- .../tests/data/parser/inline/ok/0043_use_alias.rs | 1 + .../tests/data/parser/inline/ok/0043_use_alias.txt | 17 ++++++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) (limited to 'crates/ra_syntax/tests/data/parser') diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0043_use_alias.rs b/crates/ra_syntax/tests/data/parser/inline/ok/0043_use_alias.rs index 544caa020..9be50f877 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0043_use_alias.rs +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0043_use_alias.rs @@ -5,3 +5,4 @@ use some::{ yet::another::path, running::out::of::synonyms::for_::different::* }; +use Trait as _; diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0043_use_alias.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0043_use_alias.txt index 8ef0ecbc6..0c8dec81d 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0043_use_alias.txt +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0043_use_alias.txt @@ -1,4 +1,4 @@ -SOURCE_FILE@[0; 182) +SOURCE_FILE@[0; 198) USE_ITEM@[0; 28) USE_KW@[0; 3) WHITESPACE@[3; 4) @@ -121,3 +121,18 @@ SOURCE_FILE@[0; 182) R_CURLY@[179; 180) SEMI@[180; 181) WHITESPACE@[181; 182) + USE_ITEM@[182; 197) + USE_KW@[182; 185) + WHITESPACE@[185; 186) + USE_TREE@[186; 196) + PATH@[186; 191) + PATH_SEGMENT@[186; 191) + NAME_REF@[186; 191) + IDENT@[186; 191) "Trait" + WHITESPACE@[191; 192) + ALIAS@[192; 196) + AS_KW@[192; 194) + WHITESPACE@[194; 195) + UNDERSCORE@[195; 196) + SEMI@[196; 197) + WHITESPACE@[197; 198) -- cgit v1.2.3