首页 > 其他分享 >error: the option `Z` is only accepted on the nightly compiler

error: the option `Z` is only accepted on the nightly compiler

时间:2022-10-23 14:22:36浏览次数:61  
标签:toolchain option rustup default nightly only error override

问题记录

$ cargo expand
     Checking helo v0.1.0 (/Users/Buzz/Documents/git/rust-lang/hello)
error: the option `Z` is only accepted on the nightly compiler
error: could not compile `hello`

解决:切换到nightly版本

# Install nightly toolchain:
rustup install nightly

# Switch to nightly toolchain
rustup override set nightly

其它相关指令

# Show the defautl toolchain
rustup default

# Set the default toolchain to the latest nightly
rustup default nightly

# Set the default toolchain to the latest stable
rustup default stable

# To use to a specific nightly for a directory:
rustup override set nightly-2014-12-18

# Or a specific stable release:
rustup override set 1.0.0

# To see the active toolchain
rustup show

# To remove the override and use the default toolchain again, 
rustup override unset

参考

https://rust-lang.github.io/rustup/overrides.html

标签:toolchain,option,rustup,default,nightly,only,error,override
From: https://www.cnblogs.com/BuzzWeek/p/16818450.html

相关文章