aboutsummaryrefslogtreecommitdiff
path: root/crates/ide_db
Commit message (Collapse)AuthorAgeFilesLines
* Make `ModPath`'s representation privateJonas Schievink2021-02-041-1/+1
|
* Make always-assert crate reusableAleksey Kladov2021-01-261-5/+2
|
* Merge #7406bors[bot]2021-01-261-0/+15
|\ | | | | | | | | | | | | | | 7406: if_let_match: don't assume happy path r=matklad a=bugadani Closes #7392 Co-authored-by: Dániel Buga <[email protected]>
| * replace_if_let_with_match: don't assume sad patternDániel Buga2021-01-221-0/+15
| |
* | Support unions in symbol searchLukas Wirth2021-01-241-5/+9
|/
* Merge #7353bors[bot]2021-01-221-0/+24
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7353: Add LifetimeParam and ConstParam to CompletionItemKind r=matklad a=Veykril Adds `LifetimeParam` and `ConstParam` to `CompletionItemKind` and maps them both to `TypeParam` in the protocol conversion as there are no equivalents, so nothing really changes there. `ConstParam` could be mapped to `Const` I guess but I'm split on whether that would be better? Additions were solely inspired by (the single) test output for const params. Also sorts the variants of `CompletionItemKind` and its to_proto match. Co-authored-by: Lukas Wirth <[email protected]>
| * Partially unify SymbolKind and CompletionItemKindLukas Wirth2021-01-201-14/+14
| |
| * Move SymbolKind to ide_dbLukas Wirth2021-01-201-0/+24
| |
* | Add name resolution query for block expressionsJonas Schievink2021-01-211-0/+1
| |
* | Treat BlockExpr as a potential module originJonas Schievink2021-01-201-0/+10
| |
* | Make public DefMap fields privateJonas Schievink2021-01-201-1/+1
| |
* | .Aleksey Kladov2021-01-193-4/+4
|/
* 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
| |