diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-09-15 08:02:51 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2019-09-15 08:02:51 +0100 |
commit | bcdba777bdc43762cff73ac3ded4ae737a503692 (patch) | |
tree | e65797200723aeb35afc10acb24a7a7d385d5c2b /crates/ra_syntax/test_data/parser/inline | |
parent | 211171ffe6a4e8cbf31b9513972e59a8b9bdc811 (diff) | |
parent | c413f444a02ad7898b7a259e0d7aeaed91fd1997 (diff) |
Merge #1847
1847: Allow an underscore as the identifier in `const` items r=matklad a=ecstatic-morse
[RFC 2526](https://github.com/rust-lang/rust/issues/54912) was recently stabilized, meaning `const _: i32 = 5;` is now a valid item.
Co-authored-by: Dylan MacKenzie <[email protected]>
Diffstat (limited to 'crates/ra_syntax/test_data/parser/inline')
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/err/0013_static_underscore.rs | 1 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/err/0013_static_underscore.txt | 21 |
2 files changed, 22 insertions, 0 deletions
diff --git a/crates/ra_syntax/test_data/parser/inline/err/0013_static_underscore.rs b/crates/ra_syntax/test_data/parser/inline/err/0013_static_underscore.rs new file mode 100644 index 000000000..df8cecb43 --- /dev/null +++ b/crates/ra_syntax/test_data/parser/inline/err/0013_static_underscore.rs | |||
@@ -0,0 +1 @@ | |||
static _: i32 = 5; | |||
diff --git a/crates/ra_syntax/test_data/parser/inline/err/0013_static_underscore.txt b/crates/ra_syntax/test_data/parser/inline/err/0013_static_underscore.txt new file mode 100644 index 000000000..28f75a341 --- /dev/null +++ b/crates/ra_syntax/test_data/parser/inline/err/0013_static_underscore.txt | |||
@@ -0,0 +1,21 @@ | |||
1 | SOURCE_FILE@[0; 19) | ||
2 | STATIC_DEF@[0; 18) | ||
3 | STATIC_KW@[0; 6) "static" | ||
4 | WHITESPACE@[6; 7) " " | ||
5 | ERROR@[7; 8) | ||
6 | UNDERSCORE@[7; 8) "_" | ||
7 | COLON@[8; 9) ":" | ||
8 | WHITESPACE@[9; 10) " " | ||
9 | PATH_TYPE@[10; 13) | ||
10 | PATH@[10; 13) | ||
11 | PATH_SEGMENT@[10; 13) | ||
12 | NAME_REF@[10; 13) | ||
13 | IDENT@[10; 13) "i32" | ||
14 | WHITESPACE@[13; 14) " " | ||
15 | EQ@[14; 15) "=" | ||
16 | WHITESPACE@[15; 16) " " | ||
17 | LITERAL@[16; 17) | ||
18 | INT_NUMBER@[16; 17) "5" | ||
19 | SEMI@[17; 18) ";" | ||
20 | WHITESPACE@[18; 19) "\n" | ||
21 | error 7: expected a name | ||