aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_def
Commit message (Collapse)AuthorAgeFilesLines
* Highlight mutable statics as mutableMatthew Jasper2020-05-102-8/+29
|
* Rename ImplItem to AssocItemEdwin Cheng2020-05-051-9/+9
|
* Merge #4305bors[bot]2020-05-056-28/+61
|\ | | | | | | | | | | | | | | 4305: Favor types for record type struct in name resolution r=matklad a=edwin0cheng Fixed #4235 Co-authored-by: Edwin Cheng <[email protected]>
| * invert ifEdwin Cheng2020-05-051-3/+3
| |
| * Change union resolve types onlyEdwin Cheng2020-05-042-2/+2
| |
| * Change favor_types to has_constructorEdwin Cheng2020-05-043-9/+9
| |
| * Remove unused importEdwin Cheng2020-05-041-2/+2
| |
| * Fix testEdwin Cheng2020-05-041-16/+16
| |
| * Favor types for Record in name resolutionEdwin Cheng2020-05-044-12/+45
| |
* | refactor: use attrsOwner directly in is_cfg_enabledBenjamin Coenen2020-05-054-22/+15
| | | | | | | | Signed-off-by: Benjamin Coenen <[email protected]>
* | Merge #4283bors[bot]2020-05-041-86/+60
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4283: Support macro for trait items r=matklad a=edwin0cheng Fixed #4039 r? @flodiebold Co-authored-by: Edwin Cheng <[email protected]> Co-authored-by: Edwin Cheng <[email protected]>
| * | Fixes names for collect_item funtionsEdwin Cheng2020-05-041-25/+14
| | |
| * | Support macro for trait itemsEdwin Cheng2020-05-031-82/+67
| |/
* / add support of cfg attributes on enum variants #4279Benjamin Coenen2020-05-031-1/+7
|/ | | | Signed-off-by: Benjamin Coenen <[email protected]>
* Merge #4234bors[bot]2020-05-026-5/+80
|\ | | | | | | | | | | | | | | | | | | | | | | 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]>
| * Test whether it is bang macro properlyEdwin Cheng2020-05-021-8/+6
| |
| * Add test in name resolutionsEdwin Cheng2020-05-021-0/+37
| |
| * Make AttrQuery copyableEdwin Cheng2020-05-012-10/+15
| |
| * Support local_inner_macrosEdwin Cheng2020-05-014-7/+42
| |
* | Introduce EffectExprAleksey Kladov2020-05-021-11/+13
| |
* | Revert "Merge #4233"Aleksey Kladov2020-05-022-0/+8
| | | | | | | | | | This reverts commit a5f2b16366f027ad60c58266a66eb7fbdcbda9f9, reversing changes made to c96b2180c1c4206a0a98c280b4d30897eb116336.
* | Introduce LowerCtx for path loweringEdwin Cheng2020-05-018-73/+158
|/
* Kill more zombiesAleksey Kladov2020-04-301-4/+0
|
* Remove dead code, which elaborately pretends to be aliveAleksey Kladov2020-04-301-4/+0
|
*-----. Merge #4113 #4136 #4141 #4142bors[bot]2020-04-252-1/+5
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4113: Support returning non-hierarchical symbols r=matklad a=kjeremy If `hierarchicalDocumentSymbolSupport` is not true in the client capabilites then it does not support the `DocumentSymbol[]` return type from the `textDocument/documentSymbol` request and we must fall back to `SymbolInformation[]`. This is one of the few requests that use the client capabilities to differentiate between return types and could cause problems for clients. See https://github.com/microsoft/language-server-protocol/pull/538#issuecomment-442510767 for more context. Found while looking at #144 4136: add support for cfg feature attributes on expression #4063 r=matklad a=bnjjj close issue #4063 4141: Fix typo r=matklad a=Veetaha 4142: Remove unnecessary async from vscode language client creation r=matklad a=Veetaha Co-authored-by: kjeremy <[email protected]> Co-authored-by: Benjamin Coenen <[email protected]> Co-authored-by: veetaha <[email protected]>
| | | * | Fix typoveetaha2020-04-251-1/+1
| | | |/
| | * / add support for cfg feature attributes on expression #4063Benjamin Coenen2020-04-251-0/+4
| | |/ | | | | | | | | | Signed-off-by: Benjamin Coenen <[email protected]>
* | / Prefer core/alloc paths on #![no_std]Jonas Schievink2020-04-252-14/+87
| |/ |/|
* | Rename StructField -> FieldAleksey Kladov2020-04-256-24/+24
| |
* | Convert tests to text-sizeAleksey Kladov2020-04-251-1/+1
|/
* Record definitions in `extern` blocksJonas Schievink2020-04-232-3/+38
|
* Remove SyntaxPtr::range from more placesAleksey Kladov2020-04-231-2/+5
|
* Some clippy fixesJeremy Kolb2020-04-191-5/+3
|
* Correctly infer types in guard expressionsAleksey Kladov2020-04-181-0/+4
| | | | | | | The root cause was that we forgot to add bindings from the arm to the guard expression closes #3980
* find_path: Builtins are always in scopeFlorian Diebold2020-04-182-25/+50
| | | | Fixes #3977.
* Merge #4012bors[bot]2020-04-171-3/+10
|\ | | | | | | | | | | | | | | 4012: fix panic on ellipsis in pattern r=flodiebold a=JoshMcguigan fixes #3999 Co-authored-by: Josh Mcguigan <[email protected]>
| * fix panic on ellipsis in patternJosh Mcguigan2020-04-171-3/+10
| |
* | Simplify Diagnostic structureAleksey Kladov2020-04-172-7/+2
| | | | | | | | | | | | It's not entirely clear what subnode ranges should mean in the presence of macros, so let's leave them out for now. We are not using them heavily anyway.
* | Correctly highlight ranges of diagnostics from macrosAleksey Kladov2020-04-171-3/+3
| | | | | | | | closes #2799
* | Don't expose impl details of SyntaxPtrAleksey Kladov2020-04-174-5/+11
|/
*-. Merge #3966 #3968bors[bot]2020-04-151-4/+14
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3966: Add support for bounds on associated types in trait definitions r=matklad a=flodiebold E.g. ```rust trait Trait { type Item: SomeOtherTrait; } ``` Note that these don't simply desugar to where clauses; as I understand it, where clauses have to be proved by the *user* of the trait, but these bounds are proved by the *implementor*. (Also, where clauses on associated types are unstable.) (Another one from my recursive solver branch...) 3968: Remove format from syntax_bridge hot path r=matklad a=edwin0cheng Although only around 1% speed up by running: ``` Measure-Command {start-process .\target\release\rust-analyzer "analysis-stats -q ." -NoNewWindow -wait} ``` Co-authored-by: Florian Diebold <[email protected]> Co-authored-by: Edwin Cheng <[email protected]>
| * | Add support for bounds on associated types in trait definitionsFlorian Diebold2020-04-131-4/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | E.g. ``` trait Trait { type Item: SomeOtherTrait; } ``` Note that these don't simply desugar to where clauses; as I understand it, where clauses have to be proved by the *user* of the trait, but these bounds are proved by the *implementor*. (Also, where clauses on associated types are unstable.)
| | |
| \ \
*-. \ \ Merge #3964 #3965 #3967bors[bot]2020-04-154-11/+51
|\ \ \ \ | | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3964: Nicer Chalk debug logs r=matklad a=flodiebold I'm looking at a lot of Chalk debug logs at the moment, so here's a few changes to make them slightly nicer... 3965: Implement inline associated type bounds r=matklad a=flodiebold Like `Iterator<Item: SomeTrait>`. This is an unstable feature, but it's used in the standard library e.g. in the definition of Flatten, so we can't get away with not implementing it :) (This is cherry-picked from my recursive solver branch, where it works better, but I did manage to write a test that works with the current Chalk solver as well...) 3967: Handle `Self::Type` in trait definitions when referring to own associated type r=matklad a=flodiebold It was implemented for other generic parameters for the trait, but not for `Self`. (Last one off my recursive solver branch :smile: ) Co-authored-by: Florian Diebold <[email protected]>
| | * | Implement inline associated type boundsFlorian Diebold2020-04-134-11/+51
| |/ / | | | | | | | | | | | | | | | | | | Like `Iterator<Item: SomeTrait>`. This is an unstable feature, but it's used in the standard library e.g. in the definition of Flatten, so we can't get away with not implementing it :)
* | | insta 0.16kjeremy2020-04-141-1/+1
| | |
* | | handle tuple patterns with ellipsisJosh Mcguigan2020-04-132-8/+25
|/ /
* | Align grammar for record patterns and literalsAleksey Kladov2020-04-111-1/+1
| | | | | | | | | | | | The grammar now looks like this [name_ref :] pat
* | Merge #3925bors[bot]2020-04-111-1/+0
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | 3925: Implement assist "Reorder field names" r=matklad a=geoffreycopin This PR implements the "Reorder record fields" assist as discussed in issue #3821 . Adding a `RecordFieldPat` variant to the `Pat` enum seemed like the easiest way to handle the `RecordPat` children as a single sequence of elements, maybe there is a better way ? Co-authored-by: Geoffrey Copin <[email protected]>
| * | Avoid adding a RecordFieldPat variant to the Pat enumGeoffrey Copin2020-04-111-2/+0
| | |
| * | Implement assist "Reorder field names"Geoffrey Copin2020-04-091-1/+2
| | |