Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | Shortcut `block_def_map` if there's no inner items | Jonas Schievink | 2021-02-03 | 5 | -11/+26 | |
| | | | | | This previously didn't work, but apparently only because of the wonky test setup | |||||
* | Use body lowering for block_def_map tests | Jonas Schievink | 2021-02-03 | 3 | -68/+117 | |
| | | | | Removes the hacky and buggy custom lowering code | |||||
* | Use block_def_map in body lowering | Jonas Schievink | 2021-02-03 | 5 | -25/+39 | |
| | ||||||
* | Fix resolution of `crate` paths from within blocks | Jonas Schievink | 2021-02-02 | 2 | -2/+7 | |
| | | | | | They resolve to the crate root, not the DefMap's root module (which can be a block) | |||||
* | Use the right `DefMap` when looking up modules | Jonas Schievink | 2021-02-02 | 3 | -2/+20 | |
| | ||||||
* | Revert "Use block_def_map in body lowering" | Jonas Schievink | 2021-02-02 | 9 | -160/+95 | |
| | ||||||
* | Shortcut `block_def_map` if there's no inner items | Jonas Schievink | 2021-02-01 | 1 | -2/+4 | |
| | | | | | This previously didn't work, but apparently only because of the wonky test setup | |||||
* | Use body lowering for block_def_map tests | Jonas Schievink | 2021-02-01 | 3 | -68/+117 | |
| | | | | Removes the hacky and buggy custom lowering code | |||||
* | Use block_def_map in body lowering | Jonas Schievink | 2021-02-01 | 5 | -25/+39 | |
| | ||||||
* | Merge #7503 | bors[bot] | 2021-01-31 | 1 | -1/+9 | |
|\ | | | | | | | | | | | | | | | 7503: Return inner attributes of outline mod declarations in `attrs_query` r=jonas-schievink a=Veykril Co-authored-by: Lukas Wirth <[email protected]> | |||||
| * | Return inner attributes of outline mod declarations in `attrs_query` | Lukas Wirth | 2021-01-31 | 1 | -1/+9 | |
| | | ||||||
* | | Honor #![macro_use] in mod source files | Lukas Wirth | 2021-01-31 | 2 | -8/+23 | |
|/ | ||||||
* | Fix incorrect `FileId` and remove broken shortcut | Jonas Schievink | 2021-01-28 | 2 | -16/+9 | |
| | | | | | Apparently we were using the crate's root file instead of the file containing the block. | |||||
* | block_def_map: add a few macro tests | Jonas Schievink | 2021-01-28 | 1 | -0/+63 | |
| | ||||||
* | Update `original_module` when ascending `DefMap`s | Jonas Schievink | 2021-01-28 | 1 | -2/+5 | |
| | ||||||
* | ItemTree: Treat items in `MacroStmts` as top-level | Jonas Schievink | 2021-01-28 | 2 | -4/+32 | |
| | ||||||
* | Fix legacy macro resolution in block expressions | Jonas Schievink | 2021-01-27 | 2 | -1/+15 | |
| | ||||||
* | add more counts | Aleksey Kladov | 2021-01-27 | 2 | -0/+4 | |
| | ||||||
* | Traverse parent DefMap for `super` paths | Jonas Schievink | 2021-01-25 | 2 | -9/+54 | |
| | ||||||
* | Intern block locations and handle them in ModuleId | Jonas Schievink | 2021-01-25 | 5 | -65/+104 | |
| | ||||||
* | Merge #7426 | bors[bot] | 2021-01-25 | 8 | -63/+33 | |
|\ | | | | | | | | | | | | | | | | | | | | | 7426: Create all `ModuleId`s through a `DefMap` method r=jonas-schievink a=jonas-schievink `ModuleId` needs to be able to represent blocks, and only the associated `DefMap` will know how to construct that `ModuleId` bors r+ Co-authored-by: Jonas Schievink <[email protected]> | |||||
| * | Create all `ModuleId`s through a `DefMap` method | Jonas Schievink | 2021-01-25 | 8 | -63/+33 | |
| | | | | | | | | | | `ModuleId` needs to be able to represent blocks, and only the associated `DefMap` will know how to construct that `ModuleId` | |||||
* | | Derive Default on ItemTree | Laurențiu Nicola | 2021-01-25 | 2 | -12/+3 | |
|/ | ||||||
* | Identify methods using functions ids rather than string names | Phil Ellison | 2021-01-23 | 1 | -0/+1 | |
| | ||||||
* | Merge #7391 | bors[bot] | 2021-01-23 | 2 | -0/+24 | |
|\ | | | | | | | | | | | | | | | 7391: Fix error when using "extern crate self as" r=kazatsuyu a=kazatsuyu Fix #6957 Co-authored-by: kazatsuyu <[email protected]> | |||||
| * | Add mark::check! and mark::hit! | kazatsuyu | 2021-01-22 | 2 | -0/+2 | |
| | | ||||||
| * | cargo fmt | kazatsuyu | 2021-01-22 | 1 | -2/+3 | |
| | | ||||||
| * | Fix error when using "extern crate self as" | kazatsuyu | 2021-01-22 | 2 | -0/+21 | |
| | | ||||||
* | | Make `ModuleId`'s `krate` field private | Jonas Schievink | 2021-01-22 | 1 | -1/+9 | |
| | | ||||||
* | | Obtain `ModuleId`'s `DefMap` through a method | Jonas Schievink | 2021-01-22 | 10 | -17/+27 | |
| | | ||||||
* | | Fix broken link in intra-doc | Daiki Ihara | 2021-01-22 | 1 | -0/+13 | |
|/ | ||||||
* | Remove unused field | Jonas Schievink | 2021-01-21 | 1 | -4/+0 | |
| | ||||||
* | Add test for path resolution bug | Jonas Schievink | 2021-01-21 | 1 | -8/+33 | |
| | ||||||
* | Revert "Make use of `block_def_map` in body lowering" | Jonas Schievink | 2021-01-21 | 3 | -19/+18 | |
| | ||||||
* | Merge #7378 | bors[bot] | 2021-01-21 | 2 | -1/+12 | |
|\ | | | | | | | | | | | | | | | 7378: Include `countme` crate to count important data structures. r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]> | |||||
| * | Include `countme` crate to count important data structures. | Aleksey Kladov | 2021-01-21 | 2 | -1/+12 | |
| | | ||||||
* | | Make use of `block_def_map` in body lowering | Jonas Schievink | 2021-01-21 | 3 | -18/+19 | |
| | | | | | | | | | | Removes the `local_scope` hack from `Expander` in favor of tracking the `DefMap` in use during body lowering | |||||
* | | Remove unnecessary annotations from tests | Jonas Schievink | 2021-01-21 | 1 | -4/+0 | |
|/ | ||||||
* | Add test for nameres in nested blocks | Jonas Schievink | 2021-01-21 | 1 | -0/+29 | |
| | ||||||
* | Add test that merges inner and outer names | Jonas Schievink | 2021-01-21 | 1 | -0/+25 | |
| | ||||||
* | Fix lowering with multiple block expressions | Jonas Schievink | 2021-01-21 | 1 | -15/+23 | |
| | ||||||
* | Fall back to parent DefMaps when resolving paths | Jonas Schievink | 2021-01-21 | 1 | -0/+37 | |
| | ||||||
* | Add name resolution query for block expressions | Jonas Schievink | 2021-01-21 | 6 | -36/+198 | |
| | ||||||
* | Treat BlockExpr as a potential module origin | Jonas Schievink | 2021-01-20 | 2 | -2/+11 | |
| | ||||||
* | DefMap: hide remaining crate-visible fields | Jonas Schievink | 2021-01-20 | 4 | -11/+23 | |
| | ||||||
* | Merge #7359 | bors[bot] | 2021-01-20 | 2 | -26/+35 | |
|\ | | | | | | | | | | | | | | | | | | | 7359: ItemTree: store a mapping from blocks to inner items r=jonas-schievink a=jonas-schievink To do name resolution within block expressions, we need to know which inner items are located inside each block expression. This adds such a mapping to `ItemTree`, replacing the previous one, which was seemingly unused other than to access all the inner items. This also assigns `AstId`s to block expressions, which is needed to store the mapping in salsa. Co-authored-by: Jonas Schievink <[email protected]> | |||||
| * | Create a mapping from blocks to inner items | Jonas Schievink | 2021-01-20 | 2 | -26/+35 | |
| | | ||||||
* | | Make public DefMap fields private | Jonas Schievink | 2021-01-20 | 5 | -14/+22 | |
| | | ||||||
* | | Show const params in completions | Lukas Wirth | 2021-01-19 | 1 | -9/+16 | |
|/ | ||||||
* | Merge #7336 | bors[bot] | 2021-01-18 | 9 | -36/+32 | |
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | 7336: Rename `CrateDefMap` to `DefMap` r=matklad a=jonas-schievink I propose handling local items by computing a `DefMap` for every block expression, using the regular (early) name resolution algorithm. The result of that will be a `DefMap` that has a reference to the parent `DefMap`, which is either the one computed for the containing block expression, or the crate's root `DefMap`. Name resolution will fall back to a name in the parent `DefMap` if it cannot be resolved in the inner block. The `DefMap`s computed for block expressions will go through a separate query that can be garbage-collected much more aggressively, since these `DefMap`s should be cheap to compute and are never part of a crate's public API. The first step towards that is to make `CrateDefMap` not specific to crates anymore, hence this rename (if this plans sounds reasonable). cc https://github.com/rust-analyzer/rust-analyzer/issues/7325 and https://github.com/rust-analyzer/rust-analyzer/issues/1165 Co-authored-by: Jonas Schievink <[email protected]> |