LoginSignup
2
0

More than 1 year has passed since last update.

Rust: proc macro server crashedではまった

Posted at

環境

  • rustc 1.55.0 (c8dfcfe04 2021-09-06)
  • rust-analyzer v0.2.776
  • Windows10

背景

WindowsでVScodeでrust開発していたのだが、あるコード行(struct宣言部分)でrust-analyzerのエラーが発生するようになった。

メッセージは、以下のものだった。

proc macro server crashed

解決法

以前は動いた気がしたので、rustのバージョンを下げた。

具体的には1.52.1に下げた。

$ rustc -V
rustc 1.55.0 (c8dfcfe04 2021-09-06)
$ rustup install 1.52.1
...
...
1.52.1-x86_64-pc-windows-msvc installed - rustc 1.52.1 (9bc8c42bb 2021-05-09)
$ rustup default 1.52.1
info: using existing install for '1.52.1-x86_64-pc-windows-msvc'
info: default toolchain set to '1.52.1-x86_64-pc-windows-msvc'

  1.52.1-x86_64-pc-windows-msvc unchanged - rustc 1.52.1 (9bc8c42bb 2021-05-09)

備考

1.52.1じゃなくても大丈夫かもしれませんが、とりあえずそこまで下げたら動きました。
にしても、rust-analyzerが重い。
WSL2でやったほうがまだましなのかな。。

参考

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0