@@ -1424,6 +1424,21 @@ fn foo(s: S) { s.$0 }
1424
1424
kind: Method,
1425
1425
lookup: "the_method",
1426
1426
detail: "fn(&self)",
1427
+ relevance: CompletionRelevance {
1428
+ exact_name_match: false,
1429
+ type_match: None,
1430
+ is_local: false,
1431
+ is_item_from_trait: false,
1432
+ is_name_already_imported: false,
1433
+ requires_import: false,
1434
+ is_op_method: false,
1435
+ is_private_editable: false,
1436
+ postfix_match: None,
1437
+ is_definite: false,
1438
+ associated_fn_type: Some(
1439
+ ReturnsExpectedType,
1440
+ ),
1441
+ },
1427
1442
},
1428
1443
]
1429
1444
"# ] ] ,
@@ -2135,135 +2150,6 @@ fn foo(f: Foo) { let _: &u32 = f.b$0 }
2135
2150
) ;
2136
2151
}
2137
2152
2138
- #[ test]
2139
- fn associated_fn_type ( ) {
2140
- check_kinds (
2141
- r#"
2142
- struct A;
2143
- struct ABuilder;
2144
- impl A {
2145
- fn foo(&self) {}
2146
- fn new_1(input: u32) -> A { A }
2147
- fn new_2() -> Self { A }
2148
- fn aaaabuilder() -> ABuilder { A }
2149
- }
2150
- fn test() {
2151
- let a = A::$0;
2152
- }
2153
- "# ,
2154
- & [
2155
- CompletionItemKind :: Method ,
2156
- CompletionItemKind :: Method ,
2157
- CompletionItemKind :: Method ,
2158
- CompletionItemKind :: Method ,
2159
- ] ,
2160
- expect ! [ [ r#"
2161
- [
2162
- CompletionItem {
2163
- label: "foo(…)",
2164
- source_range: 190..190,
2165
- delete: 190..190,
2166
- insert: "foo(${1:&self})$0",
2167
- kind: Method,
2168
- lookup: "foo",
2169
- detail: "fn(&self)",
2170
- relevance: CompletionRelevance {
2171
- exact_name_match: false,
2172
- type_match: Some(
2173
- CouldUnify,
2174
- ),
2175
- is_local: false,
2176
- is_item_from_trait: false,
2177
- is_name_already_imported: false,
2178
- requires_import: false,
2179
- is_op_method: false,
2180
- is_private_editable: false,
2181
- postfix_match: None,
2182
- is_definite: false,
2183
- associated_fn_type: None,
2184
- },
2185
- trigger_call_info: true,
2186
- },
2187
- CompletionItem {
2188
- label: "foo(…)",
2189
- source_range: 190..190,
2190
- delete: 190..190,
2191
- insert: "foo(${1:&self})$0",
2192
- kind: Method,
2193
- lookup: "foo",
2194
- detail: "fn(&self)",
2195
- relevance: CompletionRelevance {
2196
- exact_name_match: false,
2197
- type_match: Some(
2198
- CouldUnify,
2199
- ),
2200
- is_local: false,
2201
- is_item_from_trait: false,
2202
- is_name_already_imported: false,
2203
- requires_import: false,
2204
- is_op_method: false,
2205
- is_private_editable: false,
2206
- postfix_match: None,
2207
- is_definite: false,
2208
- associated_fn_type: None,
2209
- },
2210
- trigger_call_info: true,
2211
- },
2212
- CompletionItem {
2213
- label: "foo(…)",
2214
- source_range: 190..190,
2215
- delete: 190..190,
2216
- insert: "foo(${1:&self})$0",
2217
- kind: Method,
2218
- lookup: "foo",
2219
- detail: "fn(&self)",
2220
- relevance: CompletionRelevance {
2221
- exact_name_match: false,
2222
- type_match: Some(
2223
- CouldUnify,
2224
- ),
2225
- is_local: false,
2226
- is_item_from_trait: false,
2227
- is_name_already_imported: false,
2228
- requires_import: false,
2229
- is_op_method: false,
2230
- is_private_editable: false,
2231
- postfix_match: None,
2232
- is_definite: false,
2233
- associated_fn_type: None,
2234
- },
2235
- trigger_call_info: true,
2236
- },
2237
- CompletionItem {
2238
- label: "foo(…)",
2239
- source_range: 190..190,
2240
- delete: 190..190,
2241
- insert: "foo(${1:&self})$0",
2242
- kind: Method,
2243
- lookup: "foo",
2244
- detail: "fn(&self)",
2245
- relevance: CompletionRelevance {
2246
- exact_name_match: false,
2247
- type_match: Some(
2248
- CouldUnify,
2249
- ),
2250
- is_local: false,
2251
- is_item_from_trait: false,
2252
- is_name_already_imported: false,
2253
- requires_import: false,
2254
- is_op_method: false,
2255
- is_private_editable: false,
2256
- postfix_match: None,
2257
- is_definite: false,
2258
- associated_fn_type: None,
2259
- },
2260
- trigger_call_info: true,
2261
- },
2262
- ]
2263
- "# ] ] ,
2264
- ) ;
2265
- }
2266
-
2267
2153
#[ test]
2268
2154
fn expected_fn_type_ref ( ) {
2269
2155
check_kinds (
0 commit comments