升级方法
稳定版
当前版本号1.70.0
升级稳定版,需要用上参数 stable
C:>rustup update stable
info: syncing channel updates for ‘stable-x86_64-pc-windows-msvc’
info: latest update on 2023-12-28, rust version 1.75.0 (82e1608df 2023-12-21)
info: downloading component ‘cargo’
5.9 MiB / 5.9 MiB (100 %) 3.7 MiB/s in 1s ETA: 0s
info: downloading component ‘clippy’
info: downloading component ‘rust-docs’
14.3 MiB / 14.3 MiB (100 %) 9.2 MiB/s in 2s ETA: 0s
info: downloading component ‘rust-std’
17.9 MiB / 17.9 MiB (100 %) 8.2 MiB/s in 2s ETA: 0s
info: downloading component ‘rustc’
58.7 MiB / 58.7 MiB (100 %) 9.5 MiB/s in 6s ETA: 0s
info: downloading component ‘rustfmt’
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’
14.3 MiB / 14.3 MiB (100 %) 2.5 MiB/s in 4s ETA: 0s
info: installing component ‘rust-std’
17.9 MiB / 17.9 MiB (100 %) 17.1 MiB/s in 1s ETA: 0s
info: installing component ‘rustc’
58.7 MiB / 58.7 MiB (100 %) 17.1 MiB/s in 3s ETA: 0s
info: installing component ‘rustfmt’
stable-x86_64-pc-windows-msvc updated – rustc 1.75.0 (82e1608df 2023-12-21) (from rustc 1.74.0 (79e9716c9 2023-11-13))
info: checking for self-update
C:>rustup –version
rustup 1.26.0 (5af9b9484 2023-04-05)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.70.0 (90c541806 2023-05-31)`
C:>rustc –version
rustc 1.70.0 (90c541806 2023-05-31)
最新版
当前版本号1.75.0
稳定版刚升级完,连续升级到最新版需要删除下载和临时目录重试升级:
C:>rustup update
info: syncing channel updates for 'stable-x86_64-pc-windows-gnu'
400.0 KiB / 710.0 KiB ( 56 %) 19.2 KiB/s in 1m 45s ETA: 16s
error: could not download file from 'https://static.rust-lang.org/dist/channel-rust-stable.toml' to 'C:Usersboyso.rustuptmpund43x6p2h0eb9yj_file.toml'
info: syncing channel updates for 'stable-x86_64-pc-windows-msvc'
710.0 KiB / 710.0 KiB (100 %) 128.0 KiB/s in 10s ETA: 0s
info: latest update on 2023-12-28, rust version 1.75.0 (82e1608df 2023-12-21)
info: checking for self-update
stable-x86_64-pc-windows-gnu update failed - rustc 1.70.0 (90c541806 2023-05-31)
stable-x86_64-pc-windows-msvc unchanged - rustc 1.75.0 (82e1608df 2023-12-21)
info: cleaning up downloads & tmp directories
C:>rustup update
info: syncing channel updates for ‘stable-x86_64-pc-windows-gnu’
710.0 KiB / 710.0 KiB (100 %) 271.4 KiB/s in 2s ETA: 0s
info: latest update on 2023-12-28, rust version 1.75.0 (82e1608df 2023-12-21)
info: downloading component ‘cargo’
9.5 MiB / 9.5 MiB (100 %) 1.8 MiB/s in 6s ETA: 0s
info: downloading component ‘clippy’
3.3 MiB / 3.3 MiB (100 %) 2.8 MiB/s in 1s ETA: 0s
info: downloading component ‘rust-docs’
14.3 MiB / 14.3 MiB (100 %) 3.4 MiB/s in 5s ETA: 0s
info: downloading component ‘rust-mingw’
4.7 MiB / 4.7 MiB (100 %) 2.1 MiB/s in 2s ETA: 0s
info: downloading component ‘rust-std’
21.9 MiB / 21.9 MiB (100 %) 2.2 MiB/s in 11s ETA: 0s
info: downloading component ‘rustc’
72.8 MiB / 72.8 MiB (100 %) 1.6 MiB/s in 45s ETA: 0s
info: downloading component ‘rustfmt’
3.2 MiB / 3.2 MiB (100 %) 990.6 KiB/s in 4s 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-mingw’
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’
14.3 MiB / 14.3 MiB (100 %) 2.4 MiB/s in 5s ETA: 0s
info: installing component ‘rust-mingw’
info: installing component ‘rust-std’
21.9 MiB / 21.9 MiB (100 %) 12.8 MiB/s in 1s ETA: 0s
info: installing component ‘rustc’
72.8 MiB / 72.8 MiB (100 %) 13.7 MiB/s in 5s ETA: 0s
info: installing component ‘rustfmt’
info: syncing channel updates for ‘stable-x86_64-pc-windows-msvc’
710.0 KiB / 710.0 KiB (100 %) 495.4 KiB/s in 2s ETA: 0s
info: latest update on 2023-12-28, rust version 1.75.0 (82e1608df 2023-12-21)
info: checking for self-update
stable-x86_64-pc-windows-gnu updated – rustc 1.75.0 (82e1608df 2023-12-21) (from rustc 1.70.0 (90c541806 2023-05-31))
stable-x86_64-pc-windows-msvc unchanged – rustc 1.75.0 (82e1608df 2023-12-21)
info: cleaning up downloads & tmp directories
C:>rustc –version
rustc 1.75.0 (82e1608df 2023-12-21)
目录
升级方法
稳定版
最新版
升级结束后,版本后为: 1.75.0