From 71120ef1e5cb885ee45e6148970db6ce93ce1aca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Kr=C3=BCger?= Date: Sun, 19 Aug 2018 15:30:23 +0200 Subject: [PATCH] Fix typos found by codespell. --- src/ci/docker/scripts/musl.sh | 2 +- src/doc/index.md | 2 +- src/doc/rustc/src/codegen-options/index.md | 2 +- src/doc/rustc/src/lints/listing/deny-by-default.md | 4 ++-- src/doc/rustdoc/src/unstable-features.md | 2 +- .../language-features/infer-outlives-requirements.md | 4 ++-- .../infer-static-outlives-requirements.md | 4 ++-- src/liballoc/raw_vec.rs | 2 +- src/libcore/future/future_obj.rs | 4 ++-- src/libcore/ptr.rs | 2 +- src/libcore/slice/mod.rs | 6 +++--- src/libfmt_macros/lib.rs | 2 +- src/libpanic_unwind/seh.rs | 4 ++-- src/libproc_macro/lib.rs | 2 +- src/librustc/infer/canonical/mod.rs | 2 +- src/librustc/infer/error_reporting/mod.rs | 2 +- src/librustc/infer/higher_ranked/mod.rs | 2 +- src/librustc/mir/interpret/value.rs | 2 +- src/librustc/mir/mod.rs | 4 ++-- src/librustc/mir/traversal.rs | 2 +- src/librustc/traits/auto_trait.rs | 8 ++++---- src/librustc/traits/error_reporting.rs | 2 +- src/librustc/traits/query/dropck_outlives.rs | 2 +- src/librustc/ty/context.rs | 2 +- src/librustc/ty/mod.rs | 2 +- src/librustc/ty/query/job.rs | 2 +- src/librustc_codegen_llvm/back/write.rs | 4 ++-- src/librustc_codegen_llvm/mir/block.rs | 2 +- src/librustc_data_structures/sync.rs | 4 ++-- src/librustc_lint/builtin.rs | 2 +- src/librustc_lint/types.rs | 2 +- src/librustc_metadata/native_libs.rs | 2 +- src/librustc_mir/borrow_check/nll/invalidation.rs | 2 +- src/librustc_mir/borrow_check/nll/type_check/mod.rs | 2 +- src/librustc_mir/borrow_check/places_conflict.rs | 2 +- src/librustc_mir/dataflow/mod.rs | 2 +- src/librustc_mir/interpret/eval_context.rs | 2 +- src/librustc_mir/interpret/memory.rs | 2 +- src/librustc_mir/transform/inline.rs | 6 +++--- src/librustc_mir/transform/promote_consts.rs | 2 +- src/librustc_mir/transform/uniform_array_move_out.rs | 12 ++++++------ src/librustc_mir/util/pretty.rs | 2 +- src/librustc_resolve/lib.rs | 2 +- src/librustc_traits/dropck_outlives.rs | 2 +- src/librustc_typeck/check/generator_interior.rs | 2 +- src/librustc_typeck/check/mod.rs | 4 ++-- src/librustc_typeck/check/regionck.rs | 2 +- src/librustc_typeck/check/writeback.rs | 2 +- src/librustc_typeck/impl_wf_check.rs | 2 +- src/librustdoc/clean/auto_trait.rs | 4 ++-- src/librustdoc/clean/cfg.rs | 2 +- src/librustdoc/html/render.rs | 2 +- src/libstd/future.rs | 2 +- src/libstd/io/buffered.rs | 2 +- src/libstd/memchr.rs | 2 +- src/libstd/sync/once.rs | 2 +- src/libstd/sys/unix/fs.rs | 2 +- src/libstd/sys/unix/net.rs | 2 +- src/libsyntax/ext/expand.rs | 2 +- src/libsyntax/ext/tt/macro_parser.rs | 4 ++-- src/libsyntax/ext/tt/quoted.rs | 2 +- src/libsyntax/parse/parser.rs | 10 +++++----- src/libsyntax_ext/format.rs | 2 +- src/libsyntax_pos/symbol.rs | 2 +- .../item-collection/cross-crate-trait-method.rs | 2 +- .../auxiliary/pub_and_stability.rs | 4 ++-- src/test/run-fail/run-unexported-tests.rs | 4 ++-- src/test/run-make-fulldeps/hir-tree/Makefile | 2 +- .../run-make-fulldeps/rustdoc-error-lines/Makefile | 2 +- .../run-make-fulldeps/sanitizer-cdylib-link/Makefile | 2 +- .../run-make-fulldeps/sanitizer-dylib-link/Makefile | 2 +- src/test/run-pass/dropck_legal_cycles.rs | 2 +- src/test/run-pass/ifmt.rs | 2 +- .../run-pass/issue-15881-model-lexer-dotdotdot.rs | 2 +- src/test/run-pass/issue-20616.rs | 2 +- src/test/run-pass/issue-33903.rs | 2 +- src/test/run-pass/issue-48962.rs | 2 +- src/test/run-pass/match-range.rs | 2 +- src/test/run-pass/match-reassign.rs | 2 +- src/test/run-pass/packed-struct-optimized-enum.rs | 2 +- src/test/run-pass/signal-alternate-stack-cleanup.rs | 2 +- src/test/rustdoc/inline_cross/auxiliary/macro-vis.rs | 2 +- .../associated-types-incomplete-object.rs | 2 +- src/test/ui/borrowck/issue-45983.rs | 2 +- src/test/ui/defaulted-never-note.rs | 2 +- src/test/ui/error-codes/E0401.stderr | 2 +- .../ui/imports/local-modularized-tricky-fail-2.rs | 2 +- src/test/ui/issues/issue-31845.rs | 2 +- .../ui/issues/issue-45696-no-variant-box-recur.rs | 2 +- src/test/ui/issues/issue-50761.rs | 2 +- src/test/ui/label/label_break_value_illegal_uses.rs | 2 +- .../liveness-assign-imm-local-notes.rs | 4 ++-- src/test/ui/lint/lint-unused-extern-crate.rs | 2 +- .../ui/rfc1598-generic-associated-types/shadowing.rs | 2 +- src/test/ui/rust-2018/async-ident-allowed.rs | 2 +- .../single-use-lifetime/two-uses-in-fn-arguments.rs | 2 +- src/test/ui/variadic/variadic-ffi-2.rs | 2 +- src/test/ui/variadic/variadic-ffi.rs | 4 ++-- src/test/ui/where-clauses/where-for-self-2.rs | 2 +- 99 files changed, 130 insertions(+), 130 deletions(-) diff --git a/src/ci/docker/scripts/musl.sh b/src/ci/docker/scripts/musl.sh index 4ca7389d6d1a5..e6a48a96da464 100644 --- a/src/ci/docker/scripts/musl.sh +++ b/src/ci/docker/scripts/musl.sh @@ -32,7 +32,7 @@ shift export CFLAGS="-fPIC $CFLAGS" -# FIXME: remove the patch when upate to 1.1.20 +# FIXME: remove the patch when updating to 1.1.20 MUSL=musl-1.1.19 # may have been downloaded in a previous run diff --git a/src/doc/index.md b/src/doc/index.md index 3a4f51069fc3b..11313ba99e1a6 100644 --- a/src/doc/index.md +++ b/src/doc/index.md @@ -34,7 +34,7 @@ minimum. It also includes exercises! # Use Rust -Once you've gotten familliar with the language, these resources can help you +Once you've gotten familiar with the language, these resources can help you when you're actually using it day-to-day. ## The Standard Library diff --git a/src/doc/rustc/src/codegen-options/index.md b/src/doc/rustc/src/codegen-options/index.md index eff09428902e8..4fc5f42dd5527 100644 --- a/src/doc/rustc/src/codegen-options/index.md +++ b/src/doc/rustc/src/codegen-options/index.md @@ -153,7 +153,7 @@ This option allows you to put extra data in each output filename. This flag lets you control how many threads are used when doing code generation. -Increasing paralellism may speed up compile times, but may also +Increasing parallelism may speed up compile times, but may also produce slower code. ## remark diff --git a/src/doc/rustc/src/lints/listing/deny-by-default.md b/src/doc/rustc/src/lints/listing/deny-by-default.md index 3a85a40fd1fdb..ff9e0235a0435 100644 --- a/src/doc/rustc/src/lints/listing/deny-by-default.md +++ b/src/doc/rustc/src/lints/listing/deny-by-default.md @@ -56,7 +56,7 @@ mod m { pub struct S(u8); fn f() { - // this is trying to use S from the 'use' line, but becuase the `u8` is + // this is trying to use S from the 'use' line, but because the `u8` is // not pub, it is private ::S; } @@ -103,7 +103,7 @@ This warning can always be fixed by removing the unused pattern in the ## mutable-transmutes -This lint catches transmuting from `&T` to `&mut T` becuase it is undefined +This lint catches transmuting from `&T` to `&mut T` because it is undefined behavior. Some example code that triggers this lint: ```rust,ignore diff --git a/src/doc/rustdoc/src/unstable-features.md b/src/doc/rustdoc/src/unstable-features.md index 7f110d6a3d22c..a91c2cd71cde3 100644 --- a/src/doc/rustdoc/src/unstable-features.md +++ b/src/doc/rustdoc/src/unstable-features.md @@ -1,6 +1,6 @@ # Unstable features -Rustdoc is under active developement, and like the Rust compiler, some features are only available +Rustdoc is under active development, and like the Rust compiler, some features are only available on the nightly releases. Some of these are new and need some more testing before they're able to get released to the world at large, and some of them are tied to features in the Rust compiler that are themselves unstable. Several features here require a matching `#![feature(...)]` attribute to diff --git a/src/doc/unstable-book/src/language-features/infer-outlives-requirements.md b/src/doc/unstable-book/src/language-features/infer-outlives-requirements.md index 73c7eafdb98d5..fe82f8555da32 100644 --- a/src/doc/unstable-book/src/language-features/infer-outlives-requirements.md +++ b/src/doc/unstable-book/src/language-features/infer-outlives-requirements.md @@ -6,12 +6,12 @@ The tracking issue for this feature is: [#44493] ------------------------ The `infer_outlives_requirements` feature indicates that certain -outlives requirements can be infered by the compiler rather than +outlives requirements can be inferred by the compiler rather than stating them explicitly. For example, currently generic struct definitions that contain references, require where-clauses of the form T: 'a. By using -this feature the outlives predicates will be infered, although +this feature the outlives predicates will be inferred, although they may still be written explicitly. ```rust,ignore (pseudo-Rust) diff --git a/src/doc/unstable-book/src/language-features/infer-static-outlives-requirements.md b/src/doc/unstable-book/src/language-features/infer-static-outlives-requirements.md index f50472fb41e31..6187f395b0498 100644 --- a/src/doc/unstable-book/src/language-features/infer-static-outlives-requirements.md +++ b/src/doc/unstable-book/src/language-features/infer-static-outlives-requirements.md @@ -6,7 +6,7 @@ The tracking issue for this feature is: [#44493] ------------------------ The `infer_static_outlives_requirements` feature indicates that certain -`'static` outlives requirements can be infered by the compiler rather than +`'static` outlives requirements can be inferred by the compiler rather than stating them explicitly. Note: It is an accompanying feature to `infer_outlives_requirements`, @@ -14,7 +14,7 @@ which must be enabled to infer outlives requirements. For example, currently generic struct definitions that contain references, require where-clauses of the form T: 'static. By using -this feature the outlives predicates will be infered, although +this feature the outlives predicates will be inferred, although they may still be written explicitly. ```rust,ignore (pseudo-Rust) diff --git a/src/liballoc/raw_vec.rs b/src/liballoc/raw_vec.rs index 4f2686abf4515..8b46637def01c 100644 --- a/src/liballoc/raw_vec.rs +++ b/src/liballoc/raw_vec.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![unstable(feature = "raw_vec_internals", reason = "implemention detail", issue = "0")] +#![unstable(feature = "raw_vec_internals", reason = "implementation detail", issue = "0")] #![doc(hidden)] use core::cmp; diff --git a/src/libcore/future/future_obj.rs b/src/libcore/future/future_obj.rs index 6045fac2b4b3d..2df870a011dcb 100644 --- a/src/libcore/future/future_obj.rs +++ b/src/libcore/future/future_obj.rs @@ -27,7 +27,7 @@ use task::{Context, Poll}; /// - The `Future` trait is currently not object safe: The `Future::poll` /// method makes uses the arbitrary self types feature and traits in which /// this feature is used are currently not object safe due to current compiler -/// limitations. (See tracking issue for arbitray self types for more +/// limitations. (See tracking issue for arbitrary self types for more /// information #44874) pub struct LocalFutureObj<'a, T> { ptr: *mut (), @@ -102,7 +102,7 @@ impl<'a, T> Drop for LocalFutureObj<'a, T> { /// - The `Future` trait is currently not object safe: The `Future::poll` /// method makes uses the arbitrary self types feature and traits in which /// this feature is used are currently not object safe due to current compiler -/// limitations. (See tracking issue for arbitray self types for more +/// limitations. (See tracking issue for arbitrary self types for more /// information #44874) pub struct FutureObj<'a, T>(LocalFutureObj<'a, T>); diff --git a/src/libcore/ptr.rs b/src/libcore/ptr.rs index 61033e7511253..86b27d91886d2 100644 --- a/src/libcore/ptr.rs +++ b/src/libcore/ptr.rs @@ -2291,7 +2291,7 @@ impl *mut T { /// /// If we ever decide to make it possible to call the intrinsic with `a` that is not a /// power-of-two, it will probably be more prudent to just change to a naive implementation rather -/// than trying to adapt this to accomodate that change. +/// than trying to adapt this to accommodate that change. /// /// Any questions go to @nagisa. #[lang="align_offset"] diff --git a/src/libcore/slice/mod.rs b/src/libcore/slice/mod.rs index 88fdd76763893..d61d93a85e474 100644 --- a/src/libcore/slice/mod.rs +++ b/src/libcore/slice/mod.rs @@ -1680,7 +1680,7 @@ impl [T] { } } - /// Function to calculate lenghts of the middle and trailing slice for `align_to{,_mut}`. + /// Function to calculate lengths of the middle and trailing slice for `align_to{,_mut}`. fn align_to_offsets(&self) -> (usize, usize) { // What we gonna do about `rest` is figure out what multiple of `U`s we can put in a // lowest number of `T`s. And how many `T`s we need for each such "multiple". @@ -1740,7 +1740,7 @@ impl [T] { (us_len, ts_len) } - /// Transmute the slice to a slice of another type, ensuring aligment of the types is + /// Transmute the slice to a slice of another type, ensuring alignment of the types is /// maintained. /// /// This method splits the slice into three distinct slices: prefix, correctly aligned middle @@ -1792,7 +1792,7 @@ impl [T] { } } - /// Transmute the slice to a slice of another type, ensuring aligment of the types is + /// Transmute the slice to a slice of another type, ensuring alignment of the types is /// maintained. /// /// This method splits the slice into three distinct slices: prefix, correctly aligned middle diff --git a/src/libfmt_macros/lib.rs b/src/libfmt_macros/lib.rs index e2380f0fe2ff3..1bac6d22d3744 100644 --- a/src/libfmt_macros/lib.rs +++ b/src/libfmt_macros/lib.rs @@ -154,7 +154,7 @@ pub struct Parser<'a> { style: Option, /// How many newlines have been seen in the string so far, to adjust the error spans seen_newlines: usize, - /// Start and end byte offset of every successfuly parsed argument + /// Start and end byte offset of every successfully parsed argument pub arg_places: Vec<(usize, usize)>, } diff --git a/src/libpanic_unwind/seh.rs b/src/libpanic_unwind/seh.rs index 8cbc4a623fa05..015be2dea2157 100644 --- a/src/libpanic_unwind/seh.rs +++ b/src/libpanic_unwind/seh.rs @@ -142,7 +142,7 @@ mod imp { #[repr(C)] pub struct _ThrowInfo { - pub attribues: c_uint, + pub attributes: c_uint, pub pnfnUnwind: imp::ptr_t, pub pForwardCompat: imp::ptr_t, pub pCatchableTypeArray: imp::ptr_t, @@ -178,7 +178,7 @@ pub struct _TypeDescriptor { } static mut THROW_INFO: _ThrowInfo = _ThrowInfo { - attribues: 0, + attributes: 0, pnfnUnwind: ptr!(0), pForwardCompat: ptr!(0), pCatchableTypeArray: ptr!(0), diff --git a/src/libproc_macro/lib.rs b/src/libproc_macro/lib.rs index b54054752eaf1..ae9c04c7b7c78 100644 --- a/src/libproc_macro/lib.rs +++ b/src/libproc_macro/lib.rs @@ -12,7 +12,7 @@ //! //! This library, provided by the standard distribution, provides the types //! consumed in the interfaces of procedurally defined macro definitions such as -//! function-like macros `#[proc_macro]`, macro attribures `#[proc_macro_attribute]` and +//! function-like macros `#[proc_macro]`, macro attributes `#[proc_macro_attribute]` and //! custom derive attributes`#[proc_macro_derive]`. //! //! Note that this crate is intentionally bare-bones currently. diff --git a/src/librustc/infer/canonical/mod.rs b/src/librustc/infer/canonical/mod.rs index 958b339106050..75c88d3bf2591 100644 --- a/src/librustc/infer/canonical/mod.rs +++ b/src/librustc/infer/canonical/mod.rs @@ -49,7 +49,7 @@ pub mod query_result; mod substitute; /// A "canonicalized" type `V` is one where all free inference -/// variables have been rewriten to "canonical vars". These are +/// variables have been rewritten to "canonical vars". These are /// numbered starting from 0 in order of first appearance. #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, RustcDecodable, RustcEncodable)] pub struct Canonical<'gcx, V> { diff --git a/src/librustc/infer/error_reporting/mod.rs b/src/librustc/infer/error_reporting/mod.rs index 212821cac2e4a..4fe6584ae9dd7 100644 --- a/src/librustc/infer/error_reporting/mod.rs +++ b/src/librustc/infer/error_reporting/mod.rs @@ -561,7 +561,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> { value.push_highlighted("<"); } - // Output the lifetimes fot the first type + // Output the lifetimes for the first type let lifetimes = sub.regions() .map(|lifetime| { let s = lifetime.to_string(); diff --git a/src/librustc/infer/higher_ranked/mod.rs b/src/librustc/infer/higher_ranked/mod.rs index cb4e1ab65e759..bb1c9448132c1 100644 --- a/src/librustc/infer/higher_ranked/mod.rs +++ b/src/librustc/infer/higher_ranked/mod.rs @@ -527,7 +527,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> { * we're not careful, it will succeed. * * The reason is that when we walk through the subtyping - * algorith, we begin by replacing `'a` with a skolemized + * algorithm, we begin by replacing `'a` with a skolemized * variable `'1`. We then have `fn(_#0t) <: fn(&'1 int)`. This * can be made true by unifying `_#0t` with `&'1 int`. In the * process, we create a fresh variable for the skolemized diff --git a/src/librustc/mir/interpret/value.rs b/src/librustc/mir/interpret/value.rs index f569f4def143f..3e8b44b87fe74 100644 --- a/src/librustc/mir/interpret/value.rs +++ b/src/librustc/mir/interpret/value.rs @@ -68,7 +68,7 @@ impl<'tcx> ConstValue<'tcx> { /// A `Value` represents a single self-contained Rust value. /// -/// A `Value` can either refer to a block of memory inside an allocation (`ByRef`) or to a primitve +/// A `Value` can either refer to a block of memory inside an allocation (`ByRef`) or to a primitive /// value held directly, outside of any allocation (`Scalar`). For `ByRef`-values, we remember /// whether the pointer is supposed to be aligned or not (also see Place). /// diff --git a/src/librustc/mir/mod.rs b/src/librustc/mir/mod.rs index 8ceff303774b5..54fe30e609d38 100644 --- a/src/librustc/mir/mod.rs +++ b/src/librustc/mir/mod.rs @@ -927,11 +927,11 @@ pub enum TerminatorKind<'tcx> { /// Drop(P, goto BB1, unwind BB2) /// } /// BB1 { - /// // P is now unitialized + /// // P is now uninitialized /// P <- V /// } /// BB2 { - /// // P is now unitialized -- its dtor panicked + /// // P is now uninitialized -- its dtor panicked /// P <- V /// } /// ``` diff --git a/src/librustc/mir/traversal.rs b/src/librustc/mir/traversal.rs index c178a9063c9ac..c919793fe3e03 100644 --- a/src/librustc/mir/traversal.rs +++ b/src/librustc/mir/traversal.rs @@ -171,7 +171,7 @@ impl<'a, 'tcx> Postorder<'a, 'tcx> { // (A, [C])] // // Now that the top of the stack has no successors we can traverse, each item will - // be popped off during iteration until we get back to `A`. This yeilds [E, D, B]. + // be popped off during iteration until we get back to `A`. This yields [E, D, B]. // // When we yield `B` and call `traverse_successor`, we push `C` to the stack, but // since we've already visited `E`, that child isn't added to the stack. The last diff --git a/src/librustc/traits/auto_trait.rs b/src/librustc/traits/auto_trait.rs index fd8c2d45e644a..a0882f8f92b46 100644 --- a/src/librustc/traits/auto_trait.rs +++ b/src/librustc/traits/auto_trait.rs @@ -264,12 +264,12 @@ impl<'a, 'tcx> AutoTraitFinder<'a, 'tcx> { // The core logic responsible for computing the bounds for our synthesized impl. // // To calculate the bounds, we call SelectionContext.select in a loop. Like FulfillmentContext, - // we recursively select the nested obligations of predicates we encounter. However, whenver we + // we recursively select the nested obligations of predicates we encounter. However, whenever we // encounter an UnimplementedError involving a type parameter, we add it to our ParamEnv. Since // our goal is to determine when a particular type implements an auto trait, Unimplemented // errors tell us what conditions need to be met. // - // This method ends up working somewhat similary to FulfillmentContext, but with a few key + // This method ends up working somewhat similarly to FulfillmentContext, but with a few key // differences. FulfillmentContext works under the assumption that it's dealing with concrete // user code. According, it considers all possible ways that a Predicate could be met - which // isn't always what we want for a synthesized impl. For example, given the predicate 'T: @@ -289,11 +289,11 @@ impl<'a, 'tcx> AutoTraitFinder<'a, 'tcx> { // we'll pick up any nested bounds, without ever inferring that 'T: IntoIterator' needs to // hold. // - // One additonal consideration is supertrait bounds. Normally, a ParamEnv is only ever + // One additional consideration is supertrait bounds. Normally, a ParamEnv is only ever // consutrcted once for a given type. As part of the construction process, the ParamEnv will // have any supertrait bounds normalized - e.g. if we have a type 'struct Foo', the // ParamEnv will contain 'T: Copy' and 'T: Clone', since 'Copy: Clone'. When we construct our - // own ParamEnv, we need to do this outselves, through traits::elaborate_predicates, or else + // own ParamEnv, we need to do this ourselves, through traits::elaborate_predicates, or else // SelectionContext will choke on the missing predicates. However, this should never show up in // the final synthesized generics: we don't want our generated docs page to contain something // like 'T: Copy + Clone', as that's redundant. Therefore, we keep track of a separate diff --git a/src/librustc/traits/error_reporting.rs b/src/librustc/traits/error_reporting.rs index 113adda3ccb29..4aea76f911676 100644 --- a/src/librustc/traits/error_reporting.rs +++ b/src/librustc/traits/error_reporting.rs @@ -652,7 +652,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> { } // If this error is due to `!: Trait` not implemented but `(): Trait` is - // implemented, and fallback has occured, then it could be due to a + // implemented, and fallback has occurred, then it could be due to a // variable that used to fallback to `()` now falling back to `!`. Issue a // note informing about the change in behaviour. if trait_predicate.skip_binder().self_ty().is_never() diff --git a/src/librustc/traits/query/dropck_outlives.rs b/src/librustc/traits/query/dropck_outlives.rs index e41ed0824b4ee..ca3a5e2bef43a 100644 --- a/src/librustc/traits/query/dropck_outlives.rs +++ b/src/librustc/traits/query/dropck_outlives.rs @@ -82,7 +82,7 @@ impl<'cx, 'gcx, 'tcx> At<'cx, 'gcx, 'tcx> { // Errors and ambiuity in dropck occur in two cases: // - unresolved inference variables at the end of typeck // - non well-formed types where projections cannot be resolved - // Either of these should hvae created an error before. + // Either of these should have created an error before. tcx.sess .delay_span_bug(span, "dtorck encountered internal error"); return InferOk { diff --git a/src/librustc/ty/context.rs b/src/librustc/ty/context.rs index 42948a3f5f18e..844ed3321e1ff 100644 --- a/src/librustc/ty/context.rs +++ b/src/librustc/ty/context.rs @@ -892,7 +892,7 @@ pub struct GlobalCtxt<'tcx> { pub(crate) queries: query::Queries<'tcx>, - // Records the free variables refrenced by every closure + // Records the free variables referenced by every closure // expression. Do not track deps for this, just recompute it from // scratch every time. freevars: FxHashMap>>, diff --git a/src/librustc/ty/mod.rs b/src/librustc/ty/mod.rs index 6c27d527ae891..4902356321c36 100644 --- a/src/librustc/ty/mod.rs +++ b/src/librustc/ty/mod.rs @@ -1503,7 +1503,7 @@ impl UniverseIndex { /// Creates a universe index from the given integer. Not to be /// used lightly lest you pick a bad value. But sometimes we - /// convert universe indicies into integers and back for various + /// convert universe indices into integers and back for various /// reasons. pub fn from_u32(index: u32) -> Self { UniverseIndex(index) diff --git a/src/librustc/ty/query/job.rs b/src/librustc/ty/query/job.rs index 56a8c13a8d3b8..e3b0f8c4570df 100644 --- a/src/librustc/ty/query/job.rs +++ b/src/librustc/ty/query/job.rs @@ -262,7 +262,7 @@ where } } - // Visit the explict waiters which use condvars and are resumable + // Visit the explicit waiters which use condvars and are resumable for (i, waiter) in query.latch.info.lock().waiters.iter().enumerate() { if let Some(ref waiter_query) = waiter.query { if visit(waiter.span, waiter_query.clone()).is_some() { diff --git a/src/librustc_codegen_llvm/back/write.rs b/src/librustc_codegen_llvm/back/write.rs index b62836ec255d4..601999cb77450 100644 --- a/src/librustc_codegen_llvm/back/write.rs +++ b/src/librustc_codegen_llvm/back/write.rs @@ -327,7 +327,7 @@ struct AssemblerCommand { /// Additional resources used by optimize_and_codegen (not module specific) #[derive(Clone)] pub struct CodegenContext { - // Resouces needed when running LTO + // Resources needed when running LTO pub time_passes: bool, pub lto: Lto, pub no_landing_pads: bool, @@ -595,7 +595,7 @@ unsafe fn optimize(cgcx: &CodegenContext, -C passes=name-anon-globals to the compiler command line."); } else { bug!("We are using thin LTO buffers without running the NameAnonGlobals pass. \ - This will likely cause errors in LLVM and shoud never happen."); + This will likely cause errors in LLVM and should never happen."); } } } diff --git a/src/librustc_codegen_llvm/mir/block.rs b/src/librustc_codegen_llvm/mir/block.rs index 4e389c3b915f0..47214450e9a61 100644 --- a/src/librustc_codegen_llvm/mir/block.rs +++ b/src/librustc_codegen_llvm/mir/block.rs @@ -655,7 +655,7 @@ impl FunctionCx<'a, 'll, 'tcx> { llargs.push(b); return; } - _ => bug!("codegen_argument: {:?} invalid for pair arugment", op) + _ => bug!("codegen_argument: {:?} invalid for pair argument", op) } } diff --git a/src/librustc_data_structures/sync.rs b/src/librustc_data_structures/sync.rs index d4c6b1c2ced81..6989cdc0a9a15 100644 --- a/src/librustc_data_structures/sync.rs +++ b/src/librustc_data_structures/sync.rs @@ -26,7 +26,7 @@ //! //! `MTLock` is a mutex which disappears if cfg!(parallel_queries) is false. //! -//! `MTRef` is a immutable refernce if cfg!(parallel_queries), and an mutable reference otherwise. +//! `MTRef` is a immutable reference if cfg!(parallel_queries), and an mutable reference otherwise. //! //! `rustc_erase_owner!` erases a OwningRef owner into Erased or Erased + Send + Sync //! depending on the value of cfg!(parallel_queries). @@ -432,7 +432,7 @@ impl Once { /// closures may concurrently be computing a value which the inner value should take. /// Only one of these closures are used to actually initialize the value. /// If some other closure already set the value, we assert that it our closure computed - /// a value equal to the value aready set and then + /// a value equal to the value already set and then /// we return the value our closure computed wrapped in a `Option`. /// If our closure set the value, `None` is returned. /// If the value is already initialized, the closure is not called and `None` is returned. diff --git a/src/librustc_lint/builtin.rs b/src/librustc_lint/builtin.rs index 3a449b6a68e4c..3c58346d73544 100644 --- a/src/librustc_lint/builtin.rs +++ b/src/librustc_lint/builtin.rs @@ -888,7 +888,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnconditionalRecursion { // NB. this has an edge case with non-returning statements, // like `loop {}` or `panic!()`: control flow never reaches // the exit node through these, so one can have a function - // that never actually calls itselfs but is still picked up by + // that never actually calls itself but is still picked up by // this lint: // // fn f(cond: bool) { diff --git a/src/librustc_lint/types.rs b/src/librustc_lint/types.rs index f1636c4dcb08a..92e1b0edc3e59 100644 --- a/src/librustc_lint/types.rs +++ b/src/librustc_lint/types.rs @@ -486,7 +486,7 @@ impl<'a, 'tcx> ImproperCTypesVisitor<'a, 'tcx> { // Protect against infinite recursion, for example // `struct S(*mut S);`. // FIXME: A recursion limit is necessary as well, for irregular - // recusive types. + // recursive types. if !cache.insert(ty) { return FfiSafe; } diff --git a/src/librustc_metadata/native_libs.rs b/src/librustc_metadata/native_libs.rs index 078295c99bdf7..e983c443021ec 100644 --- a/src/librustc_metadata/native_libs.rs +++ b/src/librustc_metadata/native_libs.rs @@ -207,7 +207,7 @@ impl<'a, 'tcx> Collector<'a, 'tcx> { } } - // Update kind and, optionally, the name of all native libaries + // Update kind and, optionally, the name of all native libraries // (there may be more than one) with the specified name. for &(ref name, ref new_name, kind) in &self.tcx.sess.opts.libs { let mut found = false; diff --git a/src/librustc_mir/borrow_check/nll/invalidation.rs b/src/librustc_mir/borrow_check/nll/invalidation.rs index 301999cc4a51e..dc37c21fdabeb 100644 --- a/src/librustc_mir/borrow_check/nll/invalidation.rs +++ b/src/librustc_mir/borrow_check/nll/invalidation.rs @@ -541,7 +541,7 @@ impl<'cg, 'cx, 'tcx, 'gcx> InvalidationGenerator<'cg, 'cx, 'tcx, 'gcx> { // unique or mutable borrows are invalidated by writes. // Reservations count as writes since we need to check // that activating the borrow will be OK - // TOOD(bob_twinkles) is this actually the right thing to do? + // FIXME(bob_twinkles) is this actually the right thing to do? this.generate_invalidates(borrow_index, context.loc); } } diff --git a/src/librustc_mir/borrow_check/nll/type_check/mod.rs b/src/librustc_mir/borrow_check/nll/type_check/mod.rs index 9f790612124e6..885461c5a1475 100644 --- a/src/librustc_mir/borrow_check/nll/type_check/mod.rs +++ b/src/librustc_mir/borrow_check/nll/type_check/mod.rs @@ -783,7 +783,7 @@ impl<'a, 'gcx, 'tcx> TypeChecker<'a, 'gcx, 'tcx> { /// predicates, or otherwise uses the inference context, executes /// `op` and then executes all the further obligations that `op` /// returns. This will yield a set of outlives constraints amongst - /// regions which are extracted and stored as having occured at + /// regions which are extracted and stored as having occurred at /// `locations`. /// /// **Any `rustc::infer` operations that might generate region diff --git a/src/librustc_mir/borrow_check/places_conflict.rs b/src/librustc_mir/borrow_check/places_conflict.rs index 640ae31d45b34..85abec7e7acc4 100644 --- a/src/librustc_mir/borrow_check/places_conflict.rs +++ b/src/librustc_mir/borrow_check/places_conflict.rs @@ -83,7 +83,7 @@ fn place_components_conflict<'gcx, 'tcx>( // Our invariant is, that at each step of the iteration: // - If we didn't run out of access to match, our borrow and access are comparable // and either equal or disjoint. - // - If we did run out of accesss, the borrow can access a part of it. + // - If we did run out of access, the borrow can access a part of it. loop { // loop invariant: borrow_c is always either equal to access_c or disjoint from it. if let Some(borrow_c) = borrow_components.next() { diff --git a/src/librustc_mir/dataflow/mod.rs b/src/librustc_mir/dataflow/mod.rs index 56c4dac19e504..116cefea17544 100644 --- a/src/librustc_mir/dataflow/mod.rs +++ b/src/librustc_mir/dataflow/mod.rs @@ -605,7 +605,7 @@ pub trait BitDenotation: BitwiseOperator { /// `sets.on_entry` to that local clone into `statement_effect` and /// `terminator_effect`). /// - /// When its false, no local clone is constucted; instead a + /// When it's false, no local clone is constructed; instead a /// reference directly into `on_entry` is passed along via /// `sets.on_entry` instead, which represents the flow state at /// the block's start, not necessarily the state immediately prior diff --git a/src/librustc_mir/interpret/eval_context.rs b/src/librustc_mir/interpret/eval_context.rs index 52305be5facef..1ccb68ca2a55a 100644 --- a/src/librustc_mir/interpret/eval_context.rs +++ b/src/librustc_mir/interpret/eval_context.rs @@ -462,7 +462,7 @@ impl<'a, 'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> EvalContext<'a, 'mir, 'tcx, M self.tcx.normalize_erasing_regions(ty::ParamEnv::reveal_all(), substituted) } - /// Return the size and aligment of the value at the given type. + /// Return the size and alignment of the value at the given type. /// Note that the value does not matter if the type is sized. For unsized types, /// the value has to be a fat pointer, and we only care about the "extra" data in it. pub fn size_and_align_of_dst( diff --git a/src/librustc_mir/interpret/memory.rs b/src/librustc_mir/interpret/memory.rs index b62add8a559b4..636b04a8d16da 100644 --- a/src/librustc_mir/interpret/memory.rs +++ b/src/librustc_mir/interpret/memory.rs @@ -599,7 +599,7 @@ impl<'a, 'mir, 'tcx, M: Machine<'mir, 'tcx>> Memory<'a, 'mir, 'tcx, M> { Some(MemoryKind::Stack) => {}, } if let Some(mut alloc) = alloc { - // ensure llvm knows not to put this into immutable memroy + // ensure llvm knows not to put this into immutable memory alloc.runtime_mutability = mutability; let alloc = self.tcx.intern_const_alloc(alloc); self.tcx.alloc_map.lock().set_id_memory(alloc_id, alloc); diff --git a/src/librustc_mir/transform/inline.rs b/src/librustc_mir/transform/inline.rs index 85115427edae9..5062775fec168 100644 --- a/src/librustc_mir/transform/inline.rs +++ b/src/librustc_mir/transform/inline.rs @@ -704,7 +704,7 @@ impl<'a, 'tcx> MutVisitor<'tcx> for Integrator<'a, 'tcx> { *unwind = Some(self.update_target(tgt)); } else if !self.in_cleanup_block { // Unless this drop is in a cleanup block, add an unwind edge to - // the orignal call's cleanup block + // the original call's cleanup block *unwind = self.cleanup_block; } } @@ -716,7 +716,7 @@ impl<'a, 'tcx> MutVisitor<'tcx> for Integrator<'a, 'tcx> { *cleanup = Some(self.update_target(tgt)); } else if !self.in_cleanup_block { // Unless this call is in a cleanup block, add an unwind edge to - // the orignal call's cleanup block + // the original call's cleanup block *cleanup = self.cleanup_block; } } @@ -726,7 +726,7 @@ impl<'a, 'tcx> MutVisitor<'tcx> for Integrator<'a, 'tcx> { *cleanup = Some(self.update_target(tgt)); } else if !self.in_cleanup_block { // Unless this assert is in a cleanup block, add an unwind edge to - // the orignal call's cleanup block + // the original call's cleanup block *cleanup = self.cleanup_block; } } diff --git a/src/librustc_mir/transform/promote_consts.rs b/src/librustc_mir/transform/promote_consts.rs index b3ae65f532592..bb66b9ed6ece8 100644 --- a/src/librustc_mir/transform/promote_consts.rs +++ b/src/librustc_mir/transform/promote_consts.rs @@ -302,7 +302,7 @@ impl<'a, 'tcx> Promoter<'a, 'tcx> { let ref mut statement = blocks[loc.block].statements[loc.statement_index]; match statement.kind { StatementKind::Assign(_, Rvalue::Ref(_, _, ref mut place)) => { - // Find the underlying local for this (necessarilly interior) borrow. + // Find the underlying local for this (necessarily interior) borrow. // HACK(eddyb) using a recursive function because of mutable borrows. fn interior_base<'a, 'tcx>(place: &'a mut Place<'tcx>) -> &'a mut Place<'tcx> { diff --git a/src/librustc_mir/transform/uniform_array_move_out.rs b/src/librustc_mir/transform/uniform_array_move_out.rs index 7a8c35e7b96f5..4e9e085ca08a3 100644 --- a/src/librustc_mir/transform/uniform_array_move_out.rs +++ b/src/librustc_mir/transform/uniform_array_move_out.rs @@ -190,7 +190,7 @@ impl MirPass for RestoreSubsliceArrayMoveOut { let local_use = &visitor.locals_use[*local]; let opt_index_and_place = Self::try_get_item_source(local_use, mir); // each local should be used twice: - // in assign and in aggregate statments + // in assign and in aggregate statements if local_use.use_count == 2 && opt_index_and_place.is_some() { let (index, src_place) = opt_index_and_place.unwrap(); return Some((local_use, index, src_place)); @@ -231,15 +231,15 @@ impl RestoreSubsliceArrayMoveOut { if opt_size.is_some() && items.iter().all( |l| l.is_some() && l.unwrap().2 == opt_src_place.unwrap()) { - let indicies: Vec<_> = items.iter().map(|x| x.unwrap().1).collect(); - for i in 1..indicies.len() { - if indicies[i - 1] + 1 != indicies[i] { + let indices: Vec<_> = items.iter().map(|x| x.unwrap().1).collect(); + for i in 1..indices.len() { + if indices[i - 1] + 1 != indices[i] { return; } } - let min = *indicies.first().unwrap(); - let max = *indicies.last().unwrap(); + let min = *indices.first().unwrap(); + let max = *indices.last().unwrap(); for item in items { let locals_use = item.unwrap().0; diff --git a/src/librustc_mir/util/pretty.rs b/src/librustc_mir/util/pretty.rs index 01ad85cf66830..0636b77cfb4bc 100644 --- a/src/librustc_mir/util/pretty.rs +++ b/src/librustc_mir/util/pretty.rs @@ -459,7 +459,7 @@ fn write_scope_tree( let indent = depth * INDENT.len(); let children = match scope_tree.get(&parent) { - Some(childs) => childs, + Some(children) => children, None => return Ok(()), }; diff --git a/src/librustc_resolve/lib.rs b/src/librustc_resolve/lib.rs index 2e163cb4c6a37..04b5ae4beac33 100644 --- a/src/librustc_resolve/lib.rs +++ b/src/librustc_resolve/lib.rs @@ -201,7 +201,7 @@ fn resolve_struct_error<'sess, 'a>(resolver: &'sess Resolver, if let Some(impl_span) = maybe_impl_defid.map_or(None, |def_id| resolver.definitions.opt_span(def_id)) { err.span_label(reduce_impl_span_to_impl_keyword(cm, impl_span), - "`Self` type implicitely declared here, on the `impl`"); + "`Self` type implicitly declared here, on the `impl`"); } }, Def::TyParam(typaram_defid) => { diff --git a/src/librustc_traits/dropck_outlives.rs b/src/librustc_traits/dropck_outlives.rs index 5f9060b362346..38f19bbaf4d84 100644 --- a/src/librustc_traits/dropck_outlives.rs +++ b/src/librustc_traits/dropck_outlives.rs @@ -81,7 +81,7 @@ fn dropck_outlives<'tcx>( // into the types of its fields `(B, Vec)`. These will get // pushed onto the stack. Eventually, expanding `Vec` will // lead to us trying to push `A` a second time -- to prevent - // infinite recusion, we notice that `A` was already pushed + // infinite recursion, we notice that `A` was already pushed // once and stop. let mut ty_stack = vec![(for_ty, 0)]; diff --git a/src/librustc_typeck/check/generator_interior.rs b/src/librustc_typeck/check/generator_interior.rs index 6e0c0bac186f4..f0afc58b3cec5 100644 --- a/src/librustc_typeck/check/generator_interior.rs +++ b/src/librustc_typeck/check/generator_interior.rs @@ -121,7 +121,7 @@ pub fn resolve_interior<'a, 'gcx, 'tcx>(fcx: &'a FnCtxt<'a, 'gcx, 'tcx>, // Replace all regions inside the generator interior with late bound regions // Note that each region slot in the types gets a new fresh late bound region, // which means that none of the regions inside relate to any other, even if - // typeck had previously found contraints that would cause them to be related. + // typeck had previously found constraints that would cause them to be related. let mut counter = 0; let type_list = fcx.tcx.fold_regions(&type_list, &mut false, |_, current_depth| { counter += 1; diff --git a/src/librustc_typeck/check/mod.rs b/src/librustc_typeck/check/mod.rs index 189859aad07e2..9aeebfe3e0475 100644 --- a/src/librustc_typeck/check/mod.rs +++ b/src/librustc_typeck/check/mod.rs @@ -876,7 +876,7 @@ fn typeck_tables_of<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, // backwards compatibility. This makes fallback a stronger type hint than a cast coercion. fcx.check_casts(); - // Closure and generater analysis may run after fallback + // Closure and generator analysis may run after fallback // because they don't constrain other type variables. fcx.closure_analyze(body); assert!(fcx.deferred_call_resolutions.borrow().is_empty()); @@ -2327,7 +2327,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> { // unconstrained floats with f64. // Fallback becomes very dubious if we have encountered type-checking errors. // In that case, fallback to TyError. - // The return value indicates whether fallback has occured. + // The return value indicates whether fallback has occurred. fn fallback_if_possible(&self, ty: Ty<'tcx>) -> bool { use rustc::ty::error::UnconstrainedNumeric::Neither; use rustc::ty::error::UnconstrainedNumeric::{UnconstrainedInt, UnconstrainedFloat}; diff --git a/src/librustc_typeck/check/regionck.rs b/src/librustc_typeck/check/regionck.rs index 8aa5658d291db..6af939fcf99b7 100644 --- a/src/librustc_typeck/check/regionck.rs +++ b/src/librustc_typeck/check/regionck.rs @@ -1284,7 +1284,7 @@ impl<'a, 'gcx, 'tcx> RegionCtxt<'a, 'gcx, 'tcx> { // how all the types get adjusted.) match ref_kind { ty::ImmBorrow => { - // The reference being reborrowed is a sharable ref of + // The reference being reborrowed is a shareable ref of // type `&'a T`. In this case, it doesn't matter where we // *found* the `&T` pointer, the memory it references will // be valid and immutable for `'a`. So we can stop here. diff --git a/src/librustc_typeck/check/writeback.rs b/src/librustc_typeck/check/writeback.rs index b37f489b2c721..e87183f847321 100644 --- a/src/librustc_typeck/check/writeback.rs +++ b/src/librustc_typeck/check/writeback.rs @@ -516,7 +516,7 @@ impl<'cx, 'gcx, 'tcx> WritebackCx<'cx, 'gcx, 'tcx> { } fn visit_node_id(&mut self, span: Span, hir_id: hir::HirId) { - // Export associated path extensions and method resultions. + // Export associated path extensions and method resolutions. if let Some(def) = self.fcx .tables .borrow_mut() diff --git a/src/librustc_typeck/impl_wf_check.rs b/src/librustc_typeck/impl_wf_check.rs index b7921301957ce..11260b8f11e12 100644 --- a/src/librustc_typeck/impl_wf_check.rs +++ b/src/librustc_typeck/impl_wf_check.rs @@ -152,7 +152,7 @@ fn enforce_impl_params_are_constrained<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, // } // ``` // - // In a concession to backwards compatbility, we continue to + // In a concession to backwards compatibility, we continue to // permit those, so long as the lifetimes aren't used in // associated types. I believe this is sound, because lifetimes // used elsewhere are not projected back out. diff --git a/src/librustdoc/clean/auto_trait.rs b/src/librustdoc/clean/auto_trait.rs index 1331bd5186f19..de5a680ccf9d1 100644 --- a/src/librustdoc/clean/auto_trait.rs +++ b/src/librustdoc/clean/auto_trait.rs @@ -824,7 +824,7 @@ impl<'a, 'tcx, 'rcx, 'cstore> AutoTraitFinder<'a, 'tcx, 'rcx, 'cstore> { // In fact, the iteration of an FxHashMap can even vary between platforms, // since FxHasher has different behavior for 32-bit and 64-bit platforms. // - // Obviously, it's extremely undesireable for documentation rendering + // Obviously, it's extremely undesirable for documentation rendering // to be depndent on the platform it's run on. Apart from being confusing // to end users, it makes writing tests much more difficult, as predicates // can appear in any order in the final result. @@ -836,7 +836,7 @@ impl<'a, 'tcx, 'rcx, 'cstore> AutoTraitFinder<'a, 'tcx, 'rcx, 'cstore> { // predicates and bounds, however, we ensure that for a given codebase, all // auto-trait impls always render in exactly the same way. // - // Using the Debug impementation for sorting prevents us from needing to + // Using the Debug implementation for sorting prevents us from needing to // write quite a bit of almost entirely useless code (e.g. how should two // Types be sorted relative to each other). It also allows us to solve the // problem for both WherePredicates and GenericBounds at the same time. This diff --git a/src/librustdoc/clean/cfg.rs b/src/librustdoc/clean/cfg.rs index dceb04a7daa2b..7172bf5faa6c3 100644 --- a/src/librustdoc/clean/cfg.rs +++ b/src/librustdoc/clean/cfg.rs @@ -31,7 +31,7 @@ pub enum Cfg { True, /// Denies all configurations. False, - /// A generic configration option, e.g. `test` or `target_os = "linux"`. + /// A generic configuration option, e.g. `test` or `target_os = "linux"`. Cfg(Symbol, Option), /// Negate a configuration requirement, i.e. `not(x)`. Not(Box), diff --git a/src/librustdoc/html/render.rs b/src/librustdoc/html/render.rs index 33b3934e3a447..f880807ab5811 100644 --- a/src/librustdoc/html/render.rs +++ b/src/librustdoc/html/render.rs @@ -315,7 +315,7 @@ pub struct Cache { // the access levels from crateanalysis. pub access_levels: Arc>, - /// The version of the crate being documented, if given fron the `--crate-version` flag. + /// The version of the crate being documented, if given from the `--crate-version` flag. pub crate_version: Option, // Private fields only used when initially crawling a crate to build a cache diff --git a/src/libstd/future.rs b/src/libstd/future.rs index 12ea1ea9f9d49..cadb5c0ba5d0e 100644 --- a/src/libstd/future.rs +++ b/src/libstd/future.rs @@ -88,7 +88,7 @@ where /// This function acquires exclusive access to the task context. /// /// Panics if no task has been set or if the task context has already been -/// retrived by a surrounding call to get_task_cx. +/// retrieved by a surrounding call to get_task_cx. pub fn get_task_cx(f: F) -> R where F: FnOnce(&mut task::Context) -> R diff --git a/src/libstd/io/buffered.rs b/src/libstd/io/buffered.rs index 03c97de6ec1e9..77bc7e946eb41 100644 --- a/src/libstd/io/buffered.rs +++ b/src/libstd/io/buffered.rs @@ -889,7 +889,7 @@ impl Write for LineWriter { // Find the last newline character in the buffer provided. If found then // we're going to write all the data up to that point and then flush, - // otherewise we just write the whole block to the underlying writer. + // otherwise we just write the whole block to the underlying writer. let i = match memchr::memrchr(b'\n', buf) { Some(i) => i, None => return self.inner.write(buf), diff --git a/src/libstd/memchr.rs b/src/libstd/memchr.rs index 240e82069ff4d..c28f3da98cea9 100644 --- a/src/libstd/memchr.rs +++ b/src/libstd/memchr.rs @@ -57,7 +57,7 @@ pub fn memrchr(needle: u8, haystack: &[u8]) -> Option { #[cfg(test)] mod tests { - // test the implementations for the current plattform + // test the implementations for the current platform use super::{memchr, memrchr}; #[test] diff --git a/src/libstd/sync/once.rs b/src/libstd/sync/once.rs index f6cb8beae8415..f258ff073e2a7 100644 --- a/src/libstd/sync/once.rs +++ b/src/libstd/sync/once.rs @@ -176,7 +176,7 @@ impl Once { /// happens-before relation between the closure and code executing after the /// return). /// - /// If the given closure recusively invokes `call_once` on the same `Once` + /// If the given closure recursively invokes `call_once` on the same `Once` /// instance the exact behavior is not specified, allowed outcomes are /// a panic or a deadlock. /// diff --git a/src/libstd/sys/unix/fs.rs b/src/libstd/sys/unix/fs.rs index 7a89d9857bbcf..1d5b0cfa94ad5 100644 --- a/src/libstd/sys/unix/fs.rs +++ b/src/libstd/sys/unix/fs.rs @@ -857,7 +857,7 @@ pub fn copy(from: &Path, to: &Path) -> io::Result { use sync::atomic::{AtomicBool, Ordering}; // Kernel prior to 4.5 don't have copy_file_range - // We store the availability in a global to avoid unneccessary syscalls + // We store the availability in a global to avoid unnecessary syscalls static HAS_COPY_FILE_RANGE: AtomicBool = AtomicBool::new(true); unsafe fn copy_file_range( diff --git a/src/libstd/sys/unix/net.rs b/src/libstd/sys/unix/net.rs index 04d9f0b06d344..8c73fe8c6129f 100644 --- a/src/libstd/sys/unix/net.rs +++ b/src/libstd/sys/unix/net.rs @@ -35,7 +35,7 @@ use libc::SOCK_CLOEXEC; #[cfg(not(target_os = "linux"))] const SOCK_CLOEXEC: c_int = 0; -// Another conditional contant for name resolution: Macos et iOS use +// Another conditional constant for name resolution: Macos et iOS use // SO_NOSIGPIPE as a setsockopt flag to disable SIGPIPE emission on socket. // Other platforms do otherwise. #[cfg(target_vendor = "apple")] diff --git a/src/libsyntax/ext/expand.rs b/src/libsyntax/ext/expand.rs index ffa2730d68678..b24c2d8698103 100644 --- a/src/libsyntax/ext/expand.rs +++ b/src/libsyntax/ext/expand.rs @@ -321,7 +321,7 @@ impl<'a, 'b> MacroExpander<'a, 'b> { // we'll be able to immediately resolve most of imported macros. self.resolve_imports(); - // Resolve paths in all invocations and produce ouput expanded fragments for them, but + // Resolve paths in all invocations and produce output expanded fragments for them, but // do not insert them into our input AST fragment yet, only store in `expanded_fragments`. // The output fragments also go through expansion recursively until no invocations are left. // Unresolved macros produce dummy outputs as a recovery measure. diff --git a/src/libsyntax/ext/tt/macro_parser.rs b/src/libsyntax/ext/tt/macro_parser.rs index 82f88d1d8643e..7d98fa661c039 100644 --- a/src/libsyntax/ext/tt/macro_parser.rs +++ b/src/libsyntax/ext/tt/macro_parser.rs @@ -637,7 +637,7 @@ pub fn parse( // A queue of possible matcher positions. We initialize it with the matcher position in which // the "dot" is before the first token of the first token tree in `ms`. `inner_parse_loop` then - // processes all of these possible matcher positions and produces posible next positions into + // processes all of these possible matcher positions and produces possible next positions into // `next_items`. After some post-processing, the contents of `next_items` replenish `cur_items` // and we start over again. // @@ -726,7 +726,7 @@ pub fn parse( ), ); } - // If there are no posible next positions AND we aren't waiting for the black-box parser, + // If there are no possible next positions AND we aren't waiting for the black-box parser, // then their is a syntax error. else if bb_items.is_empty() && next_items.is_empty() { return Failure(parser.span, parser.token); diff --git a/src/libsyntax/ext/tt/quoted.rs b/src/libsyntax/ext/tt/quoted.rs index 357fc77a3a79d..cc635a29275fa 100644 --- a/src/libsyntax/ext/tt/quoted.rs +++ b/src/libsyntax/ext/tt/quoted.rs @@ -323,7 +323,7 @@ where } // `tree` is followed by an `ident`. This could be `$meta_var` or the `$crate` special - // metavariable that names the crate of the invokation. + // metavariable that names the crate of the invocation. Some(tokenstream::TokenTree::Token(ident_span, ref token)) if token.is_ident() => { let (ident, is_raw) = token.ident().unwrap(); let span = ident_span.with_lo(span.lo()); diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 345464c666425..b6d876ebc9e8a 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -3535,8 +3535,8 @@ impl<'a> Parser<'a> { if arm_start_lines.lines[0].end_col == expr_lines.lines[0].end_col && expr_lines.lines.len() == 2 && self.token == token::FatArrow => { - // We check wether there's any trailing code in the parse span, if there - // isn't, we very likely have the following: + // We check whether there's any trailing code in the parse span, + // if there isn't, we very likely have the following: // // X | &Y => "y" // | -- - missing comma @@ -3934,7 +3934,7 @@ impl<'a> Parser<'a> { } /// A wrapper around `parse_pat` with some special error handling for the - /// "top-level" patterns in a match arm, `for` loop, `let`, &c. (in contast + /// "top-level" patterns in a match arm, `for` loop, `let`, &c. (in contrast /// to subpatterns within such). fn parse_top_level_pat(&mut self) -> PResult<'a, P> { let pat = self.parse_pat()?; @@ -4322,7 +4322,7 @@ impl<'a> Parser<'a> { // If `break_on_semi` is `Break`, then we will stop consuming tokens after // finding (and consuming) a `;` outside of `{}` or `[]` (note that this is // approximate - it can mean we break too early due to macros, but that - // shoud only lead to sub-optimal recovery, not inaccurate parsing). + // should only lead to sub-optimal recovery, not inaccurate parsing). // // If `break_on_block` is `Break`, then we will stop consuming tokens // after finding (and consuming) a brace-delimited block. @@ -4887,7 +4887,7 @@ impl<'a> Parser<'a> { fn parse_generic_bounds_common(&mut self, allow_plus: bool) -> PResult<'a, GenericBounds> { let mut bounds = Vec::new(); loop { - // This needs to be syncronized with `Token::can_begin_bound`. + // This needs to be synchronized with `Token::can_begin_bound`. let is_bound_start = self.check_path() || self.check_lifetime() || self.check(&token::Question) || self.check_keyword(keywords::For) || diff --git a/src/libsyntax_ext/format.rs b/src/libsyntax_ext/format.rs index 61f52194aad3e..02589216a3fbb 100644 --- a/src/libsyntax_ext/format.rs +++ b/src/libsyntax_ext/format.rs @@ -117,7 +117,7 @@ struct Context<'a, 'b: 'a> { invalid_refs: Vec<(usize, usize)>, /// Spans of all the formatting arguments, in order. arg_spans: Vec, - /// Wether this formatting string is a literal or it comes from a macro. + /// Whether this formatting string is a literal or it comes from a macro. is_literal: bool, } diff --git a/src/libsyntax_pos/symbol.rs b/src/libsyntax_pos/symbol.rs index 62f22475e7de7..6b4684e14fcfe 100644 --- a/src/libsyntax_pos/symbol.rs +++ b/src/libsyntax_pos/symbol.rs @@ -586,7 +586,7 @@ impl InternedString { }); // This is safe because the interner keeps string alive until it is dropped. // We can access it because we know the interner is still alive since we use a - // scoped thread local to access it, and it was alive at the begining of this scope + // scoped thread local to access it, and it was alive at the beginning of this scope unsafe { f(&*str) } } diff --git a/src/test/codegen-units/item-collection/cross-crate-trait-method.rs b/src/test/codegen-units/item-collection/cross-crate-trait-method.rs index 7a16b22a023c4..2951ee4f6c94b 100644 --- a/src/test/codegen-units/item-collection/cross-crate-trait-method.rs +++ b/src/test/codegen-units/item-collection/cross-crate-trait-method.rs @@ -28,7 +28,7 @@ fn start(_: isize, _: *const *const u8) -> isize { let _: (char, u32) = Trait::without_default_impl(0); // Currently, no object code is generated for trait methods with default - // implemenations, unless they are actually called from somewhere. Therefore + // implementations, unless they are actually called from somewhere. Therefore // we cannot import the implementations and have to create our own inline. //~ MONO_ITEM fn cgu_export_trait_method::Trait[0]::with_default_impl[0] let _ = Trait::with_default_impl(0u32); diff --git a/src/test/compile-fail-fulldeps/auxiliary/pub_and_stability.rs b/src/test/compile-fail-fulldeps/auxiliary/pub_and_stability.rs index eedc1e745e270..f46d906d865a8 100644 --- a/src/test/compile-fail-fulldeps/auxiliary/pub_and_stability.rs +++ b/src/test/compile-fail-fulldeps/auxiliary/pub_and_stability.rs @@ -9,7 +9,7 @@ // except according to those terms. // This crate attempts to enumerate the various scenarios for how a -// type can define fields and methods with various visiblities and +// type can define fields and methods with various visibilities and // stabilities. // // The basic stability pattern in this file has four cases: @@ -23,7 +23,7 @@ // // However, since stability attributes can only be observed in // cross-crate linkage scenarios, there is little reason to take the -// cross-product (4 stability cases * 4 visiblity cases), because the +// cross-product (4 stability cases * 4 visibility cases), because the // first three visibility cases cannot be accessed outside this crate, // and therefore stability is only relevant when the visibility is pub // to the whole universe. diff --git a/src/test/run-fail/run-unexported-tests.rs b/src/test/run-fail/run-unexported-tests.rs index 3f75229948df0..c7d5574f909f2 100644 --- a/src/test/run-fail/run-unexported-tests.rs +++ b/src/test/run-fail/run-unexported-tests.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// error-pattern:runned an unexported test +// error-pattern:ran an unexported test // compile-flags:--test // check-stdout @@ -17,6 +17,6 @@ mod m { #[test] fn unexported() { - panic!("runned an unexported test"); + panic!("ran an unexported test"); } } diff --git a/src/test/run-make-fulldeps/hir-tree/Makefile b/src/test/run-make-fulldeps/hir-tree/Makefile index 2e100b269e14b..3412c8ce1f582 100644 --- a/src/test/run-make-fulldeps/hir-tree/Makefile +++ b/src/test/run-make-fulldeps/hir-tree/Makefile @@ -1,6 +1,6 @@ -include ../tools.mk -# Test that hir-tree output doens't crash and includes +# Test that hir-tree output doesn't crash and includes # the string constant we would expect to see. all: diff --git a/src/test/run-make-fulldeps/rustdoc-error-lines/Makefile b/src/test/run-make-fulldeps/rustdoc-error-lines/Makefile index 0019e5ee7943b..b669f9cedc1e9 100644 --- a/src/test/run-make-fulldeps/rustdoc-error-lines/Makefile +++ b/src/test/run-make-fulldeps/rustdoc-error-lines/Makefile @@ -1,6 +1,6 @@ -include ../tools.mk -# Test that hir-tree output doens't crash and includes +# Test that hir-tree output doesn't crash and includes # the string constant we would expect to see. all: diff --git a/src/test/run-make-fulldeps/sanitizer-cdylib-link/Makefile b/src/test/run-make-fulldeps/sanitizer-cdylib-link/Makefile index bea5519ec5f70..4b7fece36d92a 100644 --- a/src/test/run-make-fulldeps/sanitizer-cdylib-link/Makefile +++ b/src/test/run-make-fulldeps/sanitizer-cdylib-link/Makefile @@ -3,7 +3,7 @@ LOG := $(TMPDIR)/log.txt # This test builds a shared object, then an executable that links it as a native -# rust library (constrast to an rlib). The shared library and executable both +# rust library (contrast to an rlib). The shared library and executable both # are compiled with address sanitizer, and we assert that a fault in the cdylib # is correctly detected. diff --git a/src/test/run-make-fulldeps/sanitizer-dylib-link/Makefile b/src/test/run-make-fulldeps/sanitizer-dylib-link/Makefile index 0cc8f73da8b56..97f6172142224 100644 --- a/src/test/run-make-fulldeps/sanitizer-dylib-link/Makefile +++ b/src/test/run-make-fulldeps/sanitizer-dylib-link/Makefile @@ -3,7 +3,7 @@ LOG := $(TMPDIR)/log.txt # This test builds a shared object, then an executable that links it as a native -# rust library (constrast to an rlib). The shared library and executable both +# rust library (contrast to an rlib). The shared library and executable both # are compiled with address sanitizer, and we assert that a fault in the dylib # is correctly detected. diff --git a/src/test/run-pass/dropck_legal_cycles.rs b/src/test/run-pass/dropck_legal_cycles.rs index b6e640ab5b5b6..5f915a762d149 100644 --- a/src/test/run-pass/dropck_legal_cycles.rs +++ b/src/test/run-pass/dropck_legal_cycles.rs @@ -385,7 +385,7 @@ pub fn main() { // RwLock (since we can grab the child pointers in read-only // mode), but we cannot lock a std::sync::Mutex to guard reading // from each node via the same pattern, since once you hit the - // cycle, you'll be trying to acquring the same lock twice. + // cycle, you'll be trying to acquiring the same lock twice. // (We deal with this by exiting the traversal early if try_lock fails.) // Cycle 12: { arc0 -> (arc1, arc2), arc1 -> (), arc2 -> arc0 }, refcells diff --git a/src/test/run-pass/ifmt.rs b/src/test/run-pass/ifmt.rs index d09376acc84ae..37436d7ae0042 100644 --- a/src/test/run-pass/ifmt.rs +++ b/src/test/run-pass/ifmt.rs @@ -310,7 +310,7 @@ fn test_order() { } fn test_once() { - // Make sure each argument are evaluted only once even though it may be + // Make sure each argument are evaluated only once even though it may be // formatted multiple times fn foo() -> isize { static mut FOO: isize = 0; diff --git a/src/test/run-pass/issue-15881-model-lexer-dotdotdot.rs b/src/test/run-pass/issue-15881-model-lexer-dotdotdot.rs index 2ec97e373b29b..04ffad501b042 100644 --- a/src/test/run-pass/issue-15881-model-lexer-dotdotdot.rs +++ b/src/test/run-pass/issue-15881-model-lexer-dotdotdot.rs @@ -27,7 +27,7 @@ pub fn main() { } match 'c' { 'a'...'z' => {} - _ => panic!("should suppport char ranges") + _ => panic!("should support char ranges") } match -3_isize { -7...5 => {} diff --git a/src/test/run-pass/issue-20616.rs b/src/test/run-pass/issue-20616.rs index d5b799710941b..5727f54cd7046 100644 --- a/src/test/run-pass/issue-20616.rs +++ b/src/test/run-pass/issue-20616.rs @@ -26,7 +26,7 @@ type TypeD = TypeA<'static>; // trailing comma on lifetime bounds type TypeE = TypeA<'static,>; -// normal type arugment +// normal type argument type TypeF = Box; // type argument with trailing comma diff --git a/src/test/run-pass/issue-33903.rs b/src/test/run-pass/issue-33903.rs index ab368537e21c0..3bc0f7a0fdee8 100644 --- a/src/test/run-pass/issue-33903.rs +++ b/src/test/run-pass/issue-33903.rs @@ -11,7 +11,7 @@ // Issue 33903: // Built-in indexing should be used even when the index is not // trivially an integer -// Only built-in indexing can be used in constant expresssions +// Only built-in indexing can be used in constant expressions const FOO: i32 = [12, 34][0 + 1]; diff --git a/src/test/run-pass/issue-48962.rs b/src/test/run-pass/issue-48962.rs index a603dfbfe5fa5..46aeb329c896b 100644 --- a/src/test/run-pass/issue-48962.rs +++ b/src/test/run-pass/issue-48962.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// Test that we are able to reinitilize box with moved referent +// Test that we are able to reinitialize box with moved referent #![feature(nll)] static mut ORDER: [usize; 3] = [0, 0, 0]; static mut INDEX: usize = 0; diff --git a/src/test/run-pass/match-range.rs b/src/test/run-pass/match-range.rs index 859edb80a0743..efa725321967d 100644 --- a/src/test/run-pass/match-range.rs +++ b/src/test/run-pass/match-range.rs @@ -34,7 +34,7 @@ pub fn main() { } match 'c' { 'a'..='z' => {} - _ => panic!("should suppport char ranges") + _ => panic!("should support char ranges") } match -3 { -7..=5 => {} diff --git a/src/test/run-pass/match-reassign.rs b/src/test/run-pass/match-reassign.rs index 759296ad46b87..bedcee43db5ba 100644 --- a/src/test/run-pass/match-reassign.rs +++ b/src/test/run-pass/match-reassign.rs @@ -9,7 +9,7 @@ // except according to those terms. // Regression test for #23698: The reassignment checker only cared -// about the last assigment in a match arm body +// about the last assignment in a match arm body // Use an extra function to make sure no extra assignments // are introduced by macros in the match statement diff --git a/src/test/run-pass/packed-struct-optimized-enum.rs b/src/test/run-pass/packed-struct-optimized-enum.rs index 7968ae2278ae9..9d23a0c71489a 100644 --- a/src/test/run-pass/packed-struct-optimized-enum.rs +++ b/src/test/run-pass/packed-struct-optimized-enum.rs @@ -26,7 +26,7 @@ fn sanity_check_size(one: T) { fn main() { // This can fail if rustc and LLVM disagree on the size of a type. - // In this case, `Option>` was erronously not + // In this case, `Option>` was erroneously not // marked as packed despite needing alignment `1` and containing // its `&()` discriminant, which has alignment larger than `1`. sanity_check_size((Some(Packed((&(), 0))), true)); diff --git a/src/test/run-pass/signal-alternate-stack-cleanup.rs b/src/test/run-pass/signal-alternate-stack-cleanup.rs index eae431aa4044d..ad099f82d13b9 100644 --- a/src/test/run-pass/signal-alternate-stack-cleanup.rs +++ b/src/test/run-pass/signal-alternate-stack-cleanup.rs @@ -33,7 +33,7 @@ extern fn send_signal() { fn main() { unsafe { - // Install signal hander that runs on alternate signal stack. + // Install signal handler that runs on alternate signal stack. let mut action: sigaction = std::mem::zeroed(); action.sa_flags = (SA_ONSTACK | SA_SIGINFO) as _; action.sa_sigaction = signal_handler as sighandler_t; diff --git a/src/test/rustdoc/inline_cross/auxiliary/macro-vis.rs b/src/test/rustdoc/inline_cross/auxiliary/macro-vis.rs index d4a9a9f379b92..3fce62529c78f 100644 --- a/src/test/rustdoc/inline_cross/auxiliary/macro-vis.rs +++ b/src/test/rustdoc/inline_cross/auxiliary/macro-vis.rs @@ -10,7 +10,7 @@ #![crate_name = "qwop"] -/// (writen on a spider's web) Some Macro +/// (written on a spider's web) Some Macro #[macro_export] macro_rules! some_macro { () => { diff --git a/src/test/ui/associated-types/associated-types-incomplete-object.rs b/src/test/ui/associated-types/associated-types-incomplete-object.rs index c1feb8ac45900..9f1df14605b69 100644 --- a/src/test/ui/associated-types/associated-types-incomplete-object.rs +++ b/src/test/ui/associated-types/associated-types-incomplete-object.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// Check that the user gets an errror if they omit a binding from an +// Check that the user gets an error if they omit a binding from an // object type. pub trait Foo { diff --git a/src/test/ui/borrowck/issue-45983.rs b/src/test/ui/borrowck/issue-45983.rs index bcbe0d1ffc000..5ed425e958a58 100644 --- a/src/test/ui/borrowck/issue-45983.rs +++ b/src/test/ui/borrowck/issue-45983.rs @@ -19,7 +19,7 @@ // revisions: ast migrate nll // Since we are testing nll (and migration) explicitly as a separate -// revisions, dont worry about the --compare-mode=nll on this test. +// revisions, don't worry about the --compare-mode=nll on this test. // ignore-compare-mode-nll diff --git a/src/test/ui/defaulted-never-note.rs b/src/test/ui/defaulted-never-note.rs index ac8ac85824edc..b53ef0f5ba823 100644 --- a/src/test/ui/defaulted-never-note.rs +++ b/src/test/ui/defaulted-never-note.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// We need to opt inot the `!` feature in order to trigger the +// We need to opt into the `!` feature in order to trigger the // requirement that this is testing. #![feature(never_type)] diff --git a/src/test/ui/error-codes/E0401.stderr b/src/test/ui/error-codes/E0401.stderr index 5b66d1093408e..b088e8330e998 100644 --- a/src/test/ui/error-codes/E0401.stderr +++ b/src/test/ui/error-codes/E0401.stderr @@ -24,7 +24,7 @@ error[E0401]: can't use type parameters from outer function --> $DIR/E0401.rs:32:25 | LL | impl Iterator for A { - | ---- `Self` type implicitely declared here, on the `impl` + | ---- `Self` type implicitly declared here, on the `impl` ... LL | fn helper(sel: &Self) -> u8 { //~ ERROR E0401 | ------ ^^^^ use of type variable from outer function diff --git a/src/test/ui/imports/local-modularized-tricky-fail-2.rs b/src/test/ui/imports/local-modularized-tricky-fail-2.rs index afdebc4533ff6..1ae7ed268ebf8 100644 --- a/src/test/ui/imports/local-modularized-tricky-fail-2.rs +++ b/src/test/ui/imports/local-modularized-tricky-fail-2.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// `#[macro_export] macro_rules` that doen't originate from macro expansions can be placed +// `#[macro_export] macro_rules` that doesn't originate from macro expansions can be placed // into the root module soon enough to act as usual items and shadow globs and preludes. #![feature(decl_macro)] diff --git a/src/test/ui/issues/issue-31845.rs b/src/test/ui/issues/issue-31845.rs index 514255e46769e..418754b9a2446 100644 --- a/src/test/ui/issues/issue-31845.rs +++ b/src/test/ui/issues/issue-31845.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// Checks lexical scopes cannot see through normal module boundries +// Checks lexical scopes cannot see through normal module boundaries fn f() { fn g() {} diff --git a/src/test/ui/issues/issue-45696-no-variant-box-recur.rs b/src/test/ui/issues/issue-45696-no-variant-box-recur.rs index da42e171fcc50..8624dbd28dceb 100644 --- a/src/test/ui/issues/issue-45696-no-variant-box-recur.rs +++ b/src/test/ui/issues/issue-45696-no-variant-box-recur.rs @@ -24,7 +24,7 @@ // run-pass -// This test has structs and functions that are by definiton unusable +// This test has structs and functions that are by definition unusable // all over the place, so just go ahead and allow dead_code #![allow(dead_code)] diff --git a/src/test/ui/issues/issue-50761.rs b/src/test/ui/issues/issue-50761.rs index b8a7a089c2313..6c87d52093473 100644 --- a/src/test/ui/issues/issue-50761.rs +++ b/src/test/ui/issues/issue-50761.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// Confirm that we don't accidently divide or mod by zero in llvm_type +// Confirm that we don't accidentally divide or mod by zero in llvm_type // compile-pass diff --git a/src/test/ui/label/label_break_value_illegal_uses.rs b/src/test/ui/label/label_break_value_illegal_uses.rs index 18644033e4ff8..8315104d37ff4 100644 --- a/src/test/ui/label/label_break_value_illegal_uses.rs +++ b/src/test/ui/label/label_break_value_illegal_uses.rs @@ -10,7 +10,7 @@ #![feature(label_break_value)] -// These are forbidden occurences of label-break-value +// These are forbidden occurrences of label-break-value fn labeled_unsafe() { unsafe 'b: {} //~ ERROR expected one of `extern`, `fn`, or `{` diff --git a/src/test/ui/lifetimes/lifetime-errors/liveness-assign-imm-local-notes.rs b/src/test/ui/lifetimes/lifetime-errors/liveness-assign-imm-local-notes.rs index 20a2cbfd3aa78..6b0ca2ce9e004 100644 --- a/src/test/ui/lifetimes/lifetime-errors/liveness-assign-imm-local-notes.rs +++ b/src/test/ui/lifetimes/lifetime-errors/liveness-assign-imm-local-notes.rs @@ -9,8 +9,8 @@ // except according to those terms. // FIXME: Change to UI Test -// Check notes are placed on an assignment that can actually precede the current assigmnent -// Don't emmit a first assignment for assignment in a loop. +// Check notes are placed on an assignment that can actually precede the current assignment +// Don't emit a first assignment for assignment in a loop. // compile-flags: -Zborrowck=compare diff --git a/src/test/ui/lint/lint-unused-extern-crate.rs b/src/test/ui/lint/lint-unused-extern-crate.rs index 8f0b53fd59971..4ef185ee71c5a 100644 --- a/src/test/ui/lint/lint-unused-extern-crate.rs +++ b/src/test/ui/lint/lint-unused-extern-crate.rs @@ -35,7 +35,7 @@ use lint_unused_extern_crate2::foo as bar; use other::*; mod foo { - // Test that this is unused even though an earler `extern crate` is used. + // Test that this is unused even though an earlier `extern crate` is used. extern crate lint_unused_extern_crate2; //~ ERROR unused extern crate } diff --git a/src/test/ui/rfc1598-generic-associated-types/shadowing.rs b/src/test/ui/rfc1598-generic-associated-types/shadowing.rs index 6cdcaf2568394..ddc6a29a8f0bd 100644 --- a/src/test/ui/rfc1598-generic-associated-types/shadowing.rs +++ b/src/test/ui/rfc1598-generic-associated-types/shadowing.rs @@ -11,7 +11,7 @@ #![feature(generic_associated_types)] //FIXME(#44265): The lifetime shadowing and type parameter shadowing -// should cause an error. Now it compiles (errorneously) and this will be addressed +// should cause an error. Now it compiles (erroneously) and this will be addressed // by a future PR. Then remove the following: // compile-pass diff --git a/src/test/ui/rust-2018/async-ident-allowed.rs b/src/test/ui/rust-2018/async-ident-allowed.rs index 3bc468483bda2..9a046bc6952b3 100644 --- a/src/test/ui/rust-2018/async-ident-allowed.rs +++ b/src/test/ui/rust-2018/async-ident-allowed.rs @@ -12,7 +12,7 @@ #![deny(rust_2018_compatibility)] -// Don't make a suggestion for a raw identifer replacement unless raw +// Don't make a suggestion for a raw identifier replacement unless raw // identifiers are enabled. fn main() { diff --git a/src/test/ui/single-use-lifetime/two-uses-in-fn-arguments.rs b/src/test/ui/single-use-lifetime/two-uses-in-fn-arguments.rs index 4706b9cbb092c..81adf89fd4330 100644 --- a/src/test/ui/single-use-lifetime/two-uses-in-fn-arguments.rs +++ b/src/test/ui/single-use-lifetime/two-uses-in-fn-arguments.rs @@ -9,7 +9,7 @@ // except according to those terms. // Test that we DO NOT warn when lifetime name is used multiple -// argments, or more than once in a single argument. +// arguments, or more than once in a single argument. // // compile-pass diff --git a/src/test/ui/variadic/variadic-ffi-2.rs b/src/test/ui/variadic/variadic-ffi-2.rs index ec5669f639277..a5011c3abe7a7 100644 --- a/src/test/ui/variadic/variadic-ffi-2.rs +++ b/src/test/ui/variadic/variadic-ffi-2.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-arm stdcall isn't suppported +// ignore-arm stdcall isn't supported fn baz(f: extern "stdcall" fn(usize, ...)) { //~^ ERROR: variadic function must have C or cdecl calling convention diff --git a/src/test/ui/variadic/variadic-ffi.rs b/src/test/ui/variadic/variadic-ffi.rs index f245306f4d8f6..d81e61cac566d 100644 --- a/src/test/ui/variadic/variadic-ffi.rs +++ b/src/test/ui/variadic/variadic-ffi.rs @@ -8,8 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-arm stdcall isn't suppported -// ignore-aarch64 stdcall isn't suppported +// ignore-arm stdcall isn't supported +// ignore-aarch64 stdcall isn't supported extern "stdcall" { fn printf(_: *const u8, ...); //~ ERROR: variadic function must have C or cdecl calling diff --git a/src/test/ui/where-clauses/where-for-self-2.rs b/src/test/ui/where-clauses/where-for-self-2.rs index bf8fc29217338..6179bdb34a381 100644 --- a/src/test/ui/where-clauses/where-for-self-2.rs +++ b/src/test/ui/where-clauses/where-for-self-2.rs @@ -10,7 +10,7 @@ // Test that we can quantify lifetimes outside a constraint (i.e., including // the self type) in a where clause. Specifically, test that implementing for a -// specific lifetime is not enough to satisify the `for<'a> ...` constraint, which +// specific lifetime is not enough to satisfy the `for<'a> ...` constraint, which // should require *all* lifetimes. static X: &'static u32 = &42;