aboutsummaryrefslogtreecommitdiff
path: root/crates/ide_assists/src/handlers
Commit message (Collapse)AuthorAgeFilesLines
* Merge #9308bors[bot]2021-06-171-13/+52
|\ | | | | | | | | | | | | | | 9308: fix: Create modules in correct directory for nested modules in move_module assist r=Veykril a=Veykril bors r+ Co-authored-by: Lukas Wirth <[email protected]>
| * Create modules in correct directory for nested modules in move_module assistLukas Wirth2021-06-171-13/+52
| |
* | internal: switch some tests to minicoreAleksey Kladov2021-06-171-84/+37
| |
* | internal: minimize minicoreAleksey Kladov2021-06-171-53/+25
| | | | | | | | | | | | We want to keep minicore small, so let's split out iterator adapters and sources into a separate `iterators` region, and use them only when needed.
* | internal: cleanup testsAleksey Kladov2021-06-161-71/+114
| |
* | internal: switch some tests to minicoreAleksey Kladov2021-06-161-15/+12
| |
* | internal: switch some tests to minicoreAleksey Kladov2021-06-161-19/+15
|/
* internal: don't #[ignore] testsAleksey Kladov2021-06-152-35/+16
| | | | See the style.md for motivation
* internal: cleanup testsAleksey Kladov2021-06-152-610/+596
| | | | | | * ensure standard, non-indented style (should add this check to `fixture` some day) * removed a couple of ignores
* internal: document that we don't #[ignore] testsAleksey Kladov2021-06-151-16/+16
|
* Don't keep a trailing self token in import paths after unmerge_useLukas Wirth2021-06-141-1/+15
|
* Merge #9242bors[bot]2021-06-1317-28/+28
|\ | | | | | | | | | | | | | | 9242: Clippy r=matklad a=Maan2003 Best viewed commit wise Co-authored-by: Maan2003 <[email protected]>
| * clippy::redundant_closureMaan20032021-06-132-3/+3
| |
| * clippy::redudant_borrowMaan20032021-06-1316-25/+25
| |
* | Merge #9240bors[bot]2021-06-131-1/+1
|\ \ | |/ |/| | | | | | | | | | | 9240: Fixed a small typo in comment r=matklad a=fee1-dead Co-authored-by: fee1-dead <[email protected]>
| * Fixed a small typo in commentfee1-dead2021-06-111-1/+1
| |
* | Merge #9215bors[bot]2021-06-111-2/+9
|\ \ | |/ |/| | | | | | | | | | | 9215: change visibility for use and macro items r=jonas-schievink a=Maan2003 Co-authored-by: Maan2003 <[email protected]>
| * change visibility for use and macro itemsMaan20032021-06-111-2/+9
| |
* | Don't suggest Remove unused param in trait implsMaan20032021-06-111-1/+29
|/
* fmtJoshua Warner2021-06-061-3/+12
|
* Refactor to be just one assistJoshua Warner2021-06-052-530/+328
|
* Add assist for converting a tuple enum variant to a named variantJoshua Warner2021-06-051-0/+515
|
* Don't inline mutable locals in 'inline_local_variable'Lukas Wirth2021-06-041-0/+17
|
* NFC: remove redundant clones (clippy::perf)Matthias Krüger2021-06-031-1/+1
|
* Preserve indentationJonas Schievink2021-06-021-5/+30
|
* Account for traitsJonas Schievink2021-06-021-10/+29
|
* Merge #9108bors[bot]2021-06-021-2/+31
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 9108: Don't show extract into variable assist for unit expressions r=jonas-schievink a=brandondong **Reproduction:** ```rust fn main() { let mut i = 3; $0if i >= 0 { i += 1; } else { i -= 1; }$0 } ``` 1. Select the snippet of code between the $0's. 2. The extract into variable assist shows up, pushing down the more useful extract into function assist. 3. The resulting output of selecting the extract into variable assist is valid but with the extracted variable having the unit type: ```rust fn main() { let mut i = 3; let var_name = if i >= 0 { i += 1; } else { i -= 1; }; var_name } ``` **Fix:** - Don't show the extract into variable assist for unit expressions. I could not think of any scenarios where such a variable extraction would be desired. Co-authored-by: Brandon <[email protected]>
| * Don't show extract into variable assist for unit expressionsBrandon2021-06-021-2/+31
| |
* | Merge #9112bors[bot]2021-06-021-44/+125
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 9112: Fix some bugs in `extract_struct_from_enum_variant` assist r=Veykril a=Veykril bors r+ Fixes #9100 Fixes #9099 Kind of fixes #9109, it now copies all the generics might be incorrect if the variant doesn't use all of them) Co-authored-by: Lukas Wirth <[email protected]>
| * | Fix references to patterns in extract_struct_from_enum_variant assistLukas Wirth2021-06-021-26/+51
| | |
| * | Carry over attributes in extract_struct_from_enum_variantLukas Wirth2021-06-021-5/+32
| | |
| * | Account for generics in extract_struct_from_enum_variantLukas Wirth2021-06-021-17/+46
| |/
* / Place extracted type alias outside of implJonas Schievink2021-06-021-1/+27
|/
* clippy::redundant_clone fixesLaurențiu Nicola2021-05-261-1/+1
|
* add test that it does not create extraneous commasDomantas Jadenkus2021-05-241-0/+20
|
* generate match arms with todo!() as placeholder bodyDomantas Jadenkus2021-05-241-54/+74
|
* Merge #8945bors[bot]2021-05-231-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | 8945: fix: Make expected type work in more situations r=flodiebold a=flodiebold Also makes call info show the correct types for generic methods. ![2021-05-23-182952_1134x616_scrot](https://user-images.githubusercontent.com/906069/119269023-dd5a5b00-bbf5-11eb-993a-b6e122c3b9a6.png) ![2021-05-23-183117_922x696_scrot](https://user-images.githubusercontent.com/906069/119269025-dfbcb500-bbf5-11eb-983c-fc415b8428e0.png) Co-authored-by: Florian Diebold <[email protected]>
| * Get rid of field_type againFlorian Diebold2021-05-231-1/+1
| |
* | feat: generate getter avoids generating types like `&Vec<T>`Aleksey Kladov2021-05-231-7/+106
| |
* | feat: generate getter assist places the cursor at the generated functionAleksey Kladov2021-05-231-7/+12
| |
* | minimize testsAleksey Kladov2021-05-231-44/+54
| |
* | remove duplicate testsAleksey Kladov2021-05-231-103/+26
| |
* | reduce duplicationAleksey Kladov2021-05-232-208/+160
|/
* Merge #8901bors[bot]2021-05-221-25/+56
|\ | | | | | | | | | | | | | | | | | | | | 8901: fix: `fill_match_arms` hangs on a tuple of large enums r=matklad a=iDawer + Lazy computation of missing arms. + Convenience function to test lazy computation: `ide_assists::tests::check_assist_unresolved`. Fixes #8835 Co-authored-by: Dawer <[email protected]>
| * Test `fill_match_arms` for lazy computation.Dawer2021-05-211-1/+19
| | | | | | | | This also adds `ide_assists::tests::check_assist_unresolved` function.
| * fix: `fill_match_arms` hangs on a tuple of large enumsDawer2021-05-201-2/+14
| |
| * Compute missing arms lazily.Dawer2021-05-201-23/+24
| |
* | Merge #8897bors[bot]2021-05-201-0/+14
|\ \ | | | | | | | | | | | | | | | | | | | | | 8897: minor: Don't compare ast::Visibility by stringifying r=Veykril a=Veykril bors r+ Co-authored-by: Lukas Tobias Wirth <[email protected]>
| * | Don't compare ast::Visibility by stringifyingLukas Tobias Wirth2021-05-201-0/+14
| |/
* / Update outdated auto-import documentationLukas Tobias Wirth2021-05-201-9/+8
|/