Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Implement `concat_idents` | Edwin Cheng | 2021-05-13 | 1 | -0/+35 |
| | |||||
* | Merge #8776 | bors[bot] | 2021-05-09 | 1 | -0/+1 |
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8776: fix: fix unnecessary recomputations due to macros r=jonas-schievink a=jonas-schievink This computes a macro's fragment kind eagerly (when the calling file is still available in parsed form) and stores it in the `MacroCallLoc`. This means that during expansion we no longer have to reparse the file containing the macro call, avoiding the unnecessary salsa dependencies (https://github.com/rust-analyzer/rust-analyzer/pull/8746#issuecomment-834776349). Marking as draft until I manage to find a test for this problem, since for some reason `typing_inside_a_function_should_not_invalidate_expansions` does not catch this (which might indicate that I misunderstand the problem). I've manually confirmed that this fixes the issue described in https://github.com/rust-analyzer/rust-analyzer/pull/8746#issuecomment-834776349: ``` 7ms - parse_query @ FileId(179) 12ms - SourceBinder::to_module_def 12ms - crate_def_map:wait 5ms - item_tree_query (1 calls) 7ms - ??? ``` Co-authored-by: Jonas Schievink <[email protected]> | ||||
| * | Precompute macro fragment kind | Jonas Schievink | 2021-05-09 | 1 | -0/+1 |
| | | |||||
* | | Escape characters in builtin macros correctly | Edwin Cheng | 2021-05-09 | 1 | -2/+2 |
|/ | |||||
* | Expand `global_asm!` to nothing | Jonas Schievink | 2021-04-18 | 1 | -0/+10 |
| | |||||
* | Use named fields in `MacroCallKind` | Jonas Schievink | 2021-04-08 | 1 | -4/+3 |
| | |||||
* | Update `OUT_DIR` diagnostic to match setting | Jonas Schievink | 2021-04-07 | 1 | -1/+1 |
| | |||||
* | Make `ast_to_token_tree` infallible | Jonas Schievink | 2021-04-04 | 1 | -1/+1 |
| | | | | It could never return `None`, so reflect that in the return type | ||||
* | Implement edition-dependent builtin `panic!` macro | Jonas Schievink | 2021-04-03 | 1 | -2/+23 |
| | |||||
* | use the included file as the source of expanded include macro | Yilin Chen | 2021-03-21 | 1 | -22/+44 |
| | | | | Signed-off-by: Yilin Chen <[email protected]> | ||||
* | Make MacroDefId's `AstId` mandatory when possible | Jonas Schievink | 2021-03-18 | 1 | -8/+5 |
| | |||||
* | Improve diagnostic when including nonexistent file | Jonas Schievink | 2021-03-17 | 1 | -10/+11 |
| | |||||
* | Use expect-test for builtin macro/derive tests | Jonas Schievink | 2021-03-10 | 1 | -43/+35 |
| | |||||
* | Implement builtin `cfg!` macro | Jonas Schievink | 2021-03-10 | 1 | -0/+14 |
| | |||||
* | Fix assert split exprs on comma | Edwin Cheng | 2021-02-28 | 1 | -17/+2 |
| | |||||
* | Fix builtin macros split exprs on comma | Edwin Cheng | 2021-02-28 | 1 | -20/+25 |
| | |||||
* | Disallow non-boolean literals in concat! | Laurențiu Nicola | 2021-01-25 | 1 | -2/+4 |
| | |||||
* | Unquote strings and handle boolean literals in concat! | Laurențiu Nicola | 2021-01-25 | 1 | -16/+8 |
| | |||||
* | Fix `==` in in format causes mismatched-arg-count | Edwin Cheng | 2020-12-31 | 1 | -1/+2 |
| | |||||
* | Store invocation site for eager macros | Jonas Schievink | 2020-12-22 | 1 | -2/+3 |
| | |||||
* | Make macro def krate mandatory | Jonas Schievink | 2020-12-15 | 1 | -4/+4 |
| | | | | Refactors builtin derive support to go through proper name resolution | ||||
* | Basic support for decl macros 2.0 | Jonas Schievink | 2020-12-15 | 1 | -8/+11 |
| | |||||
* | Move to upstream `macro_rules!` model | Jonas Schievink | 2020-12-15 | 1 | -6/+10 |
| | |||||
* | Resolve `macro-error` diagnostics on asm & llvm_asm | lf- | 2020-12-15 | 1 | -0/+15 |
| | | | | | | | | | We currently stub these out as returning unit. This fixes spurious RA diagnostics in the following: ```rust unsafe { asm!(""); llvm_asm!(""); } ``` | ||||
* | Implement `module_path!()` | Jonas Schievink | 2020-12-14 | 1 | -0/+10 |
| | |||||
* | format_args: handle key-value arguments | Jonas Schievink | 2020-12-10 | 1 | -0/+6 |
| | |||||
* | Introduce anchored_path | Aleksey Kladov | 2020-12-09 | 1 | -2/+3 |
| | | | | | They allow to represent paths like `#[path = "C:\path.rs"] mod foo;` in a lossless cross-platform & network-transparent way. | ||||
* | Fix `concat!` with integer literals | Jonas Schievink | 2020-12-08 | 1 | -8/+34 |
| | |||||
* | Make `compile_error!` message match upstream rustc | Jonas Schievink | 2020-12-03 | 1 | -4/+1 |
| | | | | It only consists of the argument passed to it | ||||
* | Make `compile_error!` lazy and emit a diagnostic | Jonas Schievink | 2020-12-03 | 1 | -21/+27 |
| | |||||
* | Give better diagnostic if `OUT_DIR` is unset | Jonas Schievink | 2020-12-03 | 1 | -9/+17 |
| | |||||
* | builtin_macro: move to `mbe::ExpandResult` | Jonas Schievink | 2020-11-30 | 1 | -50/+79 |
| | |||||
* | Simplify | Aleksey Kladov | 2020-11-06 | 1 | -1/+1 |
| | |||||
* | Rename ra_hir_expand -> hir_expand | Aleksey Kladov | 2020-08-13 | 1 | -0/+649 |