aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Diebold <[email protected]>2019-12-30 12:53:43 +0000
committerFlorian Diebold <[email protected]>2020-01-11 22:33:04 +0000
commit877fda04c5a37241b09f155847d7e27b20875b63 (patch)
tree9bbc5ae90902cdabd8ea04e83b086ae0756bcc11
parent2e09a96f82d4ba15de2c8b8fbbe40fd78e21c185 (diff)
Add test
-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,