aboutsummaryrefslogtreecommitdiff
path: root/crates/assists/src/handlers/extract_function.rs
Commit message (Collapse)AuthorAgeFilesLines
* allow extracted body to be indented(dedent it)Vladyslav Katasonov2021-02-051-13/+101
|
* allow transitive `&mut` access for fields in extract_functionVladyslav Katasonov2021-02-051-27/+92
|
* add tests for extracting if/match/while/for exprsVladyslav Katasonov2021-02-041-0/+120
|
* document extract_function assist implementationVladyslav Katasonov2021-02-041-22/+126
|
* use `&T` for non copy params of extracted functionVladyslav Katasonov2021-02-041-2/+55
| | | | Use shared ref if param is not `T: Copy` and is used after body
* split extract_function into pieces and order themVladyslav Katasonov2021-02-041-380/+510
|
* remove ignored test for downgrading mut to sharedVladyslav Katasonov2021-02-031-30/+0
|
* allow calling `&mut` methods on outer vars when extracing functionVladyslav Katasonov2021-02-031-0/+116
|
* allow `&mut param` when extracting functionVladyslav Katasonov2021-02-031-3/+107
| | | | | | Recognise &mut as variable modification. This allows extracting functions with `&mut var` with `var` being in outer scope
* allow modifications of vars from outer scope inside extracted functionVladyslav Katasonov2021-02-031-45/+336
| | | | | It currently allows only directly setting variable. No `&mut` references or methods.
* allow local variables to be used after extracted bodyVladyslav Katasonov2021-02-031-41/+183
| | | | | when variable is defined inside extracted body export this variable to original scope via return value(s)
* change TODO to FIXMEVladyslav Katasonov2021-02-031-2/+2
|
* disable test for downgrading mutability on extractVladyslav Katasonov2021-02-031-0/+3
|
* convert IdentPat to Pat via IntoVladyslav Katasonov2021-02-031-5/+5
| | | | before child getter was used
* support extracting methods; no mut loweringVladyslav Katasonov2021-02-031-37/+191
| | | | | currently mut refernce will *not* be downgraded to shared if it is sufficient(see relevant test for example)
* initial version of extract function assistVladyslav Katasonov2021-02-031-0/+819
there are a few currently limitations: * no modifications of function body * does not handle mutability and references * no method support * may produce incorrect results