aboutsummaryrefslogtreecommitdiff
path: root/crates/ide_db
Commit message (Collapse)AuthorAgeFilesLines
* Partially unify SymbolKind and CompletionItemKindLukas Wirth2021-01-201-14/+14
|
* Move SymbolKind to ide_dbLukas Wirth2021-01-201-0/+24
|
* Merge #7297 #7338bors[bot]2021-01-182-158/+274
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-172-16/+30
| |
| * Add flyimport completion for trait assoc itemsKirill Bulatov2021-01-162-130/+230
| |
* | Merge #7291bors[bot]2021-01-181-7/+4
|\ \ | | | | | | | | | | | | | | | | | | | | | 7291: Wrap remaining self/super/crate in Name{Ref} r=matklad a=Veykril That should be the remaining special casing for `self` 🎉 Co-authored-by: Lukas Wirth <[email protected]>
| * | Wrap remaining self/super/crate in Name{Ref}Lukas Wirth2021-01-151-7/+4
| | |
* | | 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-164-2/+278
|/ /
* / Add Unmerge Use assistunexge2021-01-151-1/+1
|/
* Handle self/super/crate in PathSegment as NameRefLukas Wirth2021-01-153-21/+36
|
* Phase out SourceFileEdits in favour of a plain HashMapLukas Wirth2021-01-141-25/+25
|
* Group file source edits by FileIdLukas Wirth2021-01-141-12/+42
|
* Merge #7260bors[bot]2021-01-142-88/+121
|\ | | | | | | | | | | | | | | | | | | | | 7260: Render Fn* trait objects and impl types as rust does r=matklad a=Veykril Also fixes raw ptr impl types being rendered ambiguously with multiple predicates. This moves out the `FamousDefs::Fixture` into its own file as well, cause I figured it is big enough to get its own file at this point + we also get highlighting this way when editing it. Fixes #3012 Co-authored-by: Lukas Wirth <[email protected]>
| * Render Fn* trait objects and impl types as rust doesLukas Wirth2021-01-131-0/+1
| |
| * Move FamousDefs fixture out into its own fileLukas Wirth2021-01-122-88/+120
| |
* | Rename FileReferences -> UsageSearchResultLukas Wirth2021-01-121-6/+5
| |
* | Ensure uniqueness of file ids in reference search via hashmapLukas Wirth2021-01-121-19/+29
| |
* | Group references by FileIdLukas Wirth2021-01-121-37/+64
|/
* Merge #7218bors[bot]2021-01-101-1/+1
|\ | | | | | | | | | | | | | | 7218: Fix typos r=Veykril a=regexident Apart from the very last commit on this PR (which fixes a public type's name) all changes are non-breaking. Co-authored-by: Vincent Esche <[email protected]>
| * Fixed typos in code commentsVincent Esche2021-01-091-1/+1
| |
* | Use hir::GenericParam in ide_db::Definition instead of relisting all 3Lukas Wirth2021-01-102-22/+16
|/
* Merge #7145bors[bot]2021-01-081-0/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7145: Proper handling $crate Take 2 [DO NOT MERGE] r=edwin0cheng a=edwin0cheng Similar to previous PR (#7133) , but improved the following things : 1. Instead of storing the whole `ExpansionInfo`, we store a similar but stripped version `HygieneInfo`. 2. Instread of storing the `SyntaxNode` (because every token we are interested are IDENT), we store the `TextRange` only. 3. Because of 2, we now can put it in Salsa. 4. And most important improvement: Instead of computing the whole frames every single time, we compute it recursively through salsa: (Such that in the best scenario, we only need to compute the first layer of frame) ```rust let def_site = db.hygiene_frame(info.def.file_id); let call_site = db.hygiene_frame(info.arg.file_id); HygieneFrame { expansion: Some(info), local_inner, krate, call_site, def_site } ``` The overall speed compared to previous PR is much faster (65s vs 45s) : ``` [WITH old PR] Database loaded 644.86ms, 284mi Crates in this dir: 36 Total modules found: 576 Total declarations: 11153 Total functions: 8715 Item Collection: 15.78s, 91562mi Total expressions: 240721 Expressions of unknown type: 2635 (1%) Expressions of partially unknown type: 2064 (0%) Type mismatches: 865 Inference: 49.84s, 250747mi Total: 65.62s, 342310mi rust-analyzer -q analysis-stats . 66.72s user 0.57s system 99% cpu 1:07.40 total [WITH this PR] Database loaded 665.83ms, 284mi Crates in this dir: 36 Total modules found: 577 Total declarations: 11188 Total functions: 8743 Item Collection: 15.28s, 84919mi Total expressions: 241229 Expressions of unknown type: 2637 (1%) Expressions of partially unknown type: 2064 (0%) Type mismatches: 868 Inference: 30.15s, 135293mi Total: 45.43s, 220213mi rust-analyzer -q analysis-stats . 46.26s user 0.74s system 99% cpu 47.294 total ``` *HOWEVER*, it is still a perf regression (35s vs 45s): ``` [WITHOUT this PR] Database loaded 657.42ms, 284mi Crates in this dir: 36 Total modules found: 577 Total declarations: 11177 Total functions: 8735 Item Collection: 12.87s, 72407mi Total expressions: 239380 Expressions of unknown type: 2643 (1%) Expressions of partially unknown type: 2064 (0%) Type mismatches: 868 Inference: 22.88s, 97889mi Total: 35.74s, 170297mi rust-analyzer -q analysis-stats . 36.71s user 0.63s system 99% cpu 37.498 total ``` Co-authored-by: Edwin Cheng <[email protected]>
| * Proper handling $crate Take 2Edwin Cheng2021-01-071-0/+1
| |
* | Change <|> to $0 - RebaseKevaundray Wedderburn2021-01-073-37/+37
| |
* | Remove some stale deprecationsAleksey Kladov2021-01-071-1/+0
| |
* | Align config's API with usageAleksey Kladov2021-01-061-2/+18
| | | | | | | | The config now is mostly immutable, optimize for that.
* | Code review fixesKirill Bulatov2021-01-041-3/+18
| |
* | Upgrade expect-test to 1.1Jesse Bakker2021-01-031-1/+1
|/
* Fix type error with .and_thenNick Spain2021-01-021-15/+14
|
* Handle not finding range in Definition::search_scopeNick Spain2021-01-021-12/+36
| | | | | | The `LifetimeParam` and `Local` variants use `source()` to find their range. Now that `source()` returns an `Option` we need to handle the `None` case.
* Mark HasSource::source_old as deprecated but allow at all call sitesNick Spain2021-01-021-0/+2
|
* HasSource::source -> HasSource::source_oldNick Spain2021-01-021-12/+12
| | | | To start migrating HasSource::source to return an Option.
* Merge #7080bors[bot]2021-01-011-2/+11
|\ | | | | | | | | | | | | | | 7080: Implement ConstParams for HIR r=Veykril a=Veykril r? @flodiebold Co-authored-by: Lukas Wirth <[email protected]>
| * Add ConstParams to the ide layerLukas Wirth2021-01-011-2/+11
| |
* | Update crateskjeremy2020-12-301-1/+1
| |
* | Avoid a couple of allocationsLaurențiu Nicola2020-12-291-6/+6
| |
* | Add docs and optimisationsKirill Bulatov2020-12-281-3/+3
| |
* | Better query api and fuzzy searchKirill Bulatov2020-12-281-7/+6
| |
* | Draft the module exclusion in modulesKirill Bulatov2020-12-281-2/+8
|/
* Support labels in reference searchLukas Wirth2020-12-241-5/+13
|
* Add initial_contents field for CreateFileDaiki Ihara2020-12-211-1/+1
|
* Align code_model name with ungrammarAleksey Kladov2020-12-202-3/+3
|
* Don't expose SyntaxKind from IDE APIAleksey Kladov2020-12-181-8/+40
| | | | | | SyntaxKind is somewhat of an internal type, but IDE is using it to basically specify an icon. Let's have a dedicated entity for this instead.
* Do not merge imports with different attributesJesse Bakker2020-12-182-1/+28
|
* Rename ImplDef -> ImplAleksey Kladov2020-12-172-3/+3
| | | | | | We used to have `Def` suffix for all symbols, but we moved off from that. `FunctionDef` isn't better than `Function`. Looks like we've forgot to change `Impl` though!
* Merge #6907bors[bot]2020-12-173-18/+107
|\ | | | | | | | | | | | | | | | | | | 6907: Lifetime reference search r=matklad a=Veykril PR #6787 but rewritten to make use of the HIR now. This only applies to Lifetimes, not labels. Also Higher-Ranked Trait Bounds aren't supported yet, but I feel like this PR is big enough as is which is why I left them out after noticing I forgot about them. Supporting renaming required slight changes in the renaming module as lifetime names aren't allowed for anything but lifetimes(and labels) and vice versa for normal names. Co-authored-by: Lukas Wirth <[email protected]>
| * Lifetime reference searchLukas Wirth2020-12-163-18/+107
| |