aboutsummaryrefslogtreecommitdiff
path: root/crates/syntax/src
Commit message (Collapse)AuthorAgeFilesLines
...
* | algo::diff testsLukas Wirth2020-10-221-2/+326
| |
* | Rewrite algo::diff to support insertion and deletionLukas Wirth2020-10-221-23/+64
|/
* Merge #6172bors[bot]2020-10-201-0/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6172: Add qualify path assist r=matklad a=Veykril This implements a `qualify_path` assist which works quite similar to the `auto_import` assist but instead of adding imports to the file it well, qualifies the path. This PR also moves out the `AutoImportAssets` struct and functions from `auto_import` into a utils submodule as most of this is now shared between `auto_import` and `qualify_path`. Changes made to `AutoImportAssets` are solely in its `search_for_imports` function which now takes a prefixed parameter to discern between using `find_use_path_prefixed` and `find_use_path` as the former is the required behavior by `auto_import` and the latter by this assist. For missing imported traits instead of importing this will qualify the path with a trait cast as in: ```rust test_mod::TestStruct::TEST_CONST<|> ``` becomes ```rust <test_mod::TestStruct as test_mod::TestTrait>::TEST_CONST ``` and for trait methods ideally it would do the following: ```rust let test_struct = test_mod::TestStruct {}; test_struct.test_meth<|>od() ``` becomes ```rust let test_struct = test_mod::TestStruct {}; test_mod::TestTrait::test_method(&test_struct) ``` Fixes #4124. Co-authored-by: Lukas Wirth <[email protected]>
| * Properly qualify trait methods in qualify_path assistLukas Wirth2020-10-151-0/+3
| |
* | Extract call_info and completion into separate cratesIgor Aleksanov2020-10-182-0/+84
|/
* when generating new function, focus on return type instead of bodyBenjamin Coenen2020-10-081-1/+11
| | | | Signed-off-by: Benjamin Coenen <[email protected]>
* CleanupAleksey Kladov2020-10-071-10/+13
|
* Merge #6160bors[bot]2020-10-071-1/+44
|\ | | | | | | | | | | | | | | 6160: Add validation check for ambiguous trait objects r=matklad a=Veykril Fixes #285. Co-authored-by: Lukas Wirth <[email protected]>
| * Add validation check for ambiguous trait objectsLukas Wirth2020-10-061-1/+44
| |
* | Document privacy invariant of SyntaxPtrAleksey Kladov2020-10-061-0/+2
|/
* Merge #6104bors[bot]2020-10-021-1/+1
|\ | | | | | | | | | | | | | | 6104: Minor clippy performance suggestions r=matklad a=kjeremy Co-authored-by: kjeremy <[email protected]>
| * Minor clippy performance suggestionskjeremy2020-09-301-1/+1
| |
* | Up rustc-ap-rustc_lexer to 681kjeremy2020-10-011-4/+4
|/ | | | cargo update as well
* Merge #6019bors[bot]2020-09-291-5/+28
|\ | | | | | | | | | | | | | | 6019: Remove make::path_from_text r=matklad a=Veykril This removes the `make::path_from_text` function, which according to a note should've been private. I removed it since it didn't really serve a purpose as it was simply wrapping `make::ast_from_text`. Co-authored-by: Lukas Wirth <[email protected]>
| * Remove make::path_from_textLukas Wirth2020-09-161-5/+28
| |
* | Rename impl edit method to be more explicitMatt Hooper2020-09-211-1/+1
| |
* | Add make utility for empty associated item listsMatt Hooper2020-09-211-0/+4
| |
* | Add edit utility for adding an associated item list to a impl defMatt Hooper2020-09-211-0/+16
| |
* | Add make::glob_use_tree function to create star-only UseTreeLukas Wirth2020-09-161-0/+4
| |
* | Reimplement import merging by making it recursive properly nesting all levelsLukas Wirth2020-09-121-0/+1
|/
* Merge #5940bors[bot]2020-09-042-1/+84
|\ | | | | | | | | | | | | | | 5940: Implement "Replace `impl Trait` function argument with the named generic" assist. r=matklad a=alekseysidorov Fixes #5085 Co-authored-by: Aleksei Sidorov <[email protected]>
| * Remove unnecessary commaAleksei Sidorov2020-09-041-1/+0
| |
| * Fix testsAleksei Sidorov2020-09-041-1/+1
| |
| * Fix nitpicksAleksei Sidorov2020-09-041-17/+2
| |
| * Resolve most of corner casesAleksei Sidorov2020-09-031-4/+22
| |
| * Initial implementation of the #5085 issueAleksei Sidorov2020-09-032-0/+81
| |
* | Impl make::blank_lineLukas Wirth2020-09-031-1/+11
|/
* Unify namingAleksey Kladov2020-09-031-4/+4
|
* Reduce path_from_text usageAleksey Kladov2020-08-311-0/+1
|
* Remove dead codeAleksey Kladov2020-08-311-14/+0
|
* :arrow_up: cratesAleksey Kladov2020-08-271-1/+1
|
* Cleanup invert-ifAleksey Kladov2020-08-251-6/+3
| | | | | * stick to trivial factory functions in make * compress the logic for inverting Option/Result
* Support extern typesJonas Schievink2020-08-241-1/+7
|
* Merge #5845bors[bot]2020-08-241-1/+1
|\ | | | | | | | | | | | | | | 5845: Omit lenses for not runnable doctests r=matklad a=SomeoneToIgnore Ideally, we should properly parse the doctest attributes before, but since I need it for the code lens only, this way should suffice for now Co-authored-by: Kirill Bulatov <[email protected]>
| * Omit lenses for not runnable doctestsKirill Bulatov2020-08-221-1/+1
| |
* | Invert if should be smart about is_some, is_none, is_ok, is_errdragfire2020-08-241-1/+7
|/
* :arrow_up: ungrammarAleksey Kladov2020-08-211-1/+2
|
* Switch to expect_test from crates.ioAleksey Kladov2020-08-211-1/+1
|
* formatjDomantas2020-08-171-13/+9
|
* fixup whitespace when adding missing impl itemsjDomantas2020-08-141-3/+30
|
* Remove deprecated functionAleksey Kladov2020-08-131-0/+7
|
* Cleanup **Move Guard** assistAleksey Kladov2020-08-131-0/+3
|
* **Merge Imports** assist handles selfAleksey Kladov2020-08-122-3/+11
|
* Rename ra_syntax -> syntaxAleksey Kladov2020-08-1224-0/+9869