aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_assists/src/assists
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_assists/src/assists')
-rw-r--r--crates/ra_assists/src/assists/add_missing_impl_members.rs23
1 files changed, 23 insertions, 0 deletions
diff --git a/crates/ra_assists/src/assists/add_missing_impl_members.rs b/crates/ra_assists/src/assists/add_missing_impl_members.rs
index bc49e71fe..f0dfe7780 100644
--- a/crates/ra_assists/src/assists/add_missing_impl_members.rs
+++ b/crates/ra_assists/src/assists/add_missing_impl_members.rs
@@ -401,6 +401,29 @@ impl Foo for S {
401 } 401 }
402 402
403 #[test] 403 #[test]
404 fn test_qualify_path_1() {
405 check_assist(
406 add_missing_impl_members,
407 "
408mod foo {
409 struct Bar;
410 trait Foo { fn foo(&self, bar: Bar); }
411}
412struct S;
413impl foo::Foo for S { <|> }",
414 "
415mod foo {
416 struct Bar;
417 trait Foo { fn foo(&self, bar: Bar); }
418}
419struct S;
420impl foo::Foo for S {
421 <|>fn foo(&self, bar: foo::Bar) { unimplemented!() }
422}",
423 );
424 }
425
426 #[test]
404 fn test_empty_trait() { 427 fn test_empty_trait() {
405 check_assist_not_applicable( 428 check_assist_not_applicable(
406 add_missing_impl_members, 429 add_missing_impl_members,