diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-11-06 21:32:27 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-11-06 21:32:27 +0000 |
commit | cdddcaee851be1cff1eeb23599f5a58f1b30a927 (patch) | |
tree | 96067539ff813396bb2a320a2fa7efb7b51bc4a2 /crates/assists/src/lib.rs | |
parent | fe13a4aeb1fd33aeda2d884b2691b23b0ca5daee (diff) | |
parent | 186431e178c04fed8744d81b834547700af46430 (diff) |
Merge #6477
6477: Add infer_function_return_type assist r=matklad a=Veykril
This adds an assist to insert a functions return type if it hasn't been specified yet by inferring it from the functions tail expression. This assist only becomes active if the cursor is on the tail expression. See https://github.com/rust-analyzer/rust-analyzer/issues/6303#issuecomment-714657326
Co-authored-by: Lukas Wirth <[email protected]>
Diffstat (limited to 'crates/assists/src/lib.rs')
-rw-r--r-- | crates/assists/src/lib.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/crates/assists/src/lib.rs b/crates/assists/src/lib.rs index b804e495d..af88b3437 100644 --- a/crates/assists/src/lib.rs +++ b/crates/assists/src/lib.rs | |||
@@ -143,6 +143,7 @@ mod handlers { | |||
143 | mod generate_function; | 143 | mod generate_function; |
144 | mod generate_impl; | 144 | mod generate_impl; |
145 | mod generate_new; | 145 | mod generate_new; |
146 | mod infer_function_return_type; | ||
146 | mod inline_local_variable; | 147 | mod inline_local_variable; |
147 | mod introduce_named_lifetime; | 148 | mod introduce_named_lifetime; |
148 | mod invert_if; | 149 | mod invert_if; |
@@ -190,6 +191,7 @@ mod handlers { | |||
190 | generate_function::generate_function, | 191 | generate_function::generate_function, |
191 | generate_impl::generate_impl, | 192 | generate_impl::generate_impl, |
192 | generate_new::generate_new, | 193 | generate_new::generate_new, |
194 | infer_function_return_type::infer_function_return_type, | ||
193 | inline_local_variable::inline_local_variable, | 195 | inline_local_variable::inline_local_variable, |
194 | introduce_named_lifetime::introduce_named_lifetime, | 196 | introduce_named_lifetime::introduce_named_lifetime, |
195 | invert_if::invert_if, | 197 | invert_if::invert_if, |