aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_expand/src/builtin_macro.rs
Commit message (Collapse)AuthorAgeFilesLines
* clippy::useless_conversionMaan20032021-06-131-4/+4
|
* clippy::redudant_borrowMaan20032021-06-131-3/+3
|
* Remove fragment kind knowledge from builtin macrosJonas Schievink2021-05-291-22/+15
|
* Clarify field nameJonas Schievink2021-05-191-2/+2
|
* Simplify eager macro representationJonas Schievink2021-05-191-40/+41
|
* Implement `concat_idents`Edwin Cheng2021-05-131-0/+35
|
* Merge #8776bors[bot]2021-05-091-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 kindJonas Schievink2021-05-091-0/+1
| |
* | Escape characters in builtin macros correctlyEdwin Cheng2021-05-091-2/+2
|/
* Expand `global_asm!` to nothingJonas Schievink2021-04-181-0/+10
|
* Use named fields in `MacroCallKind`Jonas Schievink2021-04-081-4/+3
|
* Update `OUT_DIR` diagnostic to match settingJonas Schievink2021-04-071-1/+1
|
* Make `ast_to_token_tree` infallibleJonas Schievink2021-04-041-1/+1
| | | | It could never return `None`, so reflect that in the return type
* Implement edition-dependent builtin `panic!` macroJonas Schievink2021-04-031-2/+23
|
* use the included file as the source of expanded include macroYilin Chen2021-03-211-22/+44
| | | | Signed-off-by: Yilin Chen <[email protected]>
* Make MacroDefId's `AstId` mandatory when possibleJonas Schievink2021-03-181-8/+5
|
* Improve diagnostic when including nonexistent fileJonas Schievink2021-03-171-10/+11
|
* Use expect-test for builtin macro/derive testsJonas Schievink2021-03-101-43/+35
|
* Implement builtin `cfg!` macroJonas Schievink2021-03-101-0/+14
|
* Fix assert split exprs on commaEdwin Cheng2021-02-281-17/+2
|
* Fix builtin macros split exprs on commaEdwin Cheng2021-02-281-20/+25
|
* Disallow non-boolean literals in concat!Laurențiu Nicola2021-01-251-2/+4
|
* Unquote strings and handle boolean literals in concat!Laurențiu Nicola2021-01-251-16/+8
|
* Fix `==` in in format causes mismatched-arg-countEdwin Cheng2020-12-311-1/+2
|
* Store invocation site for eager macrosJonas Schievink2020-12-221-2/+3
|
* Make macro def krate mandatoryJonas Schievink2020-12-151-4/+4
| | | | Refactors builtin derive support to go through proper name resolution
* Basic support for decl macros 2.0Jonas Schievink2020-12-151-8/+11
|
* Move to upstream `macro_rules!` modelJonas Schievink2020-12-151-6/+10
|
* Resolve `macro-error` diagnostics on asm & llvm_asmlf-2020-12-151-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 Schievink2020-12-141-0/+10
|
* format_args: handle key-value argumentsJonas Schievink2020-12-101-0/+6
|
* Introduce anchored_pathAleksey Kladov2020-12-091-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 literalsJonas Schievink2020-12-081-8/+34
|
* Make `compile_error!` message match upstream rustcJonas Schievink2020-12-031-4/+1
| | | | It only consists of the argument passed to it
* Make `compile_error!` lazy and emit a diagnosticJonas Schievink2020-12-031-21/+27
|
* Give better diagnostic if `OUT_DIR` is unsetJonas Schievink2020-12-031-9/+17
|
* builtin_macro: move to `mbe::ExpandResult`Jonas Schievink2020-11-301-50/+79
|
* SimplifyAleksey Kladov2020-11-061-1/+1
|
* Rename ra_hir_expand -> hir_expandAleksey Kladov2020-08-131-0/+649