diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-12-21 17:31:43 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-12-21 17:31:43 +0000 |
commit | a106784115b5f55b9bbc4d9f72464bdc31cf5cda (patch) | |
tree | 344250a85284d1b3c31e7a3111ef0f43c3833dbe /crates/ra_syntax/tests/data/parser/ok | |
parent | e086cc8db5edbf38756abca25c8bcc3334a596ff (diff) | |
parent | bd5a3589109df3afde67640cd4b36b91d9271d8a (diff) |
Merge #313
313: Fix where clauses using fully qualified path syntax r=matklad a=DJMcNab
Fixes #311.
Co-authored-by: DJMcNab <[email protected]>
Diffstat (limited to 'crates/ra_syntax/tests/data/parser/ok')
-rw-r--r-- | crates/ra_syntax/tests/data/parser/ok/0036_fully_qualified.rs | 8 | ||||
-rw-r--r-- | crates/ra_syntax/tests/data/parser/ok/0036_fully_qualified.txt | 88 |
2 files changed, 96 insertions, 0 deletions
diff --git a/crates/ra_syntax/tests/data/parser/ok/0036_fully_qualified.rs b/crates/ra_syntax/tests/data/parser/ok/0036_fully_qualified.rs new file mode 100644 index 000000000..6da27933e --- /dev/null +++ b/crates/ra_syntax/tests/data/parser/ok/0036_fully_qualified.rs | |||
@@ -0,0 +1,8 @@ | |||
1 | // https://github.com/rust-analyzer/rust-analyzer/issues/311 | ||
2 | |||
3 | pub fn foo<S: Iterator>() -> String | ||
4 | where | ||
5 | <S as Iterator>::Item: Eq, | ||
6 | { | ||
7 | "".to_owned() | ||
8 | } | ||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0036_fully_qualified.txt b/crates/ra_syntax/tests/data/parser/ok/0036_fully_qualified.txt new file mode 100644 index 000000000..208e5e51c --- /dev/null +++ b/crates/ra_syntax/tests/data/parser/ok/0036_fully_qualified.txt | |||
@@ -0,0 +1,88 @@ | |||
1 | SOURCE_FILE@[0; 157) | ||
2 | COMMENT@[0; 60) | ||
3 | WHITESPACE@[60; 62) | ||
4 | FN_DEF@[62; 156) | ||
5 | VISIBILITY@[62; 65) | ||
6 | PUB_KW@[62; 65) | ||
7 | WHITESPACE@[65; 66) | ||
8 | FN_KW@[66; 68) | ||
9 | WHITESPACE@[68; 69) | ||
10 | NAME@[69; 72) | ||
11 | IDENT@[69; 72) "foo" | ||
12 | TYPE_PARAM_LIST@[72; 85) | ||
13 | L_ANGLE@[72; 73) | ||
14 | TYPE_PARAM@[73; 84) | ||
15 | NAME@[73; 74) | ||
16 | IDENT@[73; 74) "S" | ||
17 | COLON@[74; 75) | ||
18 | WHITESPACE@[75; 76) | ||
19 | PATH_TYPE@[76; 84) | ||
20 | PATH@[76; 84) | ||
21 | PATH_SEGMENT@[76; 84) | ||
22 | NAME_REF@[76; 84) | ||
23 | IDENT@[76; 84) "Iterator" | ||
24 | R_ANGLE@[84; 85) | ||
25 | PARAM_LIST@[85; 87) | ||
26 | L_PAREN@[85; 86) | ||
27 | R_PAREN@[86; 87) | ||
28 | WHITESPACE@[87; 88) | ||
29 | RET_TYPE@[88; 97) | ||
30 | THIN_ARROW@[88; 90) | ||
31 | WHITESPACE@[90; 91) | ||
32 | PATH_TYPE@[91; 97) | ||
33 | PATH@[91; 97) | ||
34 | PATH_SEGMENT@[91; 97) | ||
35 | NAME_REF@[91; 97) | ||
36 | IDENT@[91; 97) "String" | ||
37 | WHITESPACE@[97; 98) | ||
38 | WHERE_CLAUSE@[98; 134) | ||
39 | WHERE_KW@[98; 103) | ||
40 | WHITESPACE@[103; 108) | ||
41 | WHERE_PRED@[108; 133) | ||
42 | PATH_TYPE@[108; 129) | ||
43 | PATH@[108; 129) | ||
44 | PATH@[108; 123) | ||
45 | PATH_SEGMENT@[108; 123) | ||
46 | L_ANGLE@[108; 109) | ||
47 | PATH_TYPE@[109; 110) | ||
48 | PATH@[109; 110) | ||
49 | PATH_SEGMENT@[109; 110) | ||
50 | NAME_REF@[109; 110) | ||
51 | IDENT@[109; 110) "S" | ||
52 | WHITESPACE@[110; 111) | ||
53 | AS_KW@[111; 113) | ||
54 | WHITESPACE@[113; 114) | ||
55 | PATH_TYPE@[114; 122) | ||
56 | PATH@[114; 122) | ||
57 | PATH_SEGMENT@[114; 122) | ||
58 | NAME_REF@[114; 122) | ||
59 | IDENT@[114; 122) "Iterator" | ||
60 | R_ANGLE@[122; 123) | ||
61 | COLONCOLON@[123; 125) | ||
62 | PATH_SEGMENT@[125; 129) | ||
63 | NAME_REF@[125; 129) | ||
64 | IDENT@[125; 129) "Item" | ||
65 | COLON@[129; 130) | ||
66 | WHITESPACE@[130; 131) | ||
67 | PATH_TYPE@[131; 133) | ||
68 | PATH@[131; 133) | ||
69 | PATH_SEGMENT@[131; 133) | ||
70 | NAME_REF@[131; 133) | ||
71 | IDENT@[131; 133) "Eq" | ||
72 | COMMA@[133; 134) | ||
73 | WHITESPACE@[134; 135) | ||
74 | BLOCK@[135; 156) | ||
75 | L_CURLY@[135; 136) | ||
76 | WHITESPACE@[136; 141) | ||
77 | METHOD_CALL_EXPR@[141; 154) | ||
78 | LITERAL@[141; 143) | ||
79 | STRING@[141; 143) | ||
80 | DOT@[143; 144) | ||
81 | NAME_REF@[144; 152) | ||
82 | IDENT@[144; 152) "to_owned" | ||
83 | ARG_LIST@[152; 154) | ||
84 | L_PAREN@[152; 153) | ||
85 | R_PAREN@[153; 154) | ||
86 | WHITESPACE@[154; 155) | ||
87 | R_CURLY@[155; 156) | ||
88 | WHITESPACE@[156; 157) | ||