Skip to content

Commit ee89c08

Browse files
committed
Various minor/cosmetic improvements to code
1 parent 4a45578 commit ee89c08

File tree

457 files changed

+2341
-2317
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

457 files changed

+2341
-2317
lines changed

src/bootstrap/builder.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -793,7 +793,7 @@ impl<'a> Builder<'a> {
793793
}
794794

795795
// Set a flag for `check` so that certain build scripts can do less work
796-
// (e.g. not building/requiring LLVM).
796+
// (e.g., not building/requiring LLVM).
797797
if cmd == "check" {
798798
cargo.env("RUST_CHECK", "1");
799799
}
@@ -923,12 +923,12 @@ impl<'a> Builder<'a> {
923923
cargo.env("RUSTC_FORCE_UNSTABLE", "1");
924924

925925
// Currently the compiler depends on crates from crates.io, and
926-
// then other crates can depend on the compiler (e.g. proc-macro
926+
// then other crates can depend on the compiler (e.g., proc-macro
927927
// crates). Let's say, for example that rustc itself depends on the
928928
// bitflags crate. If an external crate then depends on the
929929
// bitflags crate as well, we need to make sure they don't
930930
// conflict, even if they pick the same version of bitflags. We'll
931-
// want to make sure that e.g. a plugin and rustc each get their
931+
// want to make sure that e.g., a plugin and rustc each get their
932932
// own copy of bitflags.
933933

934934
// Cargo ensures that this works in general through the -C metadata

src/bootstrap/dist.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ impl Step for Mingw {
353353
/// Build the `rust-mingw` installer component.
354354
///
355355
/// This contains all the bits and pieces to run the MinGW Windows targets
356-
/// without any extra installed software (e.g. we bundle gcc, libraries, etc).
356+
/// without any extra installed software (e.g., we bundle gcc, libraries, etc).
357357
fn run(self, builder: &Builder) -> Option<PathBuf> {
358358
let host = self.host;
359359

src/bootstrap/flags.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,11 @@ To learn more about a subcommand, run `./x.py <subcommand> -h`"
121121
opts.optopt("", "on-fail", "command to run on failure", "CMD");
122122
opts.optflag("", "dry-run", "dry run; don't build anything");
123123
opts.optopt("", "stage",
124-
"stage to build (indicates compiler to use/test, e.g. stage 0 uses the \
124+
"stage to build (indicates compiler to use/test, e.g., stage 0 uses the \
125125
bootstrap compiler, stage 1 the stage 0 rustc artifacts, etc.)",
126126
"N");
127127
opts.optmulti("", "keep-stage", "stage(s) to keep without recompiling \
128-
(pass multiple times to keep e.g. both stages 0 and 1)", "N");
128+
(pass multiple times to keep e.g., both stages 0 and 1)", "N");
129129
opts.optopt("", "src", "path to the root of the rust checkout", "DIR");
130130
opts.optopt("j", "jobs", "number of jobs to run in parallel", "JOBS");
131131
opts.optflag("h", "help", "print this help message");

src/bootstrap/job.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
//! Job management on Windows for bootstrapping
1212
//!
13-
//! Most of the time when you're running a build system (e.g. make) you expect
13+
//! Most of the time when you're running a build system (e.g., make) you expect
1414
//! Ctrl-C or abnormal termination to actually terminate the entire tree of
1515
//! process in play, not just the one at the top. This currently works "by
1616
//! default" on Unix platforms because Ctrl-C actually sends a signal to the
@@ -162,11 +162,11 @@ pub unsafe fn setup(build: &mut Build) {
162162
return
163163
}
164164

165-
// If we've got a parent process (e.g. the python script that called us)
165+
// If we've got a parent process (e.g., the python script that called us)
166166
// then move ownership of this job object up to them. That way if the python
167-
// script is killed (e.g. via ctrl-c) then we'll all be torn down.
167+
// script is killed (e.g., via ctrl-c) then we'll all be torn down.
168168
//
169-
// If we don't have a parent (e.g. this was run directly) then we
169+
// If we don't have a parent (e.g., this was run directly) then we
170170
// intentionally leak the job object handle. When our process exits
171171
// (normally or abnormally) it will close the handle implicitly, causing all
172172
// processes in the job to be cleaned up.
@@ -184,7 +184,7 @@ pub unsafe fn setup(build: &mut Build) {
184184

185185
// If this failed, well at least we tried! An example of DuplicateHandle
186186
// failing in the past has been when the wrong python2 package spawned this
187-
// build system (e.g. the `python2` package in MSYS instead of
187+
// build system (e.g., the `python2` package in MSYS instead of
188188
// `mingw-w64-x86_64-python2`. Not sure why it failed, but the "failure
189189
// mode" here is that we only clean everything up when the build system
190190
// dies, not when the python parent does, so not too bad.

src/bootstrap/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
//! However, compiletest itself tries to avoid running tests when the artifacts
3939
//! that are involved (mainly the compiler) haven't changed.
4040
//!
41-
//! When you execute `x.py build`, the steps which are executed are:
41+
//! When you execute `x.py build`, the steps executed are:
4242
//!
4343
//! * First, the python script is run. This will automatically download the
4444
//! stage0 rustc and cargo according to `src/stage0.txt`, or use the cached

src/bootstrap/native.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ impl Step for Llvm {
251251
configure_cmake(builder, target, &mut cfg, false);
252252

253253
// FIXME: we don't actually need to build all LLVM tools and all LLVM
254-
// libraries here, e.g. we just want a few components and a few
254+
// libraries here, e.g., we just want a few components and a few
255255
// tools. Figure out how to filter them down and only build the right
256256
// tools and libs on all platforms.
257257

src/bootstrap/test.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -971,7 +971,7 @@ impl Step for Compiletest {
971971
}
972972

973973
if builder.no_std(target) == Some(true) {
974-
// for no_std run-make (e.g. thumb*),
974+
// for no_std run-make (e.g., thumb*),
975975
// we need a host compiler which is called by cargo.
976976
builder.ensure(compile::Std { compiler, target: compiler.host });
977977
}
@@ -1277,7 +1277,7 @@ impl Step for DocTest {
12771277

12781278
/// Run `rustdoc --test` for all documentation in `src/doc`.
12791279
///
1280-
/// This will run all tests in our markdown documentation (e.g. the book)
1280+
/// This will run all tests in our markdown documentation (e.g., the book)
12811281
/// located in `src/doc`. The `rustdoc` that's run is the one that sits next to
12821282
/// `compiler`.
12831283
fn run(self, builder: &Builder) {

src/bootstrap/tool.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,7 @@ impl<'a> Builder<'a> {
646646
self.cargo_out(compiler, tool.get_mode(), *host).join("deps"),
647647
];
648648

649-
// On MSVC a tool may invoke a C compiler (e.g. compiletest in run-make
649+
// On MSVC a tool may invoke a C compiler (e.g., compiletest in run-make
650650
// mode) and that C compiler may need some extra PATH modification. Do
651651
// so here.
652652
if compiler.host.contains("msvc") {

src/liballoc/boxed.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -801,7 +801,7 @@ impl<T: ?Sized> AsMut<T> for Box<T> {
801801
* safe.)
802802
* - It is in practice very useful to have Box<T> be unconditionally
803803
* Unpin because of trait objects, for which the structural auto
804-
* trait functionality does not apply (e.g. Box<dyn Foo> would
804+
* trait functionality does not apply (e.g., Box<dyn Foo> would
805805
* otherwise not be Unpin).
806806
*
807807
* Another type with the same semantics as Box but only a conditional

src/liballoc/collections/binary_heap.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -858,7 +858,7 @@ impl<T: Ord> BinaryHeap<T> {
858858
}
859859
}
860860

861-
/// Hole represents a hole in a slice i.e. an index without valid value
861+
/// Hole represents a hole in a slice i.e., an index without valid value
862862
/// (because it was moved from or duplicated).
863863
/// In drop, `Hole` will restore the slice by filling the hole
864864
/// position with the value that was originally removed.

0 commit comments

Comments
 (0)