aboutsummaryrefslogtreecommitdiff
path: root/crates/ide_db/src/helpers
Commit message (Collapse)AuthorAgeFilesLines
* Add cov_marks to insert_use testsLukas Wirth2021-04-202-1/+39
|
* Remove SyntaxRewriter usage in insert_use in favor of tedLukas Wirth2021-04-202-178/+103
|
* Check for rust doc code attributes like rustdoc doesLukas Wirth2021-04-191-0/+34
|
* Merge #8467bors[bot]2021-04-191-0/+8
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8467: Adds impl Deref assist r=jhgg a=jhgg This PR adds a new `generate_deref` assist that automatically generates a deref impl for a given struct field. Check out this gif: ![2021-04-11_00-33-33](https://user-images.githubusercontent.com/5489149/114296006-b38e1000-9a5d-11eb-9112-807c01b8fd0a.gif) -- I have a few Q's: - [x] Should I write more tests, if so, what precisely should I test for? - [x] I have an inline question on line 65, can someone provide guidance? :) - [x] I can implement this for `ast::TupleField` too. But should it be a separate assist fn, or should I try and jam both into the `generate_deref`? - [x] I want to follow this up with an assist on `impl $0Deref for T {` which would automatically generate a `DerefMut` impl that mirrors the Deref as well, however, I could probably use some pointers on how to do that, since I'll have to reach into the ast of `fn deref` to grab the field that it's referencing for the `DerefMut` impl. Co-authored-by: jake <[email protected]>
| * Adds impl Deref assistjake2021-04-111-0/+8
| |
* | Exclude inherent traits from flyimportsKirill Bulatov2021-04-161-6/+16
|/
* Convert Into to From assistGraeme Coupar2021-04-031-1/+5
| | | | | | | | | | | | This adds a "Convert Into to From" assist, useful since clippy has recently started adding lints on every `Into`. It covers converting the signature, and converting any `self`/`Self` references within the body to the correct types. It does assume that every instance of `Into` can be converted to a `From`, which I _think_ is the case now. Let me know if there's something I'm not thinking of and I can try and make it smarter.
* Rename target_ty to self_tyLukas Wirth2021-03-291-1/+1
|
* Cleanup ide_db importsLukas Wirth2021-03-271-1/+2
|
* syntax: return owned string instead of leaking stringcynecx2021-03-262-2/+2
|
* rewrite merge use trees assist to use muatable syntax treesAleksey Kladov2021-03-221-2/+2
| | | | changelog internal
* Reexport PrefixKind to remove deps to hirEdwin Cheng2021-03-221-1/+3
|
* Less reallocationsKirill Bulatov2021-03-211-3/+0
|
* Disable unqualified assoc items completion for nowKirill Bulatov2021-03-201-1/+8
|
* DocsKirill Bulatov2021-03-201-3/+3
|
* Do not query item search by name eagerlyKirill Bulatov2021-03-201-121/+89
|
* Do not propose assoc items without qualifiersKirill Bulatov2021-03-201-3/+5
|
* Fix associated items not being appended to paths in import_assetsLukas Wirth2021-03-181-1/+5
|
* avoid converting types into themselves via .into() (clippy::useless-conversion)Matthias Krüger2021-03-171-1/+1
| | | | example: let x: String = String::from("hello world").into();
* Better strip turbofishesKirill Bulatov2021-03-081-4/+4
|
* Add rustdocs and use better namesKirill Bulatov2021-03-081-30/+52
|
* Less lifetines: derive SemanticsScope in placeKirill Bulatov2021-03-081-24/+23
|
* Restrict fuzzy qualifiers for nowKirill Bulatov2021-03-081-20/+23
|
* Enforce the located imports' orderKirill Bulatov2021-03-081-6/+5
|
* Fix the completion labels and testsKirill Bulatov2021-03-081-31/+68
|
* Work towards better import labelsKirill Bulatov2021-03-081-94/+61
|
* Profile import_assets betterKirill Bulatov2021-03-081-0/+5
|
* SimplifyKirill Bulatov2021-03-081-13/+5
|
* Refactor the import locationKirill Bulatov2021-03-081-102/+110
|
* Do not propose already imported importsKirill Bulatov2021-03-081-9/+34
|
* Properly handle turbofishes in qualifiersKirill Bulatov2021-03-081-5/+7
|
* Fix some testsKirill Bulatov2021-03-081-41/+69
|
* Return more data about located importsKirill Bulatov2021-03-081-70/+109
|
* Draft the qualifier import resolutionKirill Bulatov2021-03-081-37/+136
|
* Filter out path items by the qualifierKirill Bulatov2021-03-081-24/+15
|
* SimplifyKirill Bulatov2021-03-081-64/+37
|
* Find the code to changeKirill Bulatov2021-03-081-55/+130
|
* Test and initial refactoringKirill Bulatov2021-03-081-85/+65
|
* Use upstream cov-markLaurențiu Nicola2021-03-082-7/+6
|
* Make group imports configurableasv2021-03-072-7/+48
|
* Show docs on hover for keywords and primitivesLukas Wirth2021-03-021-0/+8
|
* De Morgan's Law assist now correctly inverts <, <=, >, >=.lbrande2021-02-241-0/+11
|
* .Aleksey Kladov2021-01-191-1/+1
|
* Merge #7297 #7338bors[bot]2021-01-181-129/+227
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7297: Propose trait associated items and autoimport traits on completion r=matklad a=SomeoneToIgnore ![trait_imports](https://user-images.githubusercontent.com/2690773/104819998-6faeb480-583a-11eb-8b45-b7351b51b90e.gif) Closes #7248 7338: Parse `impl const Trait` r=Veykril a=Veykril Closes #7313 bors r+ Co-authored-by: Kirill Bulatov <[email protected]> Co-authored-by: Lukas Wirth <[email protected]>
| * Do trait solving in batchKirill Bulatov2021-01-171-95/+97
| |
| * Draft the working completionKirill Bulatov2021-01-171-10/+20
| |
| * Add flyimport completion for trait assoc itemsKirill Bulatov2021-01-161-100/+186
| |
* | Merge #7292bors[bot]2021-01-181-1/+1
|\ \ | |/ |/| | | | | | | | | | | | | | | 7292: Swap assert_eq_text\!(expected, actual) r=matklad a=u5surf Fixes #7283 Swap assert_eq_text parameters in the order (expected, actual) Co-authored-by: yugo-horie <[email protected]>
| * Swap assert_eq_text\!(expected, actual)yugo-horie2021-01-161-1/+1
| |
* | Share import_assets and related entitiesKirill Bulatov2021-01-162-0/+273
|/