From ece9a57d1b6e10ef2ad1dffd19fd6033cdc760ee Mon Sep 17 00:00:00 2001 From: Martin Lindhe Date: Tue, 21 Nov 2017 15:33:45 +0100 Subject: [PATCH] fix some typos --- CONTRIBUTING.md | 2 +- RELEASES.md | 20 +++++++++---------- src/bootstrap/job.rs | 2 +- src/bootstrap/sanity.rs | 2 +- src/ci/docker/README.md | 4 ++-- .../build-netbsd-toolchain.sh | 2 +- src/ci/run.sh | 2 +- src/doc/rustdoc/src/command-line-arguments.md | 4 ++-- src/doc/rustdoc/src/documentation-tests.md | 2 +- .../language-features/optin-builtin-traits.md | 2 +- .../src/language-features/unboxed-closures.md | 2 +- src/etc/installer/exe/modpath.iss | 2 +- src/liballoc/fmt.rs | 2 +- src/liballoc/macros.rs | 2 +- src/liballoc/rc.rs | 2 +- src/liballoc/string.rs | 2 +- src/liballoc/tests/str.rs | 6 +++--- src/liballoc/vec.rs | 2 +- src/libbacktrace/configure | 2 +- src/libbacktrace/ltmain.sh | 2 +- src/libcore/fmt/mod.rs | 2 +- src/librustc_data_structures/array_vec.rs | 2 +- src/libstd/path.rs | 2 +- src/test/mir-opt/issue-41697.rs | 2 +- 24 files changed, 37 insertions(+), 37 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4c296a28e90..e3767df2808 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -421,7 +421,7 @@ Here are those same steps in detail: These instructions are specific to updating `rustfmt`, however they may apply to the other submodules as well. Please help by improving these instructions -if you find any discrepencies or special cases that need to be addressed. +if you find any discrepancies or special cases that need to be addressed. To update the `rustfmt` submodule, start by running the appropriate [`git submodule` command](https://git-scm.com/book/en/v2/Git-Tools-Submodules). diff --git a/RELEASES.md b/RELEASES.md index 7a3b097611e..5edaab63a76 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -624,7 +624,7 @@ Misc ---- - [rustdoc can now use pulldown-cmark with the `--enable-commonmark` flag][40338] -- [Added rust-winbg script for better debugging on Windows][39983] +- [Added rust-windbg script for better debugging on Windows][39983] - [Rust now uses the official cross compiler for NetBSD][40612] - [rustdoc now accepts `#` at the start of files][40828] - [Fixed jemalloc support for musl][41168] @@ -1658,7 +1658,7 @@ Diagnostics ----------- * [Replace macro backtraces with labeled local uses][35702] -* [Improve error message for missplaced doc comments][33922] +* [Improve error message for misplaced doc comments][33922] * [Buffer unix and lock windows to prevent message interleaving][35975] * [Update lifetime errors to specifically note temporaries][36171] * [Special case a few colors for Windows][36178] @@ -1966,7 +1966,7 @@ Language useful](https://github.com/rust-lang/rust/pull/34908) * [`macro_rules!` `stmt` matchers correctly consume the entire contents when inside non-braces invocations](https://github.com/rust-lang/rust/pull/34886) -* [Semicolons are properly required as statement delimeters inside +* [Semicolons are properly required as statement delimiters inside `macro_rules!` invocations](https://github.com/rust-lang/rust/pull/34660) * [`cfg_attr` works on `path` attributes](https://github.com/rust-lang/rust/pull/34546) @@ -2191,7 +2191,7 @@ Compatibility Notes * [`const`s and `static`s may not have unsized types](https://github.com/rust-lang/rust/pull/34443) * [The new follow-set rules that place restrictions on `macro_rules!` in order to ensure syntax forward-compatibility have been enabled](https://github.com/rust-lang/rust/pull/33982) - This was an [ammendment to RFC 550](https://github.com/rust-lang/rfcs/pull/1384), + This was an [amendment to RFC 550](https://github.com/rust-lang/rfcs/pull/1384), and has been a warning since 1.10. * [`cfg` attribute process has been refactored to fix various bugs](https://github.com/rust-lang/rust/pull/33706). This causes breakage in some corner cases. @@ -3348,7 +3348,7 @@ Libraries * `FromStr` is [implemented for `SockAddrV4` and `SockAddrV6`][1.5s]. * There are now `From` conversions [between floating point types][1.5f] where the conversions are lossless. -* Thera are now `From` conversions [between integer types][1.5i] where +* There are now `From` conversions [between integer types][1.5i] where the conversions are lossless. * [`fs::Metadata` implements `Clone`][1.5fs]. * The `parse` method [accepts a leading "+" when parsing @@ -3548,7 +3548,7 @@ Libraries * [`IntoIterator` is implemented for references to `Option` and `Result`][into2]. * [`HashMap` and `HashSet` implement `Extend<&T>` where `T: - Copy`][ext] as part of [RFC 839]. This will cause type inferance + Copy`][ext] as part of [RFC 839]. This will cause type inference breakage in rare situations. * [`BinaryHeap` implements `Debug`][bh2]. * [`Borrow` and `BorrowMut` are implemented for fixed-size @@ -3559,7 +3559,7 @@ Libraries * `&mut T` where `T: std::fmt::Write` [also implements `std::fmt::Write`][mutw]. * [A stable regression in `VecDeque::push_back` and other - capicity-altering methods that caused panics for zero-sized types + capacity-altering methods that caused panics for zero-sized types was fixed][vd]. * [Function pointers implement traits for up to 12 parameters][fp2]. @@ -3746,7 +3746,7 @@ Libraries [better for long data][sh]. * [`AtomicPtr`] implements [`Send`]. * The [`read_to_end`] implementations for [`Stdin`] and [`File`] - are now [specialized to use uninitalized buffers for increased + are now [specialized to use uninitialized buffers for increased performance][rte]. * Lifetime parameters of foreign functions [are now resolved properly][f]. @@ -3875,7 +3875,7 @@ Highlights * This is the first release with [experimental support for linking with the MSVC linker and lib C on Windows (instead of using the GNU variants via MinGW)][win]. It is yet recommended only for the most - intrepid Rusticians. + intrepid Rustaceans. * Benchmark compilations are showing a 30% improvement in bootstrapping over 1.1. @@ -4741,7 +4741,7 @@ Version 0.11.0 (2014-07-02) * Libraries * The standard library is now a "facade" over a number of underlying libraries. This means that development on the standard library should - be speeder due to smaller crates, as well as a clearer line between + be speedier due to smaller crates, as well as a clearer line between all dependencies. * A new library, libcore, lives under the standard library's facade which is Rust's "0-assumption" library, suitable for embedded and diff --git a/src/bootstrap/job.rs b/src/bootstrap/job.rs index 72a5d1338b8..fa3ba02482f 100644 --- a/src/bootstrap/job.rs +++ b/src/bootstrap/job.rs @@ -185,7 +185,7 @@ pub unsafe fn setup(build: &mut Build) { 0, FALSE, DUPLICATE_SAME_ACCESS); // If this failed, well at least we tried! An example of DuplicateHandle - // failing in the past has been when the wrong python2 package spawed this + // failing in the past has been when the wrong python2 package spawned this // build system (e.g. the `python2` package in MSYS instead of // `mingw-w64-x86_64-python2`. Not sure why it failed, but the "failure // mode" here is that we only clean everything up when the build system diff --git a/src/bootstrap/sanity.rs b/src/bootstrap/sanity.rs index 8b23be69a85..bc275b7fc74 100644 --- a/src/bootstrap/sanity.rs +++ b/src/bootstrap/sanity.rs @@ -78,7 +78,7 @@ pub fn check(build: &mut Build) { } let mut cmd_finder = Finder::new(); - // If we've got a git directory we're gona need git to update + // If we've got a git directory we're gonna need git to update // submodules and learn about various other aspects. if build.rust_info.is_git() { cmd_finder.must_have("git"); diff --git a/src/ci/docker/README.md b/src/ci/docker/README.md index 922deba7367..8d4dbc39998 100644 --- a/src/ci/docker/README.md +++ b/src/ci/docker/README.md @@ -36,14 +36,14 @@ a Docker image. 1. Select the "default" virtual machine inside VirtualBox, then click "Settings" - 2. Go to "Shared Folders", click "Add shared foldrer" (the folder icon with + 2. Go to "Shared Folders", click "Add shared folder" (the folder icon with a plus sign), fill in the following information, then click "OK": * Folder path: `E:\rust` * Folder name: `e/rust` * Read-only: ☐ *unchecked* * Auto-mount: ☑ *checked* - * Make Permanant: ☑ *checked* + * Make Permanent: ☑ *checked* 3. VirtualBox might not support creating symbolic links inside a shared folder by default. You can enable it manually by running these from `cmd.exe`: diff --git a/src/ci/docker/dist-x86_64-netbsd/build-netbsd-toolchain.sh b/src/ci/docker/dist-x86_64-netbsd/build-netbsd-toolchain.sh index 9e1b769f6c4..5b4314d57e6 100755 --- a/src/ci/docker/dist-x86_64-netbsd/build-netbsd-toolchain.sh +++ b/src/ci/docker/dist-x86_64-netbsd/build-netbsd-toolchain.sh @@ -52,7 +52,7 @@ curl $URL/2017-03-17-netbsd-comp.tgz | \ cd usr/src # The options, in order, do the following -# * this is an unpriviledged build +# * this is an unprivileged build # * output to a predictable location # * disable various uneeded stuff MKUNPRIVED=yes TOOLDIR=/x-tools/x86_64-unknown-netbsd \ diff --git a/src/ci/run.sh b/src/ci/run.sh index a8a7dd5bc27..ffb3532f497 100755 --- a/src/ci/run.sh +++ b/src/ci/run.sh @@ -37,7 +37,7 @@ if [ "$DIST_SRC" = "" ]; then fi # If we're deploying artifacts then we set the release channel, otherwise if -# we're not deploying then we want to be sure to enable all assertions becauase +# we're not deploying then we want to be sure to enable all assertions because # we'll be running tests # # FIXME: need a scheme for changing this `nightly` value to `beta` and `stable` diff --git a/src/doc/rustdoc/src/command-line-arguments.md b/src/doc/rustdoc/src/command-line-arguments.md index 8e8e2a7ff1d..e51c63cf008 100644 --- a/src/doc/rustdoc/src/command-line-arguments.md +++ b/src/doc/rustdoc/src/command-line-arguments.md @@ -279,7 +279,7 @@ $ rustdoc README.md --markdown-playground-url https://play.rust-lang.org/ ``` When rendering a Markdown file, this flag gives the base URL of the Rust -Playround, to use for generating `Run` buttons. +Playground, to use for generating `Run` buttons. ## `--markdown-no-toc`: don't generate a table of contents @@ -291,7 +291,7 @@ $ rustdoc README.md --markdown-no-toc ``` When generating documentation from a Markdown file, by default, `rustdoc` will -generate a table of contents. This flag supresses that, and no TOC will be +generate a table of contents. This flag suppresses that, and no TOC will be generated. diff --git a/src/doc/rustdoc/src/documentation-tests.md b/src/doc/rustdoc/src/documentation-tests.md index 9c6b86d6ddc..e5a603a3709 100644 --- a/src/doc/rustdoc/src/documentation-tests.md +++ b/src/doc/rustdoc/src/documentation-tests.md @@ -50,7 +50,7 @@ running them. Here's the full algorithm rustdoc uses to preprocess examples: 5. Finally, if the example does not contain `fn main`, the remainder of the text is wrapped in `fn main() { your_code }`. -For more about that caveat in rule 4, see "Documeting Macros" below. +For more about that caveat in rule 4, see "Documenting Macros" below. ## Hiding portions of the example diff --git a/src/doc/unstable-book/src/language-features/optin-builtin-traits.md b/src/doc/unstable-book/src/language-features/optin-builtin-traits.md index 97b57c690fc..5c8124c9c6b 100644 --- a/src/doc/unstable-book/src/language-features/optin-builtin-traits.md +++ b/src/doc/unstable-book/src/language-features/optin-builtin-traits.md @@ -10,7 +10,7 @@ The `optin_builtin_traits` feature gate allows you to define auto traits. Auto traits, like [`Send`] or [`Sync`] in the standard library, are marker traits that are automatically implemented for every type, unless the type, or a type it contains, -has explictly opted out via a negative impl. +has explicitly opted out via a negative impl. [`Send`]: https://doc.rust-lang.org/std/marker/trait.Send.html [`Sync`]: https://doc.rust-lang.org/std/marker/trait.Sync.html diff --git a/src/doc/unstable-book/src/language-features/unboxed-closures.md b/src/doc/unstable-book/src/language-features/unboxed-closures.md index 0eaed7a1989..d845c99a88a 100644 --- a/src/doc/unstable-book/src/language-features/unboxed-closures.md +++ b/src/doc/unstable-book/src/language-features/unboxed-closures.md @@ -9,7 +9,7 @@ See Also: [`fn_traits`](library-features/fn-traits.html) ---- The `unboxed_closures` feature allows you to write functions using the `"rust-call"` ABI, -required for implmenting the [`Fn*`] family of traits. `"rust-call"` functions must have +required for implementing the [`Fn*`] family of traits. `"rust-call"` functions must have exactly one (non self) argument, a tuple representing the argument list. [`Fn*`]: https://doc.rust-lang.org/std/ops/trait.Fn.html diff --git a/src/etc/installer/exe/modpath.iss b/src/etc/installer/exe/modpath.iss index 35cc0097035..2cfc8698c4b 100644 --- a/src/etc/installer/exe/modpath.iss +++ b/src/etc/installer/exe/modpath.iss @@ -144,7 +144,7 @@ begin end; end; -// Split a string into an array using passed delimeter +// Split a string into an array using passed delimiter procedure Explode(var Dest: TArrayOfString; Text: String; Separator: String); var i: Integer; diff --git a/src/liballoc/fmt.rs b/src/liballoc/fmt.rs index 77f65412bd3..7148a1143fd 100644 --- a/src/liballoc/fmt.rs +++ b/src/liballoc/fmt.rs @@ -536,7 +536,7 @@ /// assert_eq!(s, "Hello, world!"); /// ``` /// -/// Please note that using [`format!`] might be preferrable. +/// Please note that using [`format!`] might be preferable. /// Example: /// /// ``` diff --git a/src/liballoc/macros.rs b/src/liballoc/macros.rs index c2a3019515f..472eef77d79 100644 --- a/src/liballoc/macros.rs +++ b/src/liballoc/macros.rs @@ -72,7 +72,7 @@ /// Creates a `String` using interpolation of runtime expressions. /// -/// The first argument `format!` recieves is a format string. This must be a string +/// The first argument `format!` receives is a format string. This must be a string /// literal. The power of the formatting string is in the `{}`s contained. /// /// Additional parameters passed to `format!` replace the `{}`s within the diff --git a/src/liballoc/rc.rs b/src/liballoc/rc.rs index 72b9fa0eb47..58f08fd8bc1 100644 --- a/src/liballoc/rc.rs +++ b/src/liballoc/rc.rs @@ -346,7 +346,7 @@ pub fn try_unwrap(this: Self) -> Result { unsafe { let val = ptr::read(&*this); // copy the contained object - // Indicate to Weaks that they can't be promoted by decrememting + // Indicate to Weaks that they can't be promoted by decrementing // the strong count, and then remove the implicit "strong weak" // pointer while also handling drop logic by just crafting a // fake Weak. diff --git a/src/liballoc/string.rs b/src/liballoc/string.rs index 25fcc1ccdab..cd0f4a22e9c 100644 --- a/src/liballoc/string.rs +++ b/src/liballoc/string.rs @@ -596,7 +596,7 @@ pub fn from_utf8_lossy<'a>(v: &'a [u8]) -> Cow<'a, str> { /// Decode a UTF-16 encoded vector `v` into a `String`, returning [`Err`] /// if `v` contains any invalid data. /// - /// [`Err`]: ../../std/result/enum.Result.htlm#variant.Err + /// [`Err`]: ../../std/result/enum.Result.html#variant.Err /// /// # Examples /// diff --git a/src/liballoc/tests/str.rs b/src/liballoc/tests/str.rs index 6b075e7ac0e..a14a5d32738 100644 --- a/src/liballoc/tests/str.rs +++ b/src/liballoc/tests/str.rs @@ -1427,12 +1427,12 @@ fn cmp_search_to_vec<'a, P: Pattern<'a>>(rev: bool, pat: P, haystack: &'a str, Reject(6, 7), Match (7, 7), ]); - make_test!(str_searcher_mulibyte_haystack, " ", "├──", [ + make_test!(str_searcher_multibyte_haystack, " ", "├──", [ Reject(0, 3), Reject(3, 6), Reject(6, 9), ]); - make_test!(str_searcher_empty_needle_mulibyte_haystack, "", "├──", [ + make_test!(str_searcher_empty_needle_multibyte_haystack, "", "├──", [ Match (0, 0), Reject(0, 3), Match (3, 3), @@ -1455,7 +1455,7 @@ fn cmp_search_to_vec<'a, P: Pattern<'a>>(rev: bool, pat: P, haystack: &'a str, Match (5, 6), Reject(6, 7), ]); - make_test!(char_searcher_mulibyte_haystack, ' ', "├──", [ + make_test!(char_searcher_multibyte_haystack, ' ', "├──", [ Reject(0, 3), Reject(3, 6), Reject(6, 9), diff --git a/src/liballoc/vec.rs b/src/liballoc/vec.rs index 5aca199cf40..c29449a241e 100644 --- a/src/liballoc/vec.rs +++ b/src/liballoc/vec.rs @@ -1089,7 +1089,7 @@ pub fn drain(&mut self, range: R) -> Drain // Memory safety // // When the Drain is first created, it shortens the length of - // the source vector to make sure no uninitalized or moved-from elements + // the source vector to make sure no uninitialized or moved-from elements // are accessible at all if the Drain's destructor never gets to run. // // Drain will ptr::read out the values to remove. diff --git a/src/libbacktrace/configure b/src/libbacktrace/configure index 873220794bd..8bdb29d2560 100755 --- a/src/libbacktrace/configure +++ b/src/libbacktrace/configure @@ -14584,7 +14584,7 @@ func_basename () # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. -# value retuned in "$func_basename_result" +# value returned in "$func_basename_result" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. diff --git a/src/libbacktrace/ltmain.sh b/src/libbacktrace/ltmain.sh index eaef55a5933..eff9e62be8a 100644 --- a/src/libbacktrace/ltmain.sh +++ b/src/libbacktrace/ltmain.sh @@ -177,7 +177,7 @@ basename="s,^.*/,," # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. -# value retuned in "$func_basename_result" +# value returned in "$func_basename_result" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. diff --git a/src/libcore/fmt/mod.rs b/src/libcore/fmt/mod.rs index e2d61890c30..cc324b585bc 100644 --- a/src/libcore/fmt/mod.rs +++ b/src/libcore/fmt/mod.rs @@ -952,7 +952,7 @@ pub trait UpperExp { /// assert_eq!(output, "Hello world!"); /// ``` /// -/// Please note that using [`write!`] might be preferrable. Example: +/// Please note that using [`write!`] might be preferable. Example: /// /// ``` /// use std::fmt::Write; diff --git a/src/librustc_data_structures/array_vec.rs b/src/librustc_data_structures/array_vec.rs index 1e67461e055..1b39e029604 100644 --- a/src/librustc_data_structures/array_vec.rs +++ b/src/librustc_data_structures/array_vec.rs @@ -111,7 +111,7 @@ pub fn drain(&mut self, range: R) -> Drain // Memory safety // // When the Drain is first created, it shortens the length of - // the source vector to make sure no uninitalized or moved-from elements + // the source vector to make sure no uninitialized or moved-from elements // are accessible at all if the Drain's destructor never gets to run. // // Drain will ptr::read out the values to remove. diff --git a/src/libstd/path.rs b/src/libstd/path.rs index 69922470cff..4e35cf840de 100644 --- a/src/libstd/path.rs +++ b/src/libstd/path.rs @@ -3752,7 +3752,7 @@ pub fn test_set_extension() { } #[test] - fn test_eq_recievers() { + fn test_eq_receivers() { use borrow::Cow; let borrowed: &Path = Path::new("foo/bar"); diff --git a/src/test/mir-opt/issue-41697.rs b/src/test/mir-opt/issue-41697.rs index 47eeffe35a8..4d2ba5e2b12 100644 --- a/src/test/mir-opt/issue-41697.rs +++ b/src/test/mir-opt/issue-41697.rs @@ -12,7 +12,7 @@ // artificial cycles: during type-checking, we had to get the MIR for // the constant expressions in `[u8; 2]`, which in turn would trigger // an attempt to get the item-path, which in turn would request the -// types of the impl, which would trigger a cycle. We supressed this +// types of the impl, which would trigger a cycle. We suppressed this // cycle now by forcing mir-dump to avoid asking for types of an impl. #![feature(rustc_attrs)] -- GitLab