Skip to content

Commit

Permalink
Fix typos found by codespell.
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiaskrgr committed Aug 19, 2018
1 parent a9fe312 commit 71120ef
Show file tree
Hide file tree
Showing 99 changed files with 130 additions and 130 deletions.
2 changes: 1 addition & 1 deletion src/ci/docker/scripts/musl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/doc/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/doc/rustc/src/codegen-options/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/doc/rustc/src/lints/listing/deny-by-default.md
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/doc/rustdoc/src/unstable-features.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ 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`,
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)
Expand Down
2 changes: 1 addition & 1 deletion src/liballoc/raw_vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/libcore/future/future_obj.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 (),
Expand Down Expand Up @@ -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>);

Expand Down
2 changes: 1 addition & 1 deletion src/libcore/ptr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2291,7 +2291,7 @@ impl<T: ?Sized> *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"]
Expand Down
6 changes: 3 additions & 3 deletions src/libcore/slice/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1680,7 +1680,7 @@ impl<T> [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<U>(&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".
Expand Down Expand Up @@ -1740,7 +1740,7 @@ impl<T> [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
Expand Down Expand Up @@ -1792,7 +1792,7 @@ impl<T> [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
Expand Down
2 changes: 1 addition & 1 deletion src/libfmt_macros/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ pub struct Parser<'a> {
style: Option<usize>,
/// 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)>,
}

Expand Down
4 changes: 2 additions & 2 deletions src/libpanic_unwind/seh.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion src/libproc_macro/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/infer/canonical/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/infer/error_reporting/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/infer/higher_ranked/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/mir/interpret/value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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).
///
Expand Down
4 changes: 2 additions & 2 deletions src/librustc/mir/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
/// }
/// ```
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/mir/traversal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions src/librustc/traits/auto_trait.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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<T: Copy>', 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
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/traits/error_reporting.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/traits/query/dropck_outlives.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/ty/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<DefId, Lrc<Vec<hir::Freevar>>>,
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/ty/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/ty/query/job.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
4 changes: 2 additions & 2 deletions src/librustc_codegen_llvm/back/write.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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.");
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_codegen_llvm/mir/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/librustc_data_structures/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down Expand Up @@ -432,7 +432,7 @@ impl<T> Once<T> {
/// 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.
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_lint/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_lint/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_metadata/native_libs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_mir/borrow_check/nll/invalidation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down
Loading

0 comments on commit 71120ef

Please sign in to comment.