aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_def/src
Commit message (Collapse)AuthorAgeFilesLines
* Support macro for trait itemsEdwin Cheng2020-05-031-82/+67
|
* 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 :)
* / / 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
| | |
* | | Remove dead codeAleksey Kladov2020-04-112-6/+5
| | |
* | | Make records grammar more orthogonalAleksey Kladov2020-04-113-32/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We used name [: expr] grammar before, now it is [name :] expr which makes things simpler
* | | Make incremental nameres test harderAleksey Kladov2020-04-111-0/+6
| | |
* | | Avoid cyclic queries in name resolution when processing enumsAleksey Kladov2020-04-113-15/+48
| | |
* | | Align namingAleksey Kladov2020-04-114-6/+5
| | |
* | | Remove code duplicationAleksey Kladov2020-04-112-5/+2
| | |
* | | Use Expander for cfg handling in structsAleksey Kladov2020-04-111-10/+10
| | |
* | | Use Expander for cfg handling in implsAleksey Kladov2020-04-111-13/+14
| | |
* | | Pull Expander upAleksey Kladov2020-04-113-11/+24
| | |
* | | SimplifyAleksey Kladov2020-04-112-8/+8
| |/ |/|
* | Forward compatAleksey Kladov2020-04-103-7/+7
| |
* | profile queriesAleksey Kladov2020-04-101-0/+5
| |
* | Semicolon tokenAleksey Kladov2020-04-101-1/+1
| |
* | add record pat missing field diagnosticJosh Mcguigan2020-04-102-28/+9
|/