diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-10-06 15:21:05 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-10-06 15:21:05 +0100 |
commit | 81d6816f175e02bccef8f373d2961d756dff31bb (patch) | |
tree | 5c1a042a4c4e77475e7bac3ea1b5ac96ff457377 /crates/assists/src/handlers/add_missing_impl_members.rs | |
parent | 8bf13292f0af1cfd74a6123399f524c81dcb57e3 (diff) | |
parent | 2090b534fc249a493823bb8e9039c0123aa0b90e (diff) |
Merge #6150
6150: Move ModPath->ast::Path function to IDE layer r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/assists/src/handlers/add_missing_impl_members.rs')
-rw-r--r-- | crates/assists/src/handlers/add_missing_impl_members.rs | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/crates/assists/src/handlers/add_missing_impl_members.rs b/crates/assists/src/handlers/add_missing_impl_members.rs index 51b5a2eb0..4c400f287 100644 --- a/crates/assists/src/handlers/add_missing_impl_members.rs +++ b/crates/assists/src/handlers/add_missing_impl_members.rs | |||
@@ -820,4 +820,29 @@ impl Tr for () { | |||
820 | }"#, | 820 | }"#, |
821 | ) | 821 | ) |
822 | } | 822 | } |
823 | |||
824 | #[test] | ||
825 | fn weird_path() { | ||
826 | check_assist( | ||
827 | add_missing_impl_members, | ||
828 | r#" | ||
829 | trait Test { | ||
830 | fn foo(&self, x: crate) | ||
831 | } | ||
832 | impl Test for () { | ||
833 | <|> | ||
834 | } | ||
835 | "#, | ||
836 | r#" | ||
837 | trait Test { | ||
838 | fn foo(&self, x: crate) | ||
839 | } | ||
840 | impl Test for () { | ||
841 | fn foo(&self, x: crate) { | ||
842 | ${0:todo!()} | ||
843 | } | ||
844 | } | ||
845 | "#, | ||
846 | ) | ||
847 | } | ||
823 | } | 848 | } |