Skip to content

Commit 5f3420e

Browse files
authored
Merge pull request #2715 from workingjubilee/editing
docs, comments: Editing and style cleanup
2 parents b132a85 + bc22b37 commit 5f3420e

File tree

9 files changed

+33
-41
lines changed

9 files changed

+33
-41
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# rustup: the Rust toolchain installer
1+
# Rustup: the Rust toolchain installer
22

33
| Master CI | Build Status |
44
|--------------|----------------------------------------------------------|
55
| Windows | ![Windows builds][actions-windows-master] |
66
| macOS | ![maOS builds][actions-macos-master] |
77
| Linux Etc | ![Linux (etc) builds][actions-linux-master] |
88

9-
*rustup* installs [The Rust Programming Language][rustlang] from the official
9+
*Rustup* installs [The Rust Programming Language][rustlang] from the official
1010
release channels, enabling you to easily switch between stable, beta,
1111
and nightly compilers and keep them updated. It makes cross-compiling
1212
simpler with binary builds of the standard library for common platforms.
@@ -16,16 +16,16 @@ And it runs on all platforms Rust supports, including Windows.
1616

1717
## Documentation
1818

19-
See [**The rustup book**](https://rust-lang.github.io/rustup/) for
20-
documentation on installing and using rustup.
19+
See [**The Rustup book**](https://rust-lang.github.io/rustup/) for
20+
documentation on installing and using Rustup.
2121

2222
## Contributing
2323

24-
See [CONTRIBUTING.md](CONTRIBUTING.md) for information on contributing to rustup.
24+
See [CONTRIBUTING.md](CONTRIBUTING.md) for information on contributing to Rustup.
2525

2626
## License
2727

28-
Copyright Diggory Blake, the Mozilla Corporation, and rustup
28+
Copyright Diggory Blake, the Mozilla Corporation, and Rustup
2929
contributors.
3030

3131
Licensed under either of

doc/src/installation/other.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@
33
The primary installation method, as described at <https://rustup.rs>, differs
44
by platform:
55

6-
* On Windows, download and run the [rustup-init.exe built for
7-
`i686-pc-windows-gnu` target][setup]. In general, this is the build of
8-
`rustup` one should install on Windows. Despite being built against the GNU
9-
toolchain, _the Windows build of `rustup` will install Rust for the MSVC
10-
toolchain if it detects that MSVC is installed_. If you prefer to install
11-
GNU toolchains or x86_64 toolchains by default this can be modified at
12-
install time, either interactively or with the `--default-host` flag, or
13-
after installation via `rustup set default-host`.
6+
* On Windows, download and run the [`rustup-init.exe` built for the
7+
`x86_64-pc-windows-msvc` target][setup]. In general, this is the build of
8+
`rustup` one should install on Windows. This will require the Visual C++
9+
Build Tools 2019 or equivalent (Visual Studio 2019, etc.) to already be
10+
installed. If you would prefer to install GNU toolchains or the i686
11+
toolchains by default this can be modified at install time, either
12+
interactively, with the `--default-host` flag, or after installation
13+
via `rustup set default-host`.
1414
* On Unix, run `curl https://sh.rustup.rs -sSf | sh` in your shell. This
1515
downloads and runs [`rustup-init.sh`], which in turn downloads and runs the
1616
correct version of the `rustup-init` executable for your platform.
1717

18-
[setup]: https://static.rust-lang.org/rustup/dist/i686-pc-windows-gnu/rustup-init.exe
18+
[setup]: https://static.rust-lang.org/rustup/dist/x86_64-pc-windows-msvc/rustup-init.exe
1919
[`rustup-init.sh`]: https://static.rust-lang.org/rustup/rustup-init.sh
2020

2121
`rustup-init` accepts arguments, which can be passed through the shell script.

src/bin/rustup-init.rs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
1-
//! The main rustup commandline application
1+
//! The main Rustup command-line interface
22
//!
33
//! The rustup binary is a chimera, changing its behavior based on the
44
//! name of the binary. This is used most prominently to enable
5-
//! rustup's tool 'proxies' - that is, rustup itself and the rustup
6-
//! proxies are the same binary; when the binary is called 'rustup' or
7-
//! 'rustup.exe' rustup behaves like the rustup commandline
8-
//! application; when it is called 'rustc' it behaves as a proxy to
9-
//! 'rustc'.
5+
//! Rustup's tool 'proxies' - that is, rustup itself and the rustup
6+
//! proxies are the same binary: when the binary is called 'rustup' or
7+
//! 'rustup.exe' it offers the Rustup command-line interface, and
8+
//! when it is called 'rustc' it behaves as a proxy to 'rustc'.
109
//!
11-
//! This scheme is further used to distinguish the rustup installer,
12-
//! called 'rustup-init' which is again just the rustup binary under a
10+
//! This scheme is further used to distinguish the Rustup installer,
11+
//! called 'rustup-init', which is again just the rustup binary under a
1312
//! different name.
1413
1514
#![recursion_limit = "1024"]

src/cli/help.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
pub static RUSTUP_HELP: &str = r"DISCUSSION:
2-
rustup installs The Rust Programming Language from the official
2+
Rustup installs The Rust Programming Language from the official
33
release channels, enabling you to easily switch between stable,
44
beta, and nightly compilers and keep them updated. It makes
55
cross-compiling simpler with binary builds of the standard library
@@ -105,7 +105,7 @@ pub static TOOLCHAIN_LINK_HELP: &str = r"DISCUSSION:
105105
toolchain 'latest-stage1' will be used.";
106106

107107
pub static OVERRIDE_HELP: &str = r"DISCUSSION:
108-
Overrides configure rustup to use a specific toolchain when
108+
Overrides configure Rustup to use a specific toolchain when
109109
running in a specific directory.
110110
111111
Directories can be assigned their own Rust toolchain with `rustup

src/cli/job.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// FIXME: stolen from cargo. Should be extracted into a common crate.
22

3-
//! Job management (mostly for windows)
3+
//! Job management (mostly for Windows)
44
//!
55
//! Most of the time when you're running cargo you expect Ctrl-C to actually
66
//! terminate the entire tree of processes in play, not just the one at the top

src/cli/self_update/shell.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
//!
2222
//! Rustup addresses this by:
2323
//! 1) using a shell script that updates PATH if the path is not in PATH
24-
//! 2) sourcing this script in any known and appropriate rc file
24+
//! 2) sourcing this script (`. /path/to/script`) in any appropriate rc file
2525
2626
use std::path::PathBuf;
2727

@@ -82,7 +82,7 @@ pub trait UnixShell {
8282
// heuristic should be used, assuming shells exist if any traces do.
8383
fn does_exist(&self) -> bool;
8484

85-
// Gives all rcfiles of a given shell that rustup is concerned with.
85+
// Gives all rcfiles of a given shell that Rustup is concerned with.
8686
// Used primarily in checking rcfiles for cleanup.
8787
fn rcfiles(&self) -> Vec<PathBuf>;
8888

src/cli/self_update/unix.rs

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -129,13 +129,7 @@ pub fn do_remove_from_programs() -> Result<()> {
129129
}
130130

131131
/// Tell the upgrader to replace the rustup bins, then delete
132-
/// itself. Like with uninstallation, on Windows we're going to
133-
/// have to jump through hoops to make everything work right.
134-
///
135-
/// On windows we're not going to wait for it to finish before exiting
136-
/// successfully, so it should not do much, and it should try
137-
/// really hard to succeed, because at this point the upgrade is
138-
/// considered successful.
132+
/// itself.
139133
pub fn run_update(setup_path: &Path) -> Result<utils::ExitCode> {
140134
let status = Command::new(setup_path)
141135
.arg("--self-replace")
@@ -151,8 +145,7 @@ pub fn run_update(setup_path: &Path) -> Result<utils::ExitCode> {
151145

152146
/// This function is as the final step of a self-upgrade. It replaces
153147
/// `CARGO_HOME`/bin/rustup with the running exe, and updates the the
154-
/// links to it. On windows this will run *after* the original
155-
/// rustup process exits.
148+
/// links to it.
156149
pub fn self_replace() -> Result<utils::ExitCode> {
157150
install_bins()?;
158151

@@ -181,7 +174,7 @@ fn remove_legacy_source_command(source_cmd: String) -> Result<()> {
181174

182175
fn remove_legacy_paths() -> Result<()> {
183176
// Before the work to support more kinds of shells, which was released in
184-
// version 1.23.0 of rustup, we always inserted this line instead, which is
177+
// version 1.23.0 of Rustup, we always inserted this line instead, which is
185178
// now considered legacy
186179
remove_legacy_source_command(format!(
187180
"export PATH=\"{}/bin:$PATH\"\n",

src/cli/self_update/windows.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -383,15 +383,15 @@ pub fn self_replace() -> Result<utils::ExitCode> {
383383
// like when they are running.
384384
//
385385
// Here's what we're going to do:
386-
// - Copy rustup to a temporary file in
386+
// - Copy rustup.exe to a temporary file in
387387
// CARGO_HOME/../rustup-gc-$random.exe.
388388
// - Open the gc exe with the FILE_FLAG_DELETE_ON_CLOSE and
389389
// FILE_SHARE_DELETE flags. This is going to be the last
390390
// file to remove, and the OS is going to do it for us.
391391
// This file is opened as inheritable so that subsequent
392392
// processes created with the option to inherit handles
393393
// will also keep them open.
394-
// - Run the gc exe, which waits for the original rustup
394+
// - Run the gc exe, which waits for the original rustup.exe
395395
// process to close, then deletes CARGO_HOME. This process
396396
// has inherited a FILE_FLAG_DELETE_ON_CLOSE handle to itself.
397397
// - Finally, spawn yet another system binary with the inherit handles

src/utils/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
///! Utility functions for rustup
1+
///! Utility functions for Rustup
22
pub mod notifications;
33
pub mod raw;
44
pub mod toml_utils;

0 commit comments

Comments
 (0)