aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_assists/src/lib.rs
diff options
context:
space:
mode:
authorMatthew Hall <[email protected]>2020-04-01 22:26:41 +0100
committerMatthew Hall <[email protected]>2020-04-01 22:26:41 +0100
commit1fee60181fea56ebe6b5e4aeb11cf9df25a1d087 (patch)
tree0a157b2f478a2b4334167da483f401d0ba5e4938 /crates/ra_assists/src/lib.rs
parent1c2d4135db867efe335a0654d86429bea7bb9caf (diff)
Add impl From for enum variant assist
Basically adds a From impl for tuple enum variants with one field. Added to cover the fairly common case of implementing your own Error that can be created from another one, although other use cases exist.
Diffstat (limited to 'crates/ra_assists/src/lib.rs')
-rw-r--r--crates/ra_assists/src/lib.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/crates/ra_assists/src/lib.rs b/crates/ra_assists/src/lib.rs
index fa1f3dd26..6b4c56dcd 100644
--- a/crates/ra_assists/src/lib.rs
+++ b/crates/ra_assists/src/lib.rs
@@ -122,6 +122,7 @@ mod handlers {
122 mod replace_qualified_name_with_use; 122 mod replace_qualified_name_with_use;
123 mod replace_unwrap_with_match; 123 mod replace_unwrap_with_match;
124 mod split_import; 124 mod split_import;
125 mod add_from_impl_for_enum;
125 126
126 pub(crate) fn all() -> &'static [AssistHandler] { 127 pub(crate) fn all() -> &'static [AssistHandler] {
127 &[ 128 &[
@@ -159,6 +160,7 @@ mod handlers {
159 replace_qualified_name_with_use::replace_qualified_name_with_use, 160 replace_qualified_name_with_use::replace_qualified_name_with_use,
160 replace_unwrap_with_match::replace_unwrap_with_match, 161 replace_unwrap_with_match::replace_unwrap_with_match,
161 split_import::split_import, 162 split_import::split_import,
163 add_from_impl_for_enum::add_from_impl_for_enum,
162 ] 164 ]
163 } 165 }
164} 166}