Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Global TypeRef/TraitRef interning | Jonas Schievink | 2021-04-01 | 1 | -14/+15 |
| | |||||
* | Rename target_ty to self_ty | Lukas Wirth | 2021-03-29 | 1 | -3/+3 |
| | |||||
* | Lower traits to TraitRef instead of TypeRef | Lukas Wirth | 2021-03-29 | 1 | -2/+2 |
| | |||||
* | Rename `item_tree` query to `file_item_tree` | Jonas Schievink | 2021-03-18 | 1 | -2/+2 |
| | |||||
* | Make `ItemTreeId` its own type | Jonas Schievink | 2021-03-18 | 1 | -10/+10 |
| | |||||
* | Avoid cloning `CfgOptions` | Jonas Schievink | 2021-03-18 | 1 | -2/+3 |
| | |||||
* | Support `#[cfg]` on all associated items | Jonas Schievink | 2021-03-18 | 1 | -5/+5 |
| | |||||
* | Apply `#[cfg]`s when computing function signatures | Jonas Schievink | 2021-03-17 | 1 | -4/+11 |
| | |||||
* | ItemTree: lower attributes on fn parameters | Jonas Schievink | 2021-03-17 | 1 | -3/+15 |
| | |||||
* | Merge #8048 | bors[bot] | 2021-03-17 | 1 | -17/+20 |
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 | 1 | -17/+20 |
| | | |||||
* | | Use hir formatter more | oxalica | 2021-03-15 | 1 | -3/+9 |
| | | |||||
* | | Introduce FunctionQualifier for hir::FunctionData | oxalica | 2021-03-15 | 1 | -5/+5 |
|/ | |||||
* | Delete `ContainerId` | Jonas Schievink | 2021-03-09 | 1 | -2/+2 |
| | |||||
* | Remove redundant clones | Yoshua Wuyts | 2021-02-05 | 1 | -1/+1 |
| | |||||
* | Intern `TypeRef`s in the containing `ItemTree` | Jonas Schievink | 2021-02-04 | 1 | -7/+7 |
| | |||||
* | Use block_def_map in body lowering | Jonas Schievink | 2021-02-03 | 1 | -1/+1 |
| | |||||
* | Revert "Use block_def_map in body lowering" | Jonas Schievink | 2021-02-02 | 1 | -1/+1 |
| | |||||
* | Use block_def_map in body lowering | Jonas Schievink | 2021-02-01 | 1 | -1/+1 |
| | |||||
* | Revert "Make use of `block_def_map` in body lowering" | Jonas Schievink | 2021-01-21 | 1 | -1/+1 |
| | |||||
* | Make use of `block_def_map` in body lowering | Jonas Schievink | 2021-01-21 | 1 | -1/+1 |
| | | | | | Removes the `local_scope` hack from `Expander` in favor of tracking the `DefMap` in use during body lowering | ||||
* | Refactor attributes API to allow handling cfg_attr | Jonas Schievink | 2020-12-18 | 1 | -2/+3 |
| | |||||
* | Ignore extern items in incorrect-case check | Jonas Schievink | 2020-12-10 | 1 | -0/+4 |
| | |||||
* | Emit macro diagnostics when lowering bodies | Jonas Schievink | 2020-11-30 | 1 | -1/+1 |
| | |||||
* | Differentiate method/tymethod by determining 'defaultness' | Zac Pullar-Strecker | 2020-10-08 | 1 | -0/+2 |
| | | | | | | | | | Currently a method only has defaultness if it is a provided trait method, but this will change when specialisation is available and may need to become a concept known to hir. I opted to go for a 'fewest changes' approach given specialisation is still under development. | ||||
* | Lower extern type alias as foreign opaque type. | Charles Lew | 2020-09-16 | 1 | -0/+2 |
| | |||||
* | Rename ra_hir_def -> hir_def | Aleksey Kladov | 2020-08-13 | 1 | -0/+278 |