gpt4 book ai didi

macos - 如何在 Rust 1.32 版本中安装 rustfmt?

转载 作者:行者123 更新时间:2023-11-29 08:32:06 30 4
gpt4 key购买 nike

我使用的是 macOS Mojave。我过去使用过 Rust,并且 rustfmt 一直有效,但我无法再下载 rustfmt。

$ rustup show
Default host: x86_64-apple-darwin
stable-x86_64-apple-darwin (default)
rustc 1.32.0 (9fda7c223 2019-01-16)

$ rustup component add rustfmt
error: toolchain 'stable-x86_64-apple-darwin' does not contain component 'rustfmt' for target 'x86_64-apple-darwin'

我还需要执行其他命令吗?

最佳答案

你可以试试这些命令:

rustup toolchain remove stable && rustup toolchain add stable

rustup toolchain remove stable && rustup toolchain install stable

它可以在编译器版本更新后的几种情况下提供帮助,例如 rustfmtclippy 或其他 Rust 组件。

关于macos - 如何在 Rust 1.32 版本中安装 rustfmt?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54301401/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com