Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Use arena instead of vec | Edwin Cheng | 2021-01-02 | 1 | -22/+16 |
| | |||||
* | Introduce HygieneFrames for proper token hyginee | Edwin Cheng | 2021-01-02 | 2 | -32/+136 |
| | |||||
* | Fix `==` in in format causes mismatched-arg-count | Edwin Cheng | 2020-12-31 | 1 | -1/+2 |
| | |||||
* | Pass crate environment to proc macros | Jonas Schievink | 2020-12-27 | 2 | -4/+7 |
| | |||||
* | Store invocation site for eager macros | Jonas Schievink | 2020-12-22 | 4 | -28/+27 |
| | |||||
* | More accurate `#[derive]` parsing | Jonas Schievink | 2020-12-19 | 1 | -0/+1 |
| | | | | This now allows full paths to the derive macro | ||||
* | Implement `RawAttr::filter` | Jonas Schievink | 2020-12-18 | 1 | -0/+1 |
| | |||||
* | Node-ify lifetimes | Lukas Wirth | 2020-12-16 | 1 | -3/+2 |
| | |||||
* | Make macro def krate mandatory | Jonas Schievink | 2020-12-15 | 4 | -24/+36 |
| | | | | Refactors builtin derive support to go through proper name resolution | ||||
* | Basic support for decl macros 2.0 | Jonas Schievink | 2020-12-15 | 3 | -11/+20 |
| | |||||
* | Move to upstream `macro_rules!` model | Jonas Schievink | 2020-12-15 | 2 | -7/+11 |
| | |||||
* | Merge #6886 | bors[bot] | 2020-12-15 | 1 | -2/+2 |
|\ | | | | | | | | | | | | | | | 6886: Expand statements for macros in lowering r=matklad a=edwin0cheng Fixes #6811 Co-authored-by: Edwin Cheng <[email protected]> | ||||
| * | Remove obsolete comment | Edwin Cheng | 2020-12-15 | 1 | -1/+0 |
| | | |||||
| * | Expand statements for mbe in lowering | Edwin Cheng | 2020-12-15 | 1 | -1/+2 |
| | | |||||
* | | Resolve `macro-error` diagnostics on asm & llvm_asm | lf- | 2020-12-15 | 2 | -0/+17 |
| | | | | | | | | | | | | | | | | | | 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 | 2 | -0/+11 |
|/ | |||||
* | Add Lifetimes to the HIR | Lukas Wirth | 2020-12-11 | 1 | -1/+6 |
| | |||||
* | Use decimal notation | Jonas Schievink | 2020-12-10 | 1 | -1/+1 |
| | |||||
* | Double the macro token limit | Jonas Schievink | 2020-12-10 | 1 | -1/+1 |
| | |||||
* | Improve macro limit error and move to const | Jonas Schievink | 2020-12-10 | 1 | -3/+9 |
| | |||||
* | format_args: handle key-value arguments | Jonas Schievink | 2020-12-10 | 1 | -0/+6 |
| | |||||
* | Introduce anchored_path | Aleksey Kladov | 2020-12-09 | 2 | -5/+6 |
| | | | | | 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 |
| | |||||
* | Fix logic for determining macro calls | Jonas Schievink | 2020-12-08 | 1 | -9/+7 |
| | | | | | | I believe this currently goes back all the way to the initial user-written call, but that seems better than the current broken behavior. | ||||
* | Make `original_range` a method on `InFile<&SyntaxNode>` | Jonas Schievink | 2020-12-08 | 1 | -3/+69 |
| | |||||
* | Use the right `def_crate` for builtin macros | Jonas Schievink | 2020-12-07 | 1 | -1/+1 |
| | |||||
* | Remove resolved FIXME | Jonas Schievink | 2020-12-07 | 1 | -1/+0 |
| | |||||
* | Make `compile_error!` message match upstream rustc | Jonas Schievink | 2020-12-03 | 1 | -4/+1 |
| | | | | It only consists of the argument passed to it | ||||
* | Fix proc macro token mapping | Jonas Schievink | 2020-12-03 | 1 | -6/+16 |
| | |||||
* | Rename `error_sink` to `diagnostic_sink` | Jonas Schievink | 2020-12-03 | 1 | -11/+12 |
| | |||||
* | Make `compile_error!` lazy and emit a diagnostic | Jonas Schievink | 2020-12-03 | 2 | -21/+28 |
| | |||||
* | Give better diagnostic if `OUT_DIR` is unset | Jonas Schievink | 2020-12-03 | 1 | -9/+17 |
| | |||||
* | Propagate eager expansion errors | Jonas Schievink | 2020-12-03 | 1 | -16/+99 |
| | |||||
* | builtin_macro: move to `mbe::ExpandResult` | Jonas Schievink | 2020-11-30 | 3 | -52/+81 |
| | |||||
* | Merge #6659 | bors[bot] | 2020-11-28 | 1 | -2/+7 |
|\ | | | | | | | | | | | | | | | | | 6659: Explain how we get precise spans for diagnostics. r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]> | ||||
| * | Explain how we get precise spans for diagnostics. | Aleksey Kladov | 2020-11-28 | 1 | -2/+7 |
| | | |||||
* | | Merge #6645 | bors[bot] | 2020-11-28 | 3 | -3/+10 |
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6645: Publish diagnostics for macro expansion errors r=matklad a=jonas-schievink This adds 2 new diagnostics, emitted during name resolution: * `unresolved-proc-macro`, a weak warning that is emitted when a proc macro is supposed to be expanded, but was not provided by the build system. This usually means that proc macro support is turned off, but may also indicate setup issues when using rust-project.json. Being a weak warning, this should help set expectations when users see it, while not being too obstructive. We do not yet emit this for attribute macros though, just custom derives and `!` macros. * `macro-error`, which is emitted when any macro (procedural or `macro_rules!`) fails to expand due to some error. This is an error-level diagnostic, but currently still marked as experimental, because there might be spurious errors and this hasn't been tested too well. This does not yet emit diagnostics when expansion in item bodies fails, just for module-level macros. Known bug: The "proc macro not found" diagnostic points at the whole item for custom derives, it should just point at the macro's name in the `#[derive]` list, but I haven't found an easy way to do that. Screenshots: ![screenshot-2020-11-26-19:54:14](https://user-images.githubusercontent.com/1786438/100385782-f8bc2300-3023-11eb-9f27-e8f8ce9d6114.png) ![screenshot-2020-11-26-19:55:39](https://user-images.githubusercontent.com/1786438/100385784-f954b980-3023-11eb-9617-ac2eb0a0a9dc.png) Co-authored-by: Jonas Schievink <[email protected]> | ||||
| * | Publish diagnostics for macro expansion errors | Jonas Schievink | 2020-11-27 | 2 | -2/+9 |
| | | |||||
| * | Add dedicated error for "proc macro not found" | Jonas Schievink | 2020-11-27 | 1 | -1/+1 |
| | | |||||
* | | Add/Fix macro expansion profiling | Jonas Schievink | 2020-11-27 | 1 | -2/+4 |
|/ | |||||
* | Use `ExpandResult` instead of `MacroResult` | Jonas Schievink | 2020-11-26 | 2 | -52/+30 |
| | | | | `MacroResult` is redundant | ||||
* | Use named fields in `ExpandResult` | Jonas Schievink | 2020-11-26 | 1 | -1/+1 |
| | |||||
* | Rename `parse_macro` to `parse_macro_expansion` | Jonas Schievink | 2020-11-24 | 2 | -4/+4 |
| | | | | This does not parse macros, it expands a macro and parses the *result* | ||||
* | hir_expand::db: reduce fn visibility | Jonas Schievink | 2020-11-24 | 1 | -15/+9 |
| | |||||
* | Remove fixed FIXME, propagate errors better | Jonas Schievink | 2020-11-24 | 1 | -6/+2 |
| | |||||
* | hir_expand: propagate expansion errors | Jonas Schievink | 2020-11-24 | 2 | -41/+84 |
| | |||||
* | Fill the diagnostic code field in publish_diagnostics | Lukas Wirth | 2020-11-17 | 1 | -1/+1 |
| | |||||
* | Simplify | Aleksey Kladov | 2020-11-06 | 1 | -1/+1 |
| | |||||
* | Remove more unreachable pubs | Aleksey Kladov | 2020-11-02 | 1 | -1/+1 |
| | |||||
* | Fix typo in comment | Francesco Zardi | 2020-10-21 | 1 | -1/+1 |
| |