Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Reuse database in LowerCtx | Jonas Schievink | 2021-05-06 | 1 | -2/+2 |
| | |||||
* | Don't store call-site text offsets in hygiene info | Jonas Schievink | 2021-05-06 | 1 | -12/+18 |
| | |||||
* | Add failing local items test | Jonas Schievink | 2021-04-21 | 2 | -0/+32 |
| | |||||
* | hir_ty: Expand macros at type position | cynecx | 2021-04-17 | 1 | -7/+27 |
| | |||||
* | Include path in `unresolved-macro-call` diagnostic | Jonas Schievink | 2021-04-16 | 2 | -3/+7 |
| | |||||
* | Support macros in pattern position | Jonas Schievink | 2021-04-11 | 1 | -7/+27 |
| | |||||
* | Update `OUT_DIR` diagnostic to match setting | Jonas Schievink | 2021-04-07 | 1 | -1/+1 |
| | |||||
* | Intern TypeRefs stored in Body | Jonas Schievink | 2021-04-06 | 1 | -4/+7 |
| | | | | Minor improvement to memory usage (1 MB or so) | ||||
* | Use Box'es to reduce the size of hir_def::expr::Pat from 112 to 64 bytes on ↵ | Alexandru Macovei | 2021-04-06 | 1 | -3/+3 |
| | | | | 64bit | ||||
* | Use Box'es to reduce size of hir_def::expr::Expr from 128 to 72 bytes (on ↵ | Alexandru Macovei | 2021-04-06 | 1 | -6/+10 |
| | | | | | | | | | | 64bit systems) Rationale: only a minority of variants used almost half the size. By keeping large members (especially in Option) behind a box the memory cost is only payed when the large variants are needed. This reduces the size Vec<Expr> needs to allocate. | ||||
* | Only remember blocks that have a DefMap | Jonas Schievink | 2021-04-04 | 1 | -5/+7 |
| | |||||
* | Fix recursive macro statement expansion | Edwin Cheng | 2021-03-25 | 1 | -35/+33 |
| | |||||
* | Fix incorrect scoping in while expressions | Lukas Wirth | 2021-03-21 | 1 | -1/+1 |
| | |||||
* | Track labels in scopes | Lukas Wirth | 2021-03-21 | 1 | -10/+47 |
| | |||||
* | Improve diagnostic when including nonexistent file | Jonas Schievink | 2021-03-17 | 1 | -1/+1 |
| | |||||
* | Handle `#[cfg]` on call arguments | Jonas Schievink | 2021-03-17 | 1 | -11/+16 |
| | |||||
* | Merge #8048 | bors[bot] | 2021-03-17 | 3 | -3/+30 |
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8048: Fix missing unresolved macro diagnostic in function body r=edwin0cheng a=brandondong This was an issue I found while working on https://github.com/rust-analyzer/rust-analyzer/pull/7970. **Reproduction:** 1. Call a non-existent macro in a function body. ``` fn main() { foo!(); } ``` 2. No diagnostics are raised. An unresolved-macro-call diagnostic is expected. 3. If the macro call is instead outside of the function body, this works as expected. I believe this worked previously and regressed in https://github.com/rust-analyzer/rust-analyzer/pull/7805. **Behavior prior to https://github.com/rust-analyzer/rust-analyzer/pull/7805:** - The unresolved-macro-call diagnostic did not exist. Instead, a macro-error diagnostic would be raised with the text "could not resolve macro [path]". - This was implemented by adding an error to the error sink (https://github.com/rust-analyzer/rust-analyzer/pull/7805/files#diff-50a326c5ae465bd9b31ee4310186380aa06e4fa1f6b41dbc0aed5bcc656a3cb8L657). - The error was propagated through https://github.com/rust-analyzer/rust-analyzer/blob/1a82af3527e476d52410ff4dfd2fb4c57466abcb/crates/hir_def/src/body.rs#L123 eventually reaching https://github.com/rust-analyzer/rust-analyzer/blob/1a82af3527e476d52410ff4dfd2fb4c57466abcb/crates/hir_def/src/body/lower.rs#L569. **Behavior after:** - Instead of writing to the error sink, an UnresolvedMacro error is now returned (https://github.com/rust-analyzer/rust-analyzer/pull/7805/files#diff-50a326c5ae465bd9b31ee4310186380aa06e4fa1f6b41dbc0aed5bcc656a3cb8R631). - The parent caller throws away the error as its function signature is `Option<MacroCallId>` (https://github.com/rust-analyzer/rust-analyzer/pull/7805/files#diff-50a326c5ae465bd9b31ee4310186380aa06e4fa1f6b41dbc0aed5bcc656a3cb8R604). - We instead now reach the warn condition (https://github.com/rust-analyzer/rust-analyzer/blob/1a82af3527e476d52410ff4dfd2fb4c57466abcb/crates/hir_def/src/body.rs#L124) and no diagnostics are created in https://github.com/rust-analyzer/rust-analyzer/blob/1a82af3527e476d52410ff4dfd2fb4c57466abcb/crates/hir_def/src/body/lower.rs#L575. **Fix:** - Make sure to propagate the UnresolvedMacro error. Report the error using the new unresolved-macro-call diagnostic. Co-authored-by: Brandon <[email protected]> | ||||
| * | Fix missing unresolved macro diagnostic in function body | Brandon | 2021-03-16 | 3 | -3/+30 |
| | | |||||
* | | Fix macro expansion for statements w/o semicolon | Edwin Cheng | 2021-03-16 | 1 | -47/+58 |
|/ | |||||
* | Simplify source maps for fields | Aleksey Kladov | 2021-03-15 | 1 | -15/+9 |
| | |||||
* | Stop fetching ItemTrees for no reason | Jonas Schievink | 2021-03-10 | 1 | -14/+1 |
| | |||||
* | Remove `item_scope` field from `Body` | Jonas Schievink | 2021-03-09 | 1 | -139/+4 |
| | |||||
* | Store inner `BlockId`s in `Body` | Jonas Schievink | 2021-03-09 | 1 | -0/+3 |
| | |||||
* | Use upstream cov-mark | Laurențiu Nicola | 2021-03-08 | 4 | -11/+9 |
| | |||||
* | Merge #7804 | bors[bot] | 2021-02-28 | 1 | -6/+11 |
|\ | | | | | | | | | | | | | | | 7804: Introduce TypeCtor::Scalar r=lnicola a=Veykril `TypeCtor::Int(..) | TypeCtor::Float(..) | TypeCtor::Char | TypeCtor::Bool` => `TypeCtor::Scalar(..)`, in this case we can actually just straight up use `chalk_ir::Scalar` already since its just a POD without any IDs or anything. Co-authored-by: Lukas Wirth <[email protected]> | ||||
| * | Introduce TypeCtor::Scalar | Lukas Wirth | 2021-02-28 | 1 | -6/+11 |
| | | |||||
* | | Restrict visibilities to the containing DefMap | Jonas Schievink | 2021-02-28 | 1 | -0/+29 |
|/ | |||||
* | Add another block def map test | Jonas Schievink | 2021-02-09 | 1 | -0/+27 |
| | |||||
* | Add `TestDB::module_at_position` | Jonas Schievink | 2021-02-09 | 1 | -100/+4 |
| | |||||
* | Add expression scopes for blocks | Jonas Schievink | 2021-02-09 | 1 | -4/+18 |
| | |||||
* | Test `super` resolution too | Jonas Schievink | 2021-02-05 | 1 | -0/+2 |
| | |||||
* | Fix resolution of `self` module within blocks | Jonas Schievink | 2021-02-05 | 1 | -6/+8 |
| | |||||
* | Remove redundant clones | Yoshua Wuyts | 2021-02-05 | 1 | -1/+1 |
| | |||||
* | Expander: store a LocalModuleId, not ModuleId | Jonas Schievink | 2021-02-04 | 1 | -7/+7 |
| | | | | | It already stores the DefMap containing the module, so having a full ModuleId is unnecessary and makes it easier to mix things up | ||||
* | Don't keep the parent DefMap alive via Arc | Jonas Schievink | 2021-02-04 | 1 | -4/+3 |
| | | | | | This seems like it could easily leak a lot of memory since we don't currently run GC | ||||
* | Add newline between block and crate maps | Jonas Schievink | 2021-02-03 | 1 | -0/+10 |
| | |||||
* | Test for name resolution with DefMap shortcut | Jonas Schievink | 2021-02-03 | 1 | -0/+33 |
| | |||||
* | Shortcut `block_def_map` if there's no inner items | Jonas Schievink | 2021-02-03 | 2 | -5/+8 |
| | | | | | 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 | 2 | -2/+301 |
| | | | | Removes the hacky and buggy custom lowering code | ||||
* | Use block_def_map in body lowering | Jonas Schievink | 2021-02-03 | 1 | -10/+25 |
| | |||||
* | Revert "Use block_def_map in body lowering" | Jonas Schievink | 2021-02-02 | 3 | -326/+12 |
| | |||||
* | Use body lowering for block_def_map tests | Jonas Schievink | 2021-02-01 | 2 | -2/+301 |
| | | | | Removes the hacky and buggy custom lowering code | ||||
* | Use block_def_map in body lowering | Jonas Schievink | 2021-02-01 | 1 | -10/+25 |
| | |||||
* | add more counts | Aleksey Kladov | 2021-01-27 | 1 | -0/+2 |
| | |||||
* | 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 | 1 | -12/+4 |
| | |||||
* | Make use of `block_def_map` in body lowering | Jonas Schievink | 2021-01-21 | 1 | -4/+12 |
| | | | | | Removes the `local_scope` hack from `Expander` in favor of tracking the `DefMap` in use during body lowering | ||||
* | Add support for yiled keyword | Daiki Ihara | 2021-01-15 | 1 | -0/+4 |
| | |||||
* | prepare to publish el libro de arena | Aleksey Kladov | 2021-01-14 | 2 | -2/+2 |
| | |||||
* | Fixed typos in code comments | Vincent Esche | 2021-01-09 | 1 | -2/+2 |
| |