Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix more typos found by codespell. #48275

Merged
merged 1 commit into from Feb 18, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion RELEASES.md
Expand Up @@ -29,7 +29,7 @@ Libraries
- [Copied `AsciiExt` methods onto `char`][46077]
- [Remove `T: Sized` requirement on `ptr::is_null()`][46094]
- [impl `From<RecvError>` for `{TryRecvError, RecvTimeoutError}`][45506]
- [Optimised `f32::{min, max}` to generate more efficent x86 assembly][47080]
- [Optimised `f32::{min, max}` to generate more efficient x86 assembly][47080]
- [`[u8]::contains` now uses memchr which provides a 3x speed improvement][46713]

Stabilized APIs
Expand Down
4 changes: 2 additions & 2 deletions config.toml.example
Expand Up @@ -151,8 +151,8 @@
# default.
#extended = false

# Installs choosen set of extended tools if enables. By default builds all.
# If choosen tool failed to build the installation fails.
# Installs chosen set of extended tools if enables. By default builds all.
# If chosen tool failed to build the installation fails.
#tools = ["cargo", "rls", "rustfmt", "analysis", "src"]

# Verbosity level: 0 == not verbose, 1 == verbose, 2 == very verbose
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/test.rs
Expand Up @@ -935,7 +935,7 @@ impl Step for Compiletest {
}
}
if suite == "run-make" && !build.config.llvm_enabled {
println!("Ignoring run-make test suite as they generally dont work without LLVM");
println!("Ignoring run-make test suite as they generally don't work without LLVM");
return;
}

Expand Down
2 changes: 1 addition & 1 deletion src/librustc/diagnostics.rs
Expand Up @@ -1891,7 +1891,7 @@ is a function pointer, which is not zero-sized.
This pattern should be rewritten. There are a few possible ways to do this:

- change the original fn declaration to match the expected signature,
and do the cast in the fn body (the prefered option)
and do the cast in the fn body (the preferred option)
- cast the fn item fo a fn pointer before calling transmute, as shown here:

```
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/hir/mod.rs
Expand Up @@ -543,7 +543,7 @@ impl Generics {
}

/// Synthetic Type Parameters are converted to an other form during lowering, this allows
/// to track the original form they had. Usefull for error messages.
/// to track the original form they had. Useful for error messages.
#[derive(Copy, Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub enum SyntheticTyParamKind {
ImplTrait
Expand Down
4 changes: 2 additions & 2 deletions src/librustc/infer/error_reporting/mod.rs
Expand Up @@ -734,7 +734,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
}
}

// When finding T != &T, hightlight only the borrow
// When finding T != &T, highlight only the borrow
(&ty::TyRef(r1, ref tnm1), _) if equals(&tnm1.ty, &t2) => {
let mut values = (DiagnosticStyledString::new(), DiagnosticStyledString::new());
push_ty_ref(&r1, tnm1, &mut values.0);
Expand Down Expand Up @@ -946,7 +946,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
let type_param = generics.type_param(param, self.tcx);
let hir = &self.tcx.hir;
hir.as_local_node_id(type_param.def_id).map(|id| {
// Get the `hir::TyParam` to verify wether it already has any bounds.
// Get the `hir::TyParam` to verify whether it already has any bounds.
// We do this to avoid suggesting code that ends up as `T: 'a'b`,
// instead we suggest `T: 'a + 'b` in that case.
let has_lifetimes = if let hir_map::NodeTyParam(ref p) = hir.get(id) {
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/infer/outlives/obligations.rs
Expand Up @@ -106,7 +106,7 @@ impl<'cx, 'gcx, 'tcx> InferCtxt<'cx, 'gcx, 'tcx> {
/// done (or else an assert will fire).
///
/// See the `region_obligations` field of `InferCtxt` for some
/// comments about how this funtion fits into the overall expected
/// comments about how this function fits into the overall expected
/// flow of the the inferencer. The key point is that it is
/// invoked after all type-inference variables have been bound --
/// towards the end of regionck. This also ensures that the
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/infer/region_constraints/README.md
Expand Up @@ -19,7 +19,7 @@ The constraints are always of one of three possible forms:
a subregion of Rj
- `ConstrainRegSubVar(R, Ri)` states that the concrete region R (which
must not be a variable) must be a subregion of the variable Ri
- `ConstrainVarSubReg(Ri, R)` states the variable Ri shoudl be less
- `ConstrainVarSubReg(Ri, R)` states the variable Ri should be less
than the concrete region R. This is kind of deprecated and ought to
be replaced with a verify (they essentially play the same role).

Expand Down
2 changes: 1 addition & 1 deletion src/librustc/middle/region.rs
Expand Up @@ -886,7 +886,7 @@ fn resolve_block<'a, 'tcx>(visitor: &mut RegionResolutionVisitor<'a, 'tcx>, blk:
//
// Each of the statements within the block is a terminating
// scope, and thus a temporary (e.g. the result of calling
// `bar()` in the initalizer expression for `let inner = ...;`)
// `bar()` in the initializer expression for `let inner = ...;`)
// will be cleaned up immediately after its corresponding
// statement (i.e. `let inner = ...;`) executes.
//
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/mir/interpret/mod.rs
Expand Up @@ -56,7 +56,7 @@ pub struct GlobalId<'tcx> {
////////////////////////////////////////////////////////////////////////////////

pub trait PointerArithmetic: layout::HasDataLayout {
// These are not supposed to be overriden.
// These are not supposed to be overridden.

//// Trunace the given value to the pointer size; also return whether there was an overflow
fn truncate_to_ptr(self, val: u128) -> (u64, bool) {
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/mir/mod.rs
Expand Up @@ -1950,7 +1950,7 @@ pub struct GeneratorLayout<'tcx> {
/// ```
///
/// here, there is one unique free region (`'a`) but it appears
/// twice. We would "renumber" each occurence to a unique vid, as follows:
/// twice. We would "renumber" each occurrence to a unique vid, as follows:
///
/// ```text
/// ClosureSubsts = [
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/traits/coherence.rs
Expand Up @@ -277,7 +277,7 @@ pub fn orphan_check<'a, 'gcx, 'tcx>(tcx: TyCtxt<'a, 'gcx, 'tcx>,
/// is bad, because the only local type with `T` as a subtree is
/// `LocalType<T>`, and `Vec<->` is between it and the type parameter.
/// - similarly, `FundamentalPair<LocalType<T>, T>` is bad, because
/// the second occurence of `T` is not a subtree of *any* local type.
/// the second occurrence of `T` is not a subtree of *any* local type.
/// - however, `LocalType<Vec<T>>` is OK, because `T` is a subtree of
/// `LocalType<Vec<T>>`, which is local and has no types between it and
/// the type parameter.
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/traits/mod.rs
Expand Up @@ -621,7 +621,7 @@ pub fn fully_normalize<'a, 'gcx, 'tcx, T>(infcx: &InferCtxt<'a, 'gcx, 'tcx>,
// FIXME (@jroesch) ISSUE 26721
// I'm not sure if this is a bug or not, needs further investigation.
// It appears that by reusing the fulfillment_cx here we incur more
// obligations and later trip an asssertion on regionck.rs line 337.
// obligations and later trip an assertion on regionck.rs line 337.
//
// The two possibilities I see is:
// - normalization is not actually fully happening and we
Expand Down
4 changes: 2 additions & 2 deletions src/librustc/ty/layout.rs
Expand Up @@ -2059,7 +2059,7 @@ impl<'a, 'tcx> LayoutOf<Ty<'tcx>> for LayoutCx<'tcx, TyCtxt<'a, 'tcx, 'tcx>> {
// can however trigger recursive invocations of `layout_of`.
// Therefore, we execute it *after* the main query has
// completed, to avoid problems around recursive structures
// and the like. (Admitedly, I wasn't able to reproduce a problem
// and the like. (Admittedly, I wasn't able to reproduce a problem
// here, but it seems like the right thing to do. -nmatsakis)
self.record_layout_for_printing(layout);

Expand All @@ -2085,7 +2085,7 @@ impl<'a, 'tcx> LayoutOf<Ty<'tcx>> for LayoutCx<'tcx, ty::maps::TyCtxtAt<'a, 'tcx
// can however trigger recursive invocations of `layout_of`.
// Therefore, we execute it *after* the main query has
// completed, to avoid problems around recursive structures
// and the like. (Admitedly, I wasn't able to reproduce a problem
// and the like. (Admittedly, I wasn't able to reproduce a problem
// here, but it seems like the right thing to do. -nmatsakis)
let cx = LayoutCx {
tcx: *self.tcx,
Expand Down
4 changes: 2 additions & 2 deletions src/librustc_apfloat/tests/ieee.rs
Expand Up @@ -2201,12 +2201,12 @@ fn is_finite_non_zero() {
assert!(!Single::ZERO.is_finite_non_zero());
assert!(!(-Single::ZERO).is_finite_non_zero());

// Test +/- qNaN. +/- dont mean anything with qNaN but paranoia can't hurt in
// Test +/- qNaN. +/- don't mean anything with qNaN but paranoia can't hurt in
// this instance.
assert!(!Single::NAN.is_finite_non_zero());
assert!(!(-Single::NAN).is_finite_non_zero());

// Test +/- sNaN. +/- dont mean anything with sNaN but paranoia can't hurt in
// Test +/- sNaN. +/- don't mean anything with sNaN but paranoia can't hurt in
// this instance.
assert!(!Single::snan(None).is_finite_non_zero());
assert!(!(-Single::snan(None)).is_finite_non_zero());
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_borrowck/borrowck/mod.rs
Expand Up @@ -1111,7 +1111,7 @@ impl<'a, 'tcx> BorrowckCtxt<'a, 'tcx> {

/// Given a type, if it is an immutable reference, return a suggestion to make it mutable
fn suggest_mut_for_immutable(&self, pty: &hir::Ty, is_implicit_self: bool) -> Option<String> {
// Check wether the argument is an immutable reference
// Check whether the argument is an immutable reference
debug!("suggest_mut_for_immutable({:?}, {:?})", pty, is_implicit_self);
if let hir::TyRptr(lifetime, hir::MutTy {
mutbl: hir::Mutability::MutImmutable,
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_const_eval/_match.rs
Expand Up @@ -607,7 +607,7 @@ pub fn is_useful<'p, 'a: 'p, 'tcx: 'a>(cx: &mut MatchCheckCtxt<'a, 'tcx>,
// be able to observe whether the types of the struct's fields are
// inhabited.
//
// If the field is truely inaccessible, then all the patterns
// If the field is truly inaccessible, then all the patterns
// matching against it must be wildcard patterns, so its type
// does not matter.
//
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_data_structures/indexed_vec.rs
Expand Up @@ -204,7 +204,7 @@ macro_rules! newtype_index {
$($tokens)*);
);

// The case where no derives are added, but encodable is overriden. Don't
// The case where no derives are added, but encodable is overridden. Don't
// derive serialization traits
(@pub [$($pub:tt)*]
@type [$type:ident]
Expand Down
8 changes: 4 additions & 4 deletions src/librustc_mir/borrow_check/mod.rs
Expand Up @@ -117,7 +117,7 @@ fn do_mir_borrowck<'a, 'gcx, 'tcx>(
for move_error in move_errors {
let (span, kind): (Span, IllegalMoveOriginKind) = match move_error {
MoveError::UnionMove { .. } => {
unimplemented!("dont know how to report union move errors yet.")
unimplemented!("don't know how to report union move errors yet.")
}
MoveError::IllegalMove {
cannot_move_out_of: o,
Expand Down Expand Up @@ -1424,7 +1424,7 @@ impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx> {
/// tracked in the MoveData.
///
/// An Err result includes a tag indicated why the search failed.
/// Currenly this can only occur if the place is built off of a
/// Currently this can only occur if the place is built off of a
/// static variable, as we do not track those in the MoveData.
fn move_path_closest_to(
&mut self,
Expand All @@ -1439,7 +1439,7 @@ impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx> {
}
match *last_prefix {
Place::Local(_) => panic!("should have move path for every Local"),
Place::Projection(_) => panic!("PrefixSet::All meant dont stop for Projection"),
Place::Projection(_) => panic!("PrefixSet::All meant don't stop for Projection"),
Place::Static(_) => return Err(NoMovePathFound::ReachedStatic),
}
}
Expand Down Expand Up @@ -1484,7 +1484,7 @@ impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx> {
{ }

ProjectionElem::Subslice { .. } => {
panic!("we dont allow assignments to subslices, context: {:?}",
panic!("we don't allow assignments to subslices, context: {:?}",
context);
}

Expand Down
2 changes: 1 addition & 1 deletion src/librustc_mir/borrow_check/nll/mod.rs
Expand Up @@ -278,7 +278,7 @@ fn for_each_region_constraint(

/// Right now, we piggy back on the `ReVar` to store our NLL inference
/// regions. These are indexed with `RegionVid`. This method will
/// assert that the region is a `ReVar` and extract its interal index.
/// assert that the region is a `ReVar` and extract its internal index.
/// This is reasonable because in our MIR we replace all universal regions
/// with inference variables.
pub trait ToRegionVid {
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_mir/borrow_check/nll/region_infer/mod.rs
Expand Up @@ -964,7 +964,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
debug!("check_universal_region: fr_minus={:?}", fr_minus);

// Grow `shorter_fr` until we find a non-local
// regon. (We always will.) We'll call that
// region. (We always will.) We'll call that
// `shorter_fr+` -- it's ever so slightly larger than
// `fr`.
let shorter_fr_plus = self.universal_regions.non_local_upper_bound(shorter_fr);
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_mir/borrow_check/nll/region_infer/values.rs
Expand Up @@ -150,7 +150,7 @@ pub(super) enum RegionElement {
/// A point in the control-flow graph.
Location(Location),

/// An in-scope, universally quantified region (e.g., a liftime parameter).
/// An in-scope, universally quantified region (e.g., a lifetime parameter).
UniversalRegion(RegionVid),
}

Expand Down
2 changes: 1 addition & 1 deletion src/librustc_mir/build/matches/mod.rs
Expand Up @@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

//! Code related to match expresions. These are sufficiently complex
//! Code related to match expressions. These are sufficiently complex
//! to warrant their own module and submodules. :) This main module
//! includes the high-level algorithm, the submodules contain the
//! details.
Expand Down
4 changes: 2 additions & 2 deletions src/librustc_mir/dataflow/impls/borrows.rs
Expand Up @@ -80,14 +80,14 @@ pub struct Borrows<'a, 'gcx: 'tcx, 'tcx: 'a> {
/// tracking (phased) borrows. It computes where a borrow is reserved;
/// i.e. where it can reach in the control flow starting from its
/// initial `assigned = &'rgn borrowed` statement, and ending
/// whereever `'rgn` itself ends.
/// wherever `'rgn` itself ends.
pub(crate) struct Reservations<'a, 'gcx: 'tcx, 'tcx: 'a>(pub(crate) Borrows<'a, 'gcx, 'tcx>);

/// The `ActiveBorrows` analysis is the second of the two flow
/// analyses tracking (phased) borrows. It computes where any given
/// borrow `&assigned = &'rgn borrowed` is *active*, which starts at
/// the first use of `assigned` after the reservation has started, and
/// ends whereever `'rgn` itself ends.
/// ends wherever `'rgn` itself ends.
pub(crate) struct ActiveBorrows<'a, 'gcx: 'tcx, 'tcx: 'a>(pub(crate) Borrows<'a, 'gcx, 'tcx>);

impl<'a, 'gcx, 'tcx> Reservations<'a, 'gcx, 'tcx> {
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_mir/diagnostics.rs
Expand Up @@ -365,7 +365,7 @@ with `#[derive(Clone)]`.
Some types have no ownership semantics at all and are trivial to duplicate. An
example is `i32` and the other number types. We don't have to call `.clone()` to
clone them, because they are marked `Copy` in addition to `Clone`. Implicit
cloning is more convienient in this case. We can mark our own types `Copy` if
cloning is more convenient in this case. We can mark our own types `Copy` if
all their members also are marked `Copy`.

In the example below, we implement a `Point` type. Because it only stores two
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_mir/interpret/eval_context.rs
Expand Up @@ -84,7 +84,7 @@ pub struct Frame<'tcx> {
/// return).
pub block: mir::BasicBlock,

/// The index of the currently evaluated statment.
/// The index of the currently evaluated statement.
pub stmt: usize,
}

Expand Down
2 changes: 1 addition & 1 deletion src/librustc_mir/monomorphize/item.rs
Expand Up @@ -68,7 +68,7 @@ pub enum InstantiationMode {
/// however, our local copy may conflict with other crates also
/// inlining the same function.
///
/// This flag indicates that this situation is occuring, and informs
/// This flag indicates that this situation is occurring, and informs
/// symbol name calculation that some extra mangling is needed to
/// avoid conflicts. Note that this may eventually go away entirely if
/// ThinLTO enables us to *always* have a globally shared instance of a
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_privacy/lib.rs
Expand Up @@ -781,7 +781,7 @@ impl<'a, 'tcx> Visitor<'tcx> for TypePrivacyVisitor<'a, 'tcx> {
// Additionally, until better reachability analysis for macros 2.0 is available,
// we prohibit access to private statics from other crates, this allows to give
// more code internal visibility at link time. (Access to private functions
// is already prohibited by type privacy for funciton types.)
// is already prohibited by type privacy for function types.)
fn visit_qpath(&mut self, qpath: &'tcx hir::QPath, id: ast::NodeId, span: Span) {
let def = match *qpath {
hir::QPath::Resolved(_, ref path) => match path.def {
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_resolve/check_unused.rs
Expand Up @@ -17,7 +17,7 @@
// `use` directives.
//
// Unused trait imports can't be checked until the method resolution. We save
// candidates here, and do the acutal check in librustc_typeck/check_unused.rs.
// candidates here, and do the actual check in librustc_typeck/check_unused.rs.

use std::ops::{Deref, DerefMut};

Expand Down
2 changes: 1 addition & 1 deletion src/librustc_resolve/lib.rs
Expand Up @@ -1440,7 +1440,7 @@ impl<'a> Resolver<'a> {
/// Rustdoc uses this to resolve things in a recoverable way. ResolutionError<'a>
/// isn't something that can be returned because it can't be made to live that long,
/// and also it's a private type. Fortunately rustdoc doesn't need to know the error,
/// just that an error occured.
/// just that an error occurred.
pub fn resolve_str_path_error(&mut self, span: Span, path_str: &str, is_value: bool)
-> Result<hir::Path, ()> {
use std::iter;
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_resolve/resolve_imports.rs
Expand Up @@ -186,7 +186,7 @@ impl<'a> Resolver<'a> {
}

let check_usable = |this: &mut Self, binding: &'a NameBinding<'a>| {
// `extern crate` are always usable for backwards compatability, see issue #37020.
// `extern crate` are always usable for backwards compatibility, see issue #37020.
let usable = this.is_accessible(binding.vis) || binding.is_extern_crate();
if usable { Ok(binding) } else { Err(Determined) }
};
Expand Down
4 changes: 2 additions & 2 deletions src/librustc_trans/back/lto.rs
Expand Up @@ -84,7 +84,7 @@ impl LtoModuleTranslation {
}
}

/// A "guage" of how costly it is to optimize this module, used to sort
/// A "gauge" of how costly it is to optimize this module, used to sort
/// biggest modules first.
pub fn cost(&self) -> u64 {
match *self {
Expand Down Expand Up @@ -726,7 +726,7 @@ impl ThinModule {
// which was basically a resurgence of #45511 after LLVM's bug 35212 was
// fixed.
//
// This function below is a huge hack around tihs problem. The function
// This function below is a huge hack around this problem. The function
// below is defined in `PassWrapper.cpp` and will basically "merge"
// all `DICompileUnit` instances in a module. Basically it'll take all
// the objects, rewrite all pointers of `DISubprogram` to point to the
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_trans/builder.rs
Expand Up @@ -1240,7 +1240,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
/// on), and `ptr` is nonzero-sized, then extracts the size of `ptr`
/// and the intrinsic for `lt` and passes them to `emit`, which is in
/// charge of generating code to call the passed intrinsic on whatever
/// block of generated code is targetted for the intrinsic.
/// block of generated code is targeted for the intrinsic.
///
/// If LLVM lifetime intrinsic support is disabled (i.e. optimizations
/// off) or `ptr` is zero-sized, then no-op (does not call `emit`).
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_trans/mir/rvalue.rs
Expand Up @@ -844,7 +844,7 @@ fn cast_float_to_int(bx: &Builder,
// They are exactly equal to int_ty::{MIN,MAX} if float_ty has enough significand bits.
// Otherwise, int_ty::MAX must be rounded towards zero, as it is one less than a power of two.
// int_ty::MIN, however, is either zero or a negative power of two and is thus exactly
// representable. Note that this only works if float_ty's exponent range is sufficently large.
// representable. Note that this only works if float_ty's exponent range is sufficiently large.
// f16 or 256 bit integers would break this property. Right now the smallest float type is f32
// with exponents ranging up to 127, which is barely enough for i128::MIN = -2^127.
// On the other hand, f_max works even if int_ty::MAX is greater than float_ty::MAX. Because
Expand Down