File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed
crates/ide_completion/src/completions Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -101,7 +101,10 @@ fn complete_methods(
101
101
mod tests {
102
102
use expect_test:: { expect, Expect } ;
103
103
104
- use crate :: { tests:: filtered_completion_list, CompletionKind } ;
104
+ use crate :: {
105
+ tests:: { check_edit, filtered_completion_list} ,
106
+ CompletionKind ,
107
+ } ;
105
108
106
109
fn check ( ra_fixture : & str , expect : Expect ) {
107
110
let actual = filtered_completion_list ( ra_fixture, CompletionKind :: Reference ) ;
@@ -253,6 +256,21 @@ fn foo(a: A) { a.$0 }
253
256
me the_method() (as Trait) fn(&self)
254
257
"# ] ] ,
255
258
) ;
259
+ check_edit (
260
+ "the_method" ,
261
+ r#"
262
+ struct A {}
263
+ trait Trait { fn the_method(&self); }
264
+ impl Trait for A {}
265
+ fn foo(a: A) { a.$0 }
266
+ "# ,
267
+ r#"
268
+ struct A {}
269
+ trait Trait { fn the_method(&self); }
270
+ impl Trait for A {}
271
+ fn foo(a: A) { a.the_method()$0 }
272
+ "# ,
273
+ ) ;
256
274
}
257
275
258
276
#[ test]
You can’t perform that action at this time.
0 commit comments