Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Work around non-unique AttrIds | Jonas Schievink | 2021-05-22 | 1 | -1/+17 |
| | |||||
* | Don't lower extern block in the ItemTree | Jonas Schievink | 2021-05-21 | 1 | -0/+36 |
| | |||||
* | Support `#[register_attr]` and `#[register_tool]` | Jonas Schievink | 2021-05-20 | 1 | -0/+17 |
| | |||||
* | Refactor name resolution to resolve derive helpers | Jonas Schievink | 2021-05-20 | 1 | -0/+22 |
| | |||||
* | Fix unresolved attribute fallback again | Jonas Schievink | 2021-05-19 | 1 | -0/+29 |
| | |||||
* | Fix derive collection after unresolved attribute fallback | Jonas Schievink | 2021-05-19 | 1 | -1/+21 |
| | |||||
* | Test that none of the macros are reparsed | Jonas Schievink | 2021-05-09 | 1 | -0/+6 |
| | |||||
* | Update crates/hir_def/src/nameres/tests/incremental.rs | Aleksey Kladov | 2021-05-06 | 1 | -1/+1 |
| | | | Co-authored-by: Jonas Schievink <[email protected]> | ||||
* | internal: add failing incremental test | Aleksey Kladov | 2021-05-06 | 1 | -0/+52 |
| | |||||
* | Include path in `unresolved-macro-call` diagnostic | Jonas Schievink | 2021-04-16 | 1 | -2/+2 |
| | |||||
* | Update `OUT_DIR` diagnostic to match setting | Jonas Schievink | 2021-04-07 | 1 | -1/+1 |
| | |||||
* | Allow include! an empty content file | Edwin Cheng | 2021-04-03 | 1 | -0/+20 |
| | |||||
* | Remove unused test fixtures | Edwin Cheng | 2021-03-28 | 1 | -4/+0 |
| | |||||
* | Basic Support Macro 2.0 | Edwin Cheng | 2021-03-27 | 1 | -0/+22 |
| | |||||
* | Expand legacy-scoped macro during collection | Jonas Schievink | 2021-03-21 | 1 | -0/+21 |
| | |||||
* | Fix handling of `#![cfg]` in outline module file | Jonas Schievink | 2021-03-19 | 1 | -0/+19 |
| | |||||
* | Add test | Jonas Schievink | 2021-03-18 | 1 | -0/+26 |
| | |||||
* | Improve diagnostic when including nonexistent file | Jonas Schievink | 2021-03-17 | 1 | -1/+1 |
| | |||||
* | Use first early expansion error during nameres | Jonas Schievink | 2021-03-17 | 1 | -0/+17 |
| | |||||
* | Merge #7970 | bors[bot] | 2021-03-15 | 1 | -0/+45 |
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7970: Fix incorrect diagnostics for failing built in macros r=jonas-schievink a=brandondong **Reproduction:** 1. Use a built in macro in such a way that rust-analyzer fails to expand it. For example: **lib.rs** ``` include!("<valid file but without a .rs extension so it is not indexed by rust-analyzer>"); ``` 2. rust-analyzer highlights the macro call and says the macro itself cannot be resolved even though include! is in the standard library (unresolved-macro-call diagnostic). 3. No macro-error diagnostic is raised. **Root cause for incorrect unresolved-macro-call diagnostic:** 1. collector:collect_macro_call is able to resolve include! in legacy scope but the expansion fails. Therefore, it's pushed into unexpanded_macros to be retried with module scope. 2. include! fails at the resolution step in collector:resolve_macros now that it's using module scope. Therefore, it's retained in unexpanded_macros. 3. Finally, collector:finish tries resolving the remaining unexpanded macros but only with module scope. include! again fails at the resolution step so a diagnostic is created. **Root cause for missing macro-error diagnostic:** 1. In collector:resolve_macros, directive.legacy is None since eager expansion failed in collector:collect_macro_call. The macro_call_as_call_id fails to resolve since we're retrying in module scope. Therefore, collect_macro_expansion is not called for the macro and no macro-error diagnostic is generated. **Fix:** - In collector:collect_macro_call, do not add failing built-in macros to the unexpanded_macros list and immediately raise the macro-error diagnostic. This is in contrast to lazy macros which are resolved in collector::resolve_macros and later expanded in collect_macro_expansion where a macro-error diagnostic may be raised. Co-authored-by: Brandon <[email protected]> Co-authored-by: brandondong <[email protected]> | ||||
| * | Fix incorrect diagnositics for failing built in eager macros | Brandon | 2021-03-14 | 1 | -0/+45 |
| | | |||||
* | | Extend cfg_attr test | Jonas Schievink | 2021-03-13 | 1 | -0/+3 |
|/ | |||||
* | Use upstream cov-mark | Laurențiu Nicola | 2021-03-08 | 4 | -14/+13 |
| | |||||
* | Use body lowering for block_def_map tests | Jonas Schievink | 2021-02-03 | 1 | -186/+0 |
| | | | | Removes the hacky and buggy custom lowering code | ||||
* | Revert "Use block_def_map in body lowering" | Jonas Schievink | 2021-02-02 | 1 | -0/+186 |
| | |||||
* | Use body lowering for block_def_map tests | Jonas Schievink | 2021-02-01 | 1 | -186/+0 |
| | | | | Removes the hacky and buggy custom lowering code | ||||
* | Honor #![macro_use] in mod source files | Lukas Wirth | 2021-01-31 | 1 | -0/+14 |
| | |||||
* | block_def_map: add a few macro tests | Jonas Schievink | 2021-01-28 | 1 | -0/+63 |
| | |||||
* | Traverse parent DefMap for `super` paths | Jonas Schievink | 2021-01-25 | 1 | -0/+26 |
| | |||||
* | Add mark::check! and mark::hit! | kazatsuyu | 2021-01-22 | 1 | -0/+1 |
| | |||||
* | Fix error when using "extern crate self as" | kazatsuyu | 2021-01-22 | 1 | -0/+15 |
| | |||||
* | 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 |
| | |||||
* | Add name resolution query for block expressions | Jonas Schievink | 2021-01-21 | 1 | -0/+47 |
| | |||||
* | Change <|> to $0 - Rebase | Kevaundray Wedderburn | 2021-01-07 | 1 | -2/+2 |
| | |||||
* | Fixed old failed test due to new fixes | Edwin Cheng | 2020-12-28 | 1 | -2/+2 |
| | |||||
* | fixture -> ra_fixture | Jonas Schievink | 2020-12-19 | 1 | -2/+2 |
| | |||||
* | Test paths to derive macros | Jonas Schievink | 2020-12-19 | 1 | -2/+2 |
| | |||||
* | Hit a mark | Jonas Schievink | 2020-12-18 | 1 | -0/+2 |
| | |||||
* | Add test | Jonas Schievink | 2020-12-18 | 1 | -0/+16 |
| | |||||
* | Make macro def krate mandatory | Jonas Schievink | 2020-12-15 | 1 | -1/+30 |
| | | | | Refactors builtin derive support to go through proper name resolution | ||||
* | Escape string literals in Attr::from_src | Lukas Wirth | 2020-12-08 | 1 | -1/+1 |
| | |||||
* | Don't discard PathKind::Abs information in lower_use::convert_path | Lukas Wirth | 2020-12-02 | 1 | -0/+21 |
| | |||||
* | Test def map invalidation with #[cfg] below change | Jonas Schievink | 2020-11-26 | 1 | -0/+6 |
| | |||||
* | Don't stack overflow on circular modules | Aleksey Kladov | 2020-11-04 | 1 | -0/+27 |
| | | | | closes #6453 | ||||
* | Feedback. | James Leitch | 2020-11-02 | 1 | -1/+1 |
| | |||||
* | Test Fixture ExplicitRoot + ModuleResolutionRelativePathOutsideRoot. | James Leitch | 2020-11-02 | 1 | -2/+15 |
| | |||||
* | Diagnose #[cfg]s in bodies | Jonas Schievink | 2020-10-23 | 1 | -33/+1 |
| | |||||
* | Emit better #[cfg] diagnostics | Jonas Schievink | 2020-10-22 | 1 | -0/+22 |
| |