aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * | Don't reexport generics from HIRAleksey Kladov2019-11-115-12/+13
|/ /
* | Merge #2200bors[bot]2019-11-1114-173/+171
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | 2200: Add variables to HIR r=matklad a=matklad Introduce a `hir::Variable`, which should cover locals, parameters and `self`. Unlike `PatId`, variable knows it's owner so it is self-contained, and should be more convenient to use from `ra_ide_api`. The goal here is to hide more details about `Body` from hir, which should make it easier to move `Body` into `hir_def`. I don't think that `ra_ide_api` intrracts with bodies directly at the moment anyway, but the glue layer is based basically on `ast::BindPat`, which seems pretty brittle. Co-authored-by: Aleksey Kladov <[email protected]>
| * | Add hir::LocalAleksey Kladov2019-11-1114-173/+171
| | |
* | | Merge #2205bors[bot]2019-11-119-22/+458
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2205: Implement bulitin line! macro r=matklad a=edwin0cheng This PR implements bulitin macro `line!` and add basic infra-structure for other bulitin macros: 1. Extend `MacroDefId` to support builtin macros 2. Add a `quote!` macro for simple quasi quoting. Note that for support others builtin macros, eager macro expansion have to be supported first, this PR not try to handle it. :) Co-authored-by: Edwin Cheng <[email protected]>
| * | Add MacroDefKindEdwin Cheng2019-11-116-51/+29
| | |
| * | Add line macro and testsEdwin Cheng2019-11-113-7/+84
| | |
| * | Add quote macroEdwin Cheng2019-11-112-0/+262
| | |
| * | Add basic bultin macro infrastructureEdwin Cheng2019-11-118-29/+148
| | |
* | | Merge #2211bors[bot]2019-11-111-72/+73
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2211: Refactor highlighting to use classify_name r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * | | Refactor highlighting to use classify_nameAleksey Kladov2019-11-111-72/+73
| | | |
* | | | Merge #2210bors[bot]2019-11-117-177/+200
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2210: Introduce ToNav trait r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * | | Introduce ToNav traitAleksey Kladov2019-11-117-177/+200
|/ / /
* | | Merge #2209bors[bot]2019-11-112-6/+34
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2209: impl fmt::Display for BuiltinType r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * | | impl fmt::Display for BuiltinTypeAleksey Kladov2019-11-112-6/+34
|/ / /
* | | Merge #2203bors[bot]2019-11-111-19/+31
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2203: Hover for builtins r=matklad a=kjeremy Fixes #2192 Co-authored-by: Jeremy Kolb <[email protected]>
| * | | Hover for builtinsJeremy Kolb2019-11-101-19/+31
| | |/ | |/|
* | | Merge #2207bors[bot]2019-11-114-1/+131
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2207: Forbid visibility qualifiers in traits r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * | | Forbid visibility qualifiers in traitsAleksey Kladov2019-11-114-1/+131
|/ / /
* | | Merge #2206bors[bot]2019-11-112-2/+3
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2206: Disable debuginfo in dev builds r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * | | Disable debuginfo in dev buildsAleksey Kladov2019-11-112-2/+3
|/ / / | | | | | | | | | Hopefully, this makes printf debugging faster!
* | | Merge #2204bors[bot]2019-11-111-1/+5
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2204: Make primitive tys public r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * | | Make primitive tys publicAleksey Kladov2019-11-111-1/+5
|/ / /
* | | Merge #2201bors[bot]2019-11-105-6/+112
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2201: Resolve core types r=matklad a=Matthias247 This adds support for completion and goto definition of types defined within the "core" crate. The core crate is added as a dependency to each crate in the project. The core crate exported it's own prelude. This caused now all crates to inherit the core crates prelude instead of the std crates. In order to avoid the problem the prelude resolution has been changed to overwrite an already resolved prelude if this was set to a crate named core - in order to pick a better prelude like std. Fixes #2199 Co-authored-by: Matthias Einwag <[email protected]>
| * | Overwrite the prelude with one defined in a later dependencyMatthias Einwag2019-11-102-9/+8
| | | | | | | | | | | | | | | | | | | | | This removes the special casing for the "core" prelude. Whenever a later dependency also exports a prelude, it will replace the formerly imported prelude. The utilized prelude then depends purely on import order.
| * | Add tests for resolving types in core and std preludesMatthias Einwag2019-11-102-0/+93
| | |
| * | Resolve core typesMatthias Einwag2019-11-093-2/+16
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for completion and goto definition of types defined within the "core" crate. The core crate is added as a dependency to each crate in the project. The core crate exported it's own prelude. This caused now all crates to inherit the core crates prelude instead of the std crates. In order to avoid the problem the prelude resolution has been changed to overwrite an already resolved prelude if this was set to a crate named core - in order to pick a better prelude like std. Fixes #2199
* | Merge #2198bors[bot]2019-11-0910-53/+51
|\ \ | |/ |/| | | | | | | | | | | 2198: Unfork struct and union ids r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * Unfork struct and union idsAleksey Kladov2019-11-0910-53/+51
|/
* Merge #2197bors[bot]2019-11-097-78/+92
|\ | | | | | | | | | | | | | | 2197: Remove typed macro parsing API r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * Remove typed macro parsing APIAleksey Kladov2019-11-096-72/+84
| | | | | | | | | | We do type-erasure on every path anyway, so it doesn't make much sense to duplicate this function for every type
| * Minor cleanupAleksey Kladov2019-11-091-6/+8
|/
* Merge #2169bors[bot]2019-11-098-101/+305
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | 2169: MBE: Mapping spans for goto definition r=matklad a=edwin0cheng Currently, go to definition gives the wrong span in MBE. This PR implement a mapping mechanism to fix it and it could be used for future MBE hygiene implementation. The basic idea of the mapping is: 1. When expanding the macro, generated 2 `TokenMap` which maps the macro args and macro defs between tokens and input text-ranges. 2. Before converting generated `TokenTree` to `SyntaxNode`, generated a `ExpandedRangeMap` which is a mapping between token and output text-ranges. 3. Using these 3 mappings to construct an `ExpansionInfo` which can map between input text ranges and output text ranges. Co-authored-by: Edwin Cheng <[email protected]>
| * Remove map_ranges in RevTokenMapEdwin Cheng2019-11-094-66/+35
| |
| * Refactor and simpfilyEdwin Cheng2019-11-085-89/+42
| |
| * Refactor and add more commentsEdwin Cheng2019-11-082-58/+52
| |
| * Fix formattingEdwin Cheng2019-11-051-1/+1
| |
| * Refactor a bitEdwin Cheng2019-11-042-11/+7
| |
| * Use macro_rules shift to map text rangesEdwin Cheng2019-11-044-51/+26
| |
| * Use ? and destructing to simplifed long codeEdwin Cheng2019-11-041-19/+17
| |
| * Rename and fix typosEdwin Cheng2019-11-044-24/+43
| |
| * Add note for recurseive macro generated codeEdwin Cheng2019-11-041-0/+1
| |
| * Add testsEdwin Cheng2019-11-041-0/+40
| |
| * Use new expansion feature in goto_definitionEdwin Cheng2019-11-042-45/+114
| |
| * Remove dbg!Edwin Cheng2019-11-042-5/+0
| |
| * Fixed bug in ExpandedRangeMapEdwin Cheng2019-11-041-34/+16
| |
| * Add parent_expansion to HirFileIdEdwin Cheng2019-11-041-0/+19
| |
| * Add macro_expansion_info in hir_expandEdwin Cheng2019-11-045-47/+212
| |
| * Add map_id to TokenIdEdwin Cheng2019-11-042-5/+34
| |
* | Merge #2196bors[bot]2019-11-084-281/+304
|\ \ | | | | | | | | | | | | | | | | | | | | | 2196: Touch up nameres doc comment r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * | Touch up nameres doc commentAleksey Kladov2019-11-081-7/+6
| | |