如何将Rust更新到最新版

Rust每隔一段时间就会有新的版本,若要将已安装的Rust更新到最新版,并不用先卸载旧的版本,只需要使用rustup工具;

查看Rust版本

rustc -V
rustc 1.54.0 (a178d0322 2021-07-26)

更新Rust

rustup update

看到类似以下信息表示更新完成;

PS C:\Users\hocn> rustup update
info: syncing channel updates for 'stable-x86_64-pc-windows-msvc'
info: latest update on 2022-04-07, rust version 1.60.0 (7737e0b5c 2022-04-04)
info: downloading component 'cargo'
  3.9 MiB /   3.9 MiB (100 %) 778.2 KiB/s in  5s ETA:  0s
info: downloading component 'clippy'
  1.7 MiB /   1.7 MiB (100 %) 516.6 KiB/s in  3s ETA:  0s
info: downloading component 'rust-docs'
 19.6 MiB /  19.6 MiB (100 %) 459.4 KiB/s in 35s ETA:  0s
info: downloading component 'rust-std'
 24.0 MiB /  24.0 MiB (100 %) 630.8 KiB/s in 41s ETA:  0s
info: downloading component 'rustc'
 56.7 MiB /  56.7 MiB (100 %) 742.1 KiB/s in  2m 49s ETA:  0s
info: downloading component 'rustfmt'
  2.2 MiB /   2.2 MiB (100 %) 630.8 KiB/s in  3s ETA:  0s
info: removing previous version of component 'cargo'
info: removing previous version of component 'clippy'
info: removing previous version of component 'rust-docs'
info: removing previous version of component 'rust-std'
info: removing previous version of component 'rustc'
info: removing previous version of component 'rustfmt'
info: installing component 'cargo'
info: installing component 'clippy'
info: installing component 'rust-docs'
 19.6 MiB /  19.6 MiB (100 %)   1.7 MiB/s in  9s ETA:  0s
info: installing component 'rust-std'
 24.0 MiB /  24.0 MiB (100 %)   8.0 MiB/s in  2s ETA:  0s
info: installing component 'rustc'
 56.7 MiB /  56.7 MiB (100 %)   9.3 MiB/s in  6s ETA:  0s
info: installing component 'rustfmt'
info: checking for self-updates

  stable-x86_64-pc-windows-msvc updated - rustc 1.60.0 (7737e0b5c 2022-04-04) (from rustc 1.54.0 (a178d0322 2021-07-26))

info: cleaning up downloads & tmp directories

原创内容,如需转载,请注明出处;

本文地址: https://www.perfcode.com/p/how-to-update-rust.html

分类: 计算机技术
推荐阅读:
xxxx is not in the sudoers file. This incident will be reported. 解决方法 使用sudo命令时出现xxxx is not in the sudoers file. This incident will be reported. 这里的xxxx是你的用户名;出现这个提示通常是用户名没有写入到sudoers文件中;
MIPS汇编语言教程 MIPS(Microprocessor without Interlocked Pipeline Stages)是一种基于RISC(Reduced Instruction Set Computer,精简指令集计算机)体系结构的微处理器架构。MIPS的设计理念是简化指令集,减少指令执行时间和硬件开销,提高处理器性能和效率。
Rust:formatting specifier missing 错误解决方法 编译Rust程序时,出现 formatting specifier missing 错误,导致该错误的原因可能是错误的使用println!宏;
Pyinstaller写入版本信息 使用pyinstaller打包的python程序默认是不包含版本信息的,那么要怎么添加版本信息呢?
为pm.max_children设置一个合理的值 pm.max_children这个值在php-fpm中至关重要;其意义为:表示php-fpm 能启动的子进程的最大数量;它能影响你网站的打开速度以及服务器的开销。
PySide6 使用QIcon为按钮添加图标 在PySide6中为按钮添加图标,可以使用QIcon类来加载图标文件,并使用QPushButton类的setIcon()方法将图标设置给按钮;