如何将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

分类: 计算机技术
推荐阅读:
Linux找出目录下所有内容重复的文件(包含子目录) 在Linux系统下,如果你想找出某个目录下(包含子目录)所有内容重复的文件,你可以使用这一条命令实现:
Linux挂载一个临时的RAM分区 在Linux下,你可以将RAM当作文件系统使用,这比在Windows方便的多,使用RAM作为文件系统,其读写速度要比磁盘快得多;一条命令即可实现:挂载一个临时的RAM分区,分配指定大小的RAM空间来作为文件系统。
Rust file宏的用法和示例 在Rust中,file宏用于获取当前源文件的文件名;这在调试和日志记录等场景中非常有用,因为你可以动态地获取当前代码所在的文件名;
Python divmod()函数 在Python中,divmod()函数是一个内置函数,用于将两个数字相除并返回商和余数。divmod()函数接受两个参数,分别是被除数和除数,并返回一个包含商和余数的元组。其中,商是两个数相除得到的结果,而余数是两个数相除后的余数部分。
MySQL ACOS() 反余弦函数 ACOS(x)函数返回x的反余弦值;如果x不在定义域[-1,1]中,将返回NULL;
使用MATLAB求函数极限 要在 MATLAB 中求解一个函数的极限,可以使用 "limit" 函数。这个函数需要两个输入参数:要求解的函数和趋近于的值。