|
| 1 | += Changelog #140 |
| 2 | +:sectanchors: |
| 3 | +:page-layout: post |
| 4 | + |
| 5 | +Commit: commit:2b472f6684bb1958274995d12b2c50310d88cc52[] + |
| 6 | +Release: release:2022-08-01[] |
| 7 | + |
| 8 | +== An Update on Proc Macros |
| 9 | + |
| 10 | +Rust toolchains newer than `2022-07-29` contain a proc macro server that should be compatible with macros built by the matching compiler. |
| 11 | +Since today's release, the server is automatically detected by and used `rust-analyzer`. |
| 12 | +This means that, from now on, proc macros will keep working when the `proc_macro` crate changes. |
| 13 | + |
| 14 | +For more details, you can read @fasterthanlime's https://fasterthanli.me/articles/proc-macro-support-in-rust-analyzer-for-nightly-rustc-versions#what-s-next[blog post]. |
| 15 | + |
| 16 | +== New Features |
| 17 | + |
| 18 | +* pr:12864[], pr:12881[] resolve derive helper attributes in IDE layer: |
| 19 | ++ |
| 20 | +image::https://user-images.githubusercontent.com/3757771/180647125-98cae13b-a7b4-446b-8a64-fae014f982e2.png[] |
| 21 | ++ |
| 22 | +image::https://user-images.githubusercontent.com/3757771/180642110-699bdc73-e1f3-4692-94f2-21544f824ab9.png[] |
| 23 | +* pr:12858[], pr:12878[] add `rust-analyzer-proc-macro-srv` binary and use it if found in sysroot. |
| 24 | +* pr:12856[] spawn a `proc-macro-srv` instance per Cargo workspace. |
| 25 | + |
| 26 | +== Fixes |
| 27 | + |
| 28 | +* pr:12877[] (first contribution) insert whitespace when inlining a function defined in a macro. |
| 29 | +* pr:12886[] cache the resulting file in `Semantics::original_ast_node`. |
| 30 | +* pr:12887[] don't duplicate existing `&mut` in completions. |
| 31 | +* pr:12895[] compte completions after type anchors. |
| 32 | +* pr:12830[] insert references in the correct position in macros. |
| 33 | +* pr:12898[] don't add unnecessary brackets in pattern completions. |
| 34 | +* pr:12899[] offer completions in path qualifier position. |
| 35 | +* pr:12901[] don't complete marker traits in expression position. |
| 36 | +* pr:12906[] complete paths of existing record expressions. |
| 37 | +* pr:12913[] fix highlight injection with doc comments. |
| 38 | +* pr:12891[] increase stack size on macro expander thread. |
| 39 | + |
| 40 | +== Internal Improvements |
| 41 | + |
| 42 | +* pr:12890[] assume condition/iterable is missing if there is only a `BlockExpr` in `for` and `while` loops. |
| 43 | +* pr:12902[] sort `ItemScope::entries` results. |
| 44 | +* pr:12900[] use `cargo ws rename` to rename crates for publishing. |
| 45 | +* pr:12903[] only run rainbow highlighting test on 64-bit Unix. |
| 46 | +* pr:12904[] be more explicit when filtering built-in completions. |
| 47 | +* pr:12915[] update `xtask promote` and release instructions. |
| 48 | +* pr:12871[] sync from `rust-lang/rust`. |
0 commit comments