aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert ide highlighting changes (addressing on another branch)Paul Daniel Faria2020-06-271-4/+0
|
* Add HighlightTag::Operator, use it for unsafe deref. Move unsafe validation ↵Paul Daniel Faria2020-06-271-3/+5
| | | | to its own file
* Move diagnostics back into expr, add tests for diagnostics, fix logic to ↵Paul Daniel Faria2020-06-272-53/+2
| | | | account for derefs of raw ptrs
* Add unsafe diagnostics and unsafe highlightingPaul Daniel Faria2020-06-272-1/+54
|
* Measure ItemTree query memory usageJonas Schievink2020-06-241-2/+2
|
* draw the rest of the owlJonas Schievink2020-06-241-6/+4
|
* Remove raw item queryJonas Schievink2020-06-241-2/+2
|
* New VFSAleksey Kladov2020-06-231-1/+9
|
* Enum variants with `Self::[variant]` now resolve (#4879)BGluth2020-06-221-0/+30
|
* Merge #4947bors[bot]2020-06-201-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4947: Replace `impls_in_trait` query with smarter use of `CrateImplDefs` r=matklad a=jonas-schievink `impls_in_trait` was allocating a whopping ~400 MB of RAM when running analysis-stats on r-a itself. Remove it, instead adding a query that computes a summary `CrateImplDefs` map for all transitive dependencies. This can probably still be made more efficient, but this already reduces the peak memory usage by 25% without much performance impact on analysis-stats. **Before**: ``` Total: 34.962107188s, 2083mb allocated 2141mb resident 422mb ImplsForTraitQuery (deps) 250mb CrateDefMapQueryQuery 147mb MacroArgQuery 140mb TraitSolveQuery (deps) 68mb InferQueryQuery (deps) 62mb ImplDatumQuery (deps) ``` **After**: ``` Total: 35.261100358s, 1520mb allocated 1569mb resident 250mb CrateDefMapQueryQuery 147mb MacroArgQuery 144mb TraitSolveQuery (deps) 68mb InferQueryQuery (deps) 61mb ImplDatumQuery (deps) 45mb BodyQuery 45mb ImplDatumQuery ``` Co-authored-by: Jonas Schievink <[email protected]>
| * Add new query to statsJonas Schievink2020-06-191-4/+4
| |
| * Replace `impls_in_trait` with `CrateImplDefs`Jonas Schievink2020-06-191-4/+4
| |
* | Merge #4851bors[bot]2020-06-192-2/+23
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4851: Add quickfix to add a struct field r=TimoFreiberg a=TimoFreiberg Related to #4563 I created a quickfix for record literals first because the NoSuchField diagnostic was already there. To offer that quickfix for FieldExprs with unknown fields I'd need to add a new diagnostic (or create a `NoSuchField` diagnostic for those cases) I think it'd make sense to make this a snippet completion (to select the generated type), but this would require changing the `Analysis` API and I'd like some feedback before I touch that. Co-authored-by: Timo Freiberg <[email protected]>
| * | Add quickfix to add a struct fieldTimo Freiberg2020-06-122-2/+23
| |/
* | Apply suggestions from code reviewvsrs2020-06-181-35/+50
| |
* | Add Type::walk methodvsrs2020-06-181-71/+59
| |
* | Remove AdtOrTraitvsrs2020-06-182-33/+26
| |
* | Fix type "items" order.vsrs2020-06-181-7/+18
| |
* | Add `Go to Type Definition` hover action.vsrs2020-06-182-6/+110
|/
* Merge #4843bors[bot]2020-06-112-2/+4
|\ | | | | | | | | | | | | | | | | | | | | 4843: Don't guess macro expansion crate r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * Don't guess macro expansion crateAleksey Kladov2020-06-112-2/+4
| |
* | Respect casing when searching for importsJonas Schievink2020-06-101-1/+1
| |
* | Limit import map queriesJonas Schievink2020-06-101-6/+10
| |
* | ra_hir: expose `import_map::search_dependencies`Jonas Schievink2020-06-101-0/+14
|/
* Merge #4689bors[bot]2020-06-051-2/+2
|\ | | | | | | | | | | | | | | | | | | | | 4689: Implement return position impl trait / opaque type support r=matklad a=flodiebold This is working, but I'm not that happy with how the lowering works. We might need an additional representation between `TypeRef` and `Ty` where names are resolved and `impl Trait` bounds are separated out, but things like inference variables don't exist and `impl Trait` is always represented the same way. Also note that this doesn't implement correct handling of RPIT *inside* the function (which involves turning the `impl Trait`s into variables and creating obligations for them). That intermediate representation might help there as well. Co-authored-by: Florian Diebold <[email protected]> Co-authored-by: Florian Diebold <[email protected]>
| * Review fixesFlorian Diebold2020-06-051-2/+2
| |
* | Measure memory usage of ImportMapJonas Schievink2020-06-051-5/+5
|/
* Add highlight support for unsafe fn calls and raw ptr derefPaul Daniel Faria2020-06-021-0/+8
|
* Merge #4592bors[bot]2020-05-271-0/+1
|\ | | | | | | | | | | | | | | 4592: fix textedit range returned for completion when left token is a keyword r=bnjjj a=bnjjj close #4545 Co-authored-by: Benjamin Coenen <[email protected]>
| * fix textedit range returned for completion when left token is a keyword #4545Benjamin Coenen2020-05-241-0/+1
| | | | | | | | Signed-off-by: Benjamin Coenen <[email protected]>
* | Pass trivially copy types as copykjeremy2020-05-261-9/+9
| |
* | add support of feature flag for runnables #4464Benjamin Coenen2020-05-211-0/+1
|/ | | | Signed-off-by: Benjamin Coenen <[email protected]>
* Add doc comment for resolve_hir_path_qualifierHasan Ali2020-05-161-0/+13
|
* Fix completion and hover for module and function of same nameHasan Ali2020-05-162-1/+56
|
* Handle `Self` in values and patternsFlorian Diebold2020-05-151-0/+1
| | | | | | | | | I.e. - `Self(x)` or `Self` in tuple/unit struct impls - `Self::Variant(x)` or `Self::Variant` in enum impls - the same in patterns Fixes #4454.
* Ty -> TypeFedor Sakharov2020-05-141-2/+7
|
* Adds a param_idx helperFedor Sakharov2020-05-141-2/+2
|
* Use generic_defaults and display_source_codeFedor Sakharov2020-05-141-3/+4
|
* Correctly fill default type parametersFedor Sakharov2020-05-131-0/+5
|
* Merge #4421bors[bot]2020-05-111-0/+20
|\ | | | | | | | | | | | | | | | | | | | | | | | | 4421: Find references to a function outside module r=flodiebold a=montekki Fixes #4188 Yet again, it looks like although the code in https://github.com/rust-analyzer/rust-analyzer/blob/da1f316b0246ce41d7cb8560181e294089f06ef3/crates/ra_ide_db/src/search.rs#L128-L132 may be wrong, it is not hit since the `vis` is `None` at this point. The fix is similar to the #4237 case: just add another special case to `Definition::visibility()`. Co-authored-by: Fedor Sakharov <[email protected]>
| * New definition_visibility methodFedor Sakharov2020-05-111-0/+20
| |
* | Highlight mutable statics as mutableMatthew Jasper2020-05-101-0/+4
|/
* New HirDisplay method for displaying sourcecodeTimo Freiberg2020-05-081-3/+6
|
* Rename ImplItem to AssocItemEdwin Cheng2020-05-051-1/+1
|
* Propose custom derives in completionKirill Bulatov2020-05-021-8/+7
|
* Merge #4234bors[bot]2020-05-021-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | 4234: Support local_inner_macros r=jonas-schievink a=edwin0cheng This PR implements `#[macro_export(local_inner_macros)]` support. Note that the rustc implementation is quite [hacky][1] too. :) [1]: https://github.com/rust-lang/rust/blob/614f273e9388ddd7804d5cbc80b8865068a3744e/src/librustc_resolve/macros.rs#L456 Co-authored-by: Edwin Cheng <[email protected]>
| * Support local_inner_macrosEdwin Cheng2020-05-011-1/+1
| |
* | Remove lower_path from AssistCtx to SemanticEdwin Cheng2020-05-011-1/+6
| |
* | Introduce LowerCtx for path loweringEdwin Cheng2020-05-012-2/+4
|/
* ?Jonas Schievink2020-04-291-5/+1
|