1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

thiserror の feature(provide_any) で出る E0554

Last updated at Posted at 2022-12-27

エラーの詳細

Rust に thiserror という、広く使われているライブラリがありますが、このライブラリに(間接的にでも)依存しているクレートをビルドするときに以下のようなエラーが出ることがあります。

error[E0554]: `#![feature]` may not be used on the stable release channel
   --> C:\Users\user\.cargo\registry\src\github.com-1ecc6299db9ec823\thiserror-1.0.38\src\lib.rs:238:34
    |
238 | #![cfg_attr(provide_any, feature(provide_any))]
    |                                  ^^^^^^^^^^^

For more information about this error, try `rustc --explain E0554`.

解決法

$ cargo clean -p thiserror

原因

よくわかりません。この問題のissueが出ていますが、ライブラリの開発者は古いバージョンのrust-analyzerかIntelliJを使っているのが原因だと言っています。

私の環境は以下の通りです。

ソフトウェア バージョン
thiserror 1.0.38
Windows 11
cargo 1.65.0 (4bc8f24d3 2022-10-20)
rustc 1.65.0 (897e37553 2022-11-02)
toolchain stable-x86_64-pc-windows-msvc
CLion 2022.3.1
CLion Rust プラグイン 0.4.185.5086-223
1
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
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?