aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_expand/src/db.rs
Commit message (Collapse)AuthorAgeFilesLines
* :arrow_up: rowanAleksey Kladov2021-01-191-1/+1
|
* Remove useless wrapperAleksey Kladov2021-01-151-1/+1
|
* Fixed typos in code commentsVincent Esche2021-01-091-1/+1
|
* Proper handling $crate Take 2Edwin Cheng2021-01-071-3/+9
|
* Fix infer error of macro invocation in array exprEdwin Cheng2021-01-021-1/+1
|
* Pass crate environment to proc macrosJonas Schievink2020-12-271-1/+1
|
* Store invocation site for eager macrosJonas Schievink2020-12-221-4/+5
|
* Basic support for decl macros 2.0Jonas Schievink2020-12-151-1/+4
|
* Remove obsolete commentEdwin Cheng2020-12-151-1/+0
|
* Expand statements for mbe in loweringEdwin Cheng2020-12-151-1/+2
|
* Use decimal notationJonas Schievink2020-12-101-1/+1
|
* Double the macro token limitJonas Schievink2020-12-101-1/+1
|
* Improve macro limit error and move to constJonas Schievink2020-12-101-3/+9
|
* Make `compile_error!` lazy and emit a diagnosticJonas Schievink2020-12-031-0/+1
|
* builtin_macro: move to `mbe::ExpandResult`Jonas Schievink2020-11-301-1/+1
|
* Merge #6645bors[bot]2020-11-281-1/+8
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 errorsJonas Schievink2020-11-271-1/+8
| |
* | Add/Fix macro expansion profilingJonas Schievink2020-11-271-2/+4
|/
* Use `ExpandResult` instead of `MacroResult`Jonas Schievink2020-11-261-52/+28
| | | | `MacroResult` is redundant
* Use named fields in `ExpandResult`Jonas Schievink2020-11-261-1/+1
|
* Rename `parse_macro` to `parse_macro_expansion`Jonas Schievink2020-11-241-3/+3
| | | | This does not parse macros, it expands a macro and parses the *result*
* hir_expand::db: reduce fn visibilityJonas Schievink2020-11-241-15/+9
|
* Remove fixed FIXME, propagate errors betterJonas Schievink2020-11-241-6/+2
|
* hir_expand: propagate expansion errorsJonas Schievink2020-11-241-40/+83
|
* Complete methods when receiver is a macroAleksey Kladov2020-10-171-0/+1
|
* Rename `CustomDerive` to `ProcMacro`Jonas Schievink2020-09-181-2/+2
| | | | | It handles fn-like macros too, and will handle attribute macros in the future
* Bump token expansion limitAleksey Kladov2020-09-011-1/+1
| | | | | | | We hit this for redis crate, reported at Reported at https://www.reddit.com/r/rust/comments/ikfsf8/rustanalyzer_doesnt_work_with_the_redis_crate/
* Rename ra_hir_expand -> hir_expandAleksey Kladov2020-08-131-0/+403