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

分类: 计算机技术
推荐阅读:
Python使用集合实现内容去重 有这么一个场景,某个文件用于记录人名(也可以是URL或者其他的),编辑发现,出现了重复的内容。那么我们如何使用Python来进行去重呢?
C语言比较两个字符串 在C语言中,你不能像很多其它高级语言一样,直接使用 = 号对两个字符串进行比较以判断两者是否相同;在C语言,我们最常用的方法是借助strcmp()函数来进行字符串的比较。
网站搜索功能被恶意利用的解决方法 不良分子通过网站搜索框不断搜索敏感关键词,产生大批网页标题带有敏感关键词的搜索结果页,且这些页面可能会被搜索引擎收录;他们的目的是让这些敏感关键词在搜索结果中大量曝光,从而达到他们宣传的目的;
将Kali安装到VirtualBox虚拟机 本文将详细介绍如何将Kali系统安装到VirtualBox虚拟机中;首先,你需要安装好 VirtualBox;VirtualBox 是一款优秀的开源虚拟机软件;VirtualBox的官方下载地址为:
Rust使用cfg来实现不同系统的条件编译 Rust使用cfg来实现不同系统的条件编译
Kali更新源的方法和优质国内源 所谓的Kali源,你可以将它理解为软件仓库,系统通过它安装和更新软件;源的服务器地址写在/etc/apt/sources.list文件中;当系统使用的当前源不可用或速度不理想时,就需要更换源;