From a21e05678299ba1367e85251f6b9d6109ce602b9 Mon Sep 17 00:00:00 2001 From: Fourchaux Date: Thu, 22 Jun 2017 01:01:51 +0200 Subject: [PATCH 01/29] Fixing basic typos in Doc Comments --- src/bootstrap/lib.rs | 4 ++-- src/bootstrap/native.rs | 2 +- src/liballoc/allocator.rs | 8 ++++---- src/liballoc/btree/node.rs | 6 +++--- src/libcore/iter/mod.rs | 2 +- src/libcore/iter/traits.rs | 2 +- src/libcore/num/dec2flt/rawfp.rs | 6 +++--- src/libcore/ops/place.rs | 2 +- src/libcore/sync/atomic.rs | 2 +- src/librustc/hir/intravisit.rs | 2 +- src/librustc/hir/map/mod.rs | 2 +- src/librustc/hir/mod.rs | 2 +- src/librustc/infer/higher_ranked/mod.rs | 2 +- src/librustc/infer/resolve.rs | 2 +- src/librustc/lint/context.rs | 4 ++-- src/librustc/mir/mod.rs | 2 +- src/librustc/session/mod.rs | 2 +- src/librustc/traits/fulfill.rs | 2 +- src/librustc/traits/project.rs | 2 +- src/librustc/traits/specialize/mod.rs | 2 +- .../traits/specialize/specialization_graph.rs | 2 +- src/librustc/ty/adjustment.rs | 2 +- .../ty/inhabitedness/def_id_forest.rs | 4 ++-- src/librustc/ty/item_path.rs | 2 +- src/librustc/ty/sty.rs | 2 +- .../borrowck/mir/dataflow/impls.rs | 2 +- .../borrowck/mir/dataflow/mod.rs | 6 +++--- .../borrowck/mir/gather_moves.rs | 2 +- .../accumulate_vec.rs | 2 +- src/librustc_data_structures/small_vec.rs | 2 +- src/librustc_data_structures/stable_hasher.rs | 2 +- src/librustc_errors/emitter.rs | 2 +- src/librustc_errors/snippet.rs | 2 +- .../persist/preds/compress/construct.rs | 2 +- src/librustc_mir/build/scope.rs | 2 +- src/librustc_mir/hair/mod.rs | 2 +- src/librustc_mir/transform/erase_regions.rs | 2 +- src/librustc_trans/base.rs | 2 +- src/librustc_trans/debuginfo/doc.rs | 6 +++--- src/librustc_typeck/check/coercion.rs | 2 +- src/librustc_typeck/check/dropck.rs | 2 +- src/librustc_typeck/check/method/mod.rs | 2 +- .../constrained_type_params.rs | 2 +- src/librustc_typeck/variance/constraints.rs | 2 +- src/libstd/ffi/os_str.rs | 2 +- src/libstd/net/tcp.rs | 2 +- src/libstd/net/udp.rs | 2 +- src/libstd/panic.rs | 2 +- src/libstd/panicking.rs | 20 +++++++++---------- src/libstd/path.rs | 6 +++--- src/libstd/sync/once.rs | 2 +- src/libstd/sys/redox/args.rs | 2 +- src/libstd/sys/redox/ext/fs.rs | 2 +- src/libstd/sys/redox/ext/process.rs | 2 +- src/libstd/sys/redox/syscall/call.rs | 4 ++-- src/libstd/sys/unix/args.rs | 2 +- src/libstd/sys/unix/ext/fs.rs | 4 ++-- src/libstd/sys/unix/ext/net.rs | 4 ++-- src/libstd/sys/unix/ext/process.rs | 2 +- src/libstd/sys/windows/ext/fs.rs | 2 +- src/libstd/thread/mod.rs | 4 ++-- src/libstd/time/mod.rs | 2 +- src/libsyntax/ast.rs | 4 ++-- src/libsyntax/attr.rs | 2 +- src/libsyntax/codemap.rs | 4 ++-- src/libsyntax/parse/parser.rs | 2 +- src/libsyntax_ext/deriving/generic/mod.rs | 2 +- src/libsyntax_pos/lib.rs | 2 +- 68 files changed, 99 insertions(+), 99 deletions(-) diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs index ca8cc3212d7c7..91c9e2a742dae 100644 --- a/src/bootstrap/lib.rs +++ b/src/bootstrap/lib.rs @@ -635,7 +635,7 @@ impl Build { } /// Returns the root output directory for all Cargo output in a given stage, - /// running a particular compiler, wehther or not we're building the + /// running a particular compiler, whether or not we're building the /// standard library, and targeting the specified architecture. fn cargo_out(&self, compiler: &Compiler, @@ -1036,7 +1036,7 @@ impl Build { } impl<'a> Compiler<'a> { - /// Creates a new complier for the specified stage/host + /// Creates a new compiler for the specified stage/host fn new(stage: u32, host: &'a str) -> Compiler<'a> { Compiler { stage: stage, host: host } } diff --git a/src/bootstrap/native.rs b/src/bootstrap/native.rs index a23be37b15e0e..8b334819dd52b 100644 --- a/src/bootstrap/native.rs +++ b/src/bootstrap/native.rs @@ -11,7 +11,7 @@ //! Compilation of native dependencies like LLVM. //! //! Native projects like LLVM unfortunately aren't suited just yet for -//! compilation in build scripts that Cargo has. This is because thie +//! compilation in build scripts that Cargo has. This is because the //! compilation takes a *very* long time but also because we don't want to //! compile LLVM 3 times as part of a normal bootstrap (we want it cached). //! diff --git a/src/liballoc/allocator.rs b/src/liballoc/allocator.rs index 9bddce29957e1..9d6fdf7a40f78 100644 --- a/src/liballoc/allocator.rs +++ b/src/liballoc/allocator.rs @@ -40,7 +40,7 @@ fn size_align() -> (usize, usize) { /// /// (Note however that layouts are *not* required to have positive /// size, even though many allocators require that all memory -/// requeusts have positive size. A caller to the `Alloc::alloc` +/// requests have positive size. A caller to the `Alloc::alloc` /// method must either ensure that conditions like this are met, or /// use specific allocators with looser requirements.) #[derive(Clone, Debug, PartialEq, Eq)] @@ -213,7 +213,7 @@ impl Layout { /// /// Returns `Some((k, offset))`, where `k` is layout of the concatenated /// record and `offset` is the relative location, in bytes, of the - /// start of the `next` embedded witnin the concatenated record + /// start of the `next` embedded within the concatenated record /// (assuming that the record itself starts at offset 0). /// /// On arithmetic overflow, returns `None`. @@ -266,11 +266,11 @@ impl Layout { /// Creates a layout describing the record for `self` followed by /// `next` with no additional padding between the two. Since no /// padding is inserted, the alignment of `next` is irrelevant, - /// and is not incoporated *at all* into the resulting layout. + /// and is not incorporated *at all* into the resulting layout. /// /// Returns `(k, offset)`, where `k` is layout of the concatenated /// record and `offset` is the relative location, in bytes, of the - /// start of the `next` embedded witnin the concatenated record + /// start of the `next` embedded within the concatenated record /// (assuming that the record itself starts at offset 0). /// /// (The `offset` is always the same as `self.size()`; we use this diff --git a/src/liballoc/btree/node.rs b/src/liballoc/btree/node.rs index 811174b331e2b..1b2df19ae6837 100644 --- a/src/liballoc/btree/node.rs +++ b/src/liballoc/btree/node.rs @@ -132,7 +132,7 @@ impl InternalNode { /// An owned pointer to a node. This basically is either `Box>` or /// `Box>`. However, it contains no information as to which of the two types -/// of nodes is acutally behind the box, and, partially due to this lack of information, has no +/// of nodes is actually behind the box, and, partially due to this lack of information, has no /// destructor. struct BoxedNode { ptr: Unique> @@ -270,7 +270,7 @@ impl Root { // correct variance. /// A reference to a node. /// -/// This type has a number of paramaters that controls how it acts: +/// This type has a number of parameters that controls how it acts: /// - `BorrowType`: This can be `Immut<'a>` or `Mut<'a>` for some `'a` or `Owned`. /// When this is `Immut<'a>`, the `NodeRef` acts roughly like `&'a Node`, /// when this is `Mut<'a>`, the `NodeRef` acts roughly like `&'a mut Node`, @@ -775,7 +775,7 @@ impl Clone for Handle { } impl Handle { - /// Retrieves the node that contains the edge of key/value pair this handle pointes to. + /// Retrieves the node that contains the edge of key/value pair this handle points to. pub fn into_node(self) -> Node { self.node } diff --git a/src/libcore/iter/mod.rs b/src/libcore/iter/mod.rs index ee81151348772..9b6bc568a8a65 100644 --- a/src/libcore/iter/mod.rs +++ b/src/libcore/iter/mod.rs @@ -1031,7 +1031,7 @@ unsafe impl TrustedLen for Zip /// Now consider this twist where we add a call to `rev`. This version will /// print `('c', 1), ('b', 2), ('a', 3)`. Note that the letters are reversed, /// but the values of the counter still go in order. This is because `map()` is -/// still being called lazilly on each item, but we are popping items off the +/// still being called lazily on each item, but we are popping items off the /// back of the vector now, instead of shifting them from the front. /// /// ```rust diff --git a/src/libcore/iter/traits.rs b/src/libcore/iter/traits.rs index 679cf3a9b23ee..9e1cc6bc5353f 100644 --- a/src/libcore/iter/traits.rs +++ b/src/libcore/iter/traits.rs @@ -362,7 +362,7 @@ pub trait Extend { /// In a similar fashion to the [`Iterator`] protocol, once a /// `DoubleEndedIterator` returns `None` from a `next_back()`, calling it again /// may or may not ever return `Some` again. `next()` and `next_back()` are -/// interchangable for this purpose. +/// interchangeable for this purpose. /// /// [`Iterator`]: trait.Iterator.html /// diff --git a/src/libcore/num/dec2flt/rawfp.rs b/src/libcore/num/dec2flt/rawfp.rs index 2a60292d0232e..12960fed04550 100644 --- a/src/libcore/num/dec2flt/rawfp.rs +++ b/src/libcore/num/dec2flt/rawfp.rs @@ -102,10 +102,10 @@ pub trait RawFloat : Float + Copy + Debug + LowerExp /// The number of bits in the exponent. const EXP_BITS: u8; - /// The number of bits in the singificand, *including* the hidden bit. + /// The number of bits in the significand, *including* the hidden bit. const SIG_BITS: u8; - /// The number of bits in the singificand, *excluding* the hidden bit. + /// The number of bits in the significand, *excluding* the hidden bit. const EXPLICIT_SIG_BITS: u8; /// The maximum legal exponent in fractional representation. @@ -123,7 +123,7 @@ pub trait RawFloat : Float + Copy + Debug + LowerExp /// `MIN_EXP` for integral representation, i.e., with the shift applied. const MIN_EXP_INT: i16; - /// The maximum normalized singificand in integral representation. + /// The maximum normalized significand in integral representation. const MAX_SIG: u64; /// The minimal normalized significand in integral representation. diff --git a/src/libcore/ops/place.rs b/src/libcore/ops/place.rs index 996a741c96f93..0f9e66fed5a74 100644 --- a/src/libcore/ops/place.rs +++ b/src/libcore/ops/place.rs @@ -59,7 +59,7 @@ pub trait Place { /// or `Copy`, since the `make_place` method takes `self` by value. #[unstable(feature = "placement_new_protocol", issue = "27779")] pub trait Placer { - /// `Place` is the intermedate agent guarding the + /// `Place` is the intermediate agent guarding the /// uninitialized state for `Data`. type Place: InPlace; diff --git a/src/libcore/sync/atomic.rs b/src/libcore/sync/atomic.rs index d647a94a1efde..510e01db0e965 100644 --- a/src/libcore/sync/atomic.rs +++ b/src/libcore/sync/atomic.rs @@ -1632,7 +1632,7 @@ unsafe fn atomic_xor(dst: *mut T, val: T, order: Ordering) -> T { /// /// pub fn lock(&self) { /// while !self.flag.compare_and_swap(false, true, Ordering::Relaxed) {} -/// // This fence syncronizes-with store in `unlock`. +/// // This fence synchronizes-with store in `unlock`. /// fence(Ordering::Acquire); /// } /// diff --git a/src/librustc/hir/intravisit.rs b/src/librustc/hir/intravisit.rs index 836d9775a3f69..dd6cdf54c293d 100644 --- a/src/librustc/hir/intravisit.rs +++ b/src/librustc/hir/intravisit.rs @@ -87,7 +87,7 @@ pub enum NestedVisitorMap<'this, 'tcx: 'this> { /// Do not visit nested item-like things, but visit nested things /// that are inside of an item-like. /// - /// **This is the most common choice.** A very commmon pattern is + /// **This is the most common choice.** A very common pattern is /// to use `visit_all_item_likes()` as an outer loop, /// and to have the visitor that visits the contents of each item /// using this setting. diff --git a/src/librustc/hir/map/mod.rs b/src/librustc/hir/map/mod.rs index a1875cd46a0cb..8addde60af0bc 100644 --- a/src/librustc/hir/map/mod.rs +++ b/src/librustc/hir/map/mod.rs @@ -248,7 +248,7 @@ pub struct Map<'hir> { pub forest: &'hir Forest, /// Same as the dep_graph in forest, just available with one fewer - /// deref. This is a gratuitious micro-optimization. + /// deref. This is a gratuitous micro-optimization. pub dep_graph: DepGraph, /// NodeIds are sequential integers from 0, so we can be diff --git a/src/librustc/hir/mod.rs b/src/librustc/hir/mod.rs index 3f2977cc503df..24b832385864e 100644 --- a/src/librustc/hir/mod.rs +++ b/src/librustc/hir/mod.rs @@ -497,7 +497,7 @@ impl Crate { &self.impl_items[&id] } - /// Visits all items in the crate in some determinstic (but + /// Visits all items in the crate in some deterministic (but /// unspecified) order. If you just need to process every item, /// but don't care about nesting, this method is the best choice. /// diff --git a/src/librustc/infer/higher_ranked/mod.rs b/src/librustc/infer/higher_ranked/mod.rs index dbbcc6cfbec6b..470ed35497104 100644 --- a/src/librustc/infer/higher_ranked/mod.rs +++ b/src/librustc/infer/higher_ranked/mod.rs @@ -616,7 +616,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> { (result, map) } - /// Searches the region constriants created since `snapshot` was started + /// Searches the region constraints created since `snapshot` was started /// and checks to determine whether any of the skolemized regions created /// in `skol_map` would "escape" -- meaning that they are related to /// other regions in some way. If so, the higher-ranked subtyping doesn't diff --git a/src/librustc/infer/resolve.rs b/src/librustc/infer/resolve.rs index 2e8b843d07b30..f043a5ab94c4b 100644 --- a/src/librustc/infer/resolve.rs +++ b/src/librustc/infer/resolve.rs @@ -46,7 +46,7 @@ impl<'a, 'gcx, 'tcx> TypeFolder<'gcx, 'tcx> for OpportunisticTypeResolver<'a, 'g } /// The opportunistic type and region resolver is similar to the -/// opportunistic type resolver, but also opportunistly resolves +/// opportunistic type resolver, but also opportunistically resolves /// regions. It is useful for canonicalization. pub struct OpportunisticTypeAndRegionResolver<'a, 'gcx: 'a+'tcx, 'tcx: 'a> { infcx: &'a InferCtxt<'a, 'gcx, 'tcx>, diff --git a/src/librustc/lint/context.rs b/src/librustc/lint/context.rs index a9e0ef511024f..2bb64318ca69f 100644 --- a/src/librustc/lint/context.rs +++ b/src/librustc/lint/context.rs @@ -76,7 +76,7 @@ pub struct LintStore { /// is true if the lint group was added by a plugin. lint_groups: FxHashMap<&'static str, (Vec, bool)>, - /// Extra info for future incompatibility lints, descibing the + /// Extra info for future incompatibility lints, describing the /// issue or RFC that caused the incompatibility. future_incompatible: FxHashMap, } @@ -163,7 +163,7 @@ pub struct FutureIncompatibleInfo { pub reference: &'static str // e.g., a URL for an issue/PR/RFC or error code } -/// The targed of the `by_name` map, which accounts for renaming/deprecation. +/// The target of the `by_name` map, which accounts for renaming/deprecation. enum TargetLint { /// A direct lint target Id(LintId), diff --git a/src/librustc/mir/mod.rs b/src/librustc/mir/mod.rs index c8d03e7b30588..37eb4a167ddd2 100644 --- a/src/librustc/mir/mod.rs +++ b/src/librustc/mir/mod.rs @@ -676,7 +676,7 @@ impl<'tcx> Debug for TerminatorKind<'tcx> { impl<'tcx> TerminatorKind<'tcx> { /// Write the "head" part of the terminator; that is, its name and the data it uses to pick the - /// successor basic block, if any. The only information not inlcuded is the list of possible + /// successor basic block, if any. The only information not included is the list of possible /// successors, which may be rendered differently between the text and the graphviz format. pub fn fmt_head(&self, fmt: &mut W) -> fmt::Result { use self::TerminatorKind::*; diff --git a/src/librustc/session/mod.rs b/src/librustc/session/mod.rs index 827fa72f03404..a6c4d1b3c8f62 100644 --- a/src/librustc/session/mod.rs +++ b/src/librustc/session/mod.rs @@ -108,7 +108,7 @@ pub struct Session { /// Map from imported macro spans (which consist of /// the localized span for the macro body) to the - /// macro name and defintion span in the source crate. + /// macro name and definition span in the source crate. pub imported_macro_spans: RefCell>, incr_comp_session: RefCell, diff --git a/src/librustc/traits/fulfill.rs b/src/librustc/traits/fulfill.rs index 16ecc94b9476a..865de0d1880c7 100644 --- a/src/librustc/traits/fulfill.rs +++ b/src/librustc/traits/fulfill.rs @@ -43,7 +43,7 @@ pub struct GlobalFulfilledPredicates<'tcx> { /// consists of a list of obligations that must be (eventually) /// satisfied. The job is to track which are satisfied, which yielded /// errors, and which are still pending. At any point, users can call -/// `select_where_possible`, and the fulfilment context will try to do +/// `select_where_possible`, and the fulfillment context will try to do /// selection, retaining only those obligations that remain /// ambiguous. This may be helpful in pushing type inference /// along. Once all type inference constraints have been generated, the diff --git a/src/librustc/traits/project.rs b/src/librustc/traits/project.rs index 787452121d375..b8470db525216 100644 --- a/src/librustc/traits/project.rs +++ b/src/librustc/traits/project.rs @@ -1362,7 +1362,7 @@ impl<'tcx> ProjectionCache<'tcx> { } /// Try to start normalize `key`; returns an error if - /// normalization already occured (this error corresponds to a + /// normalization already occurred (this error corresponds to a /// cache hit, so it's actually a good thing). fn try_start(&mut self, key: ty::ProjectionTy<'tcx>) -> Result<(), ProjectionCacheEntry<'tcx>> { diff --git a/src/librustc/traits/specialize/mod.rs b/src/librustc/traits/specialize/mod.rs index 18734e2dbc3f1..2564d925025b7 100644 --- a/src/librustc/traits/specialize/mod.rs +++ b/src/librustc/traits/specialize/mod.rs @@ -107,7 +107,7 @@ pub fn translate_substs<'a, 'gcx, 'tcx>(infcx: &InferCtxt<'a, 'gcx, 'tcx>, } /// Given a selected impl described by `impl_data`, returns the -/// definition and substitions for the method with the name `name` +/// definition and substitutions for the method with the name `name` /// the kind `kind`, and trait method substitutions `substs`, in /// that impl, a less specialized impl, or the trait default, /// whichever applies. diff --git a/src/librustc/traits/specialize/specialization_graph.rs b/src/librustc/traits/specialize/specialization_graph.rs index f80caeec460fa..bc76d5af052c0 100644 --- a/src/librustc/traits/specialize/specialization_graph.rs +++ b/src/librustc/traits/specialize/specialization_graph.rs @@ -95,7 +95,7 @@ impl<'a, 'gcx, 'tcx> Children { } /// Attempt to insert an impl into this set of children, while comparing for - /// specialiation relationships. + /// specialization relationships. fn insert(&mut self, tcx: TyCtxt<'a, 'gcx, 'tcx>, impl_def_id: DefId, diff --git a/src/librustc/ty/adjustment.rs b/src/librustc/ty/adjustment.rs index 62d137475f90e..39f370c0ec088 100644 --- a/src/librustc/ty/adjustment.rs +++ b/src/librustc/ty/adjustment.rs @@ -29,7 +29,7 @@ use ty::subst::Substs; /// by `autoref`, to either a raw or borrowed pointer. In these cases unsize is /// `false`. /// -/// 2. A thin-to-fat coercon involves unsizing the underlying data. We start +/// 2. A thin-to-fat coercion involves unsizing the underlying data. We start /// with a thin pointer, deref a number of times, unsize the underlying data, /// then autoref. The 'unsize' phase may change a fixed length array to a /// dynamically sized one, a concrete object to a trait object, or statically diff --git a/src/librustc/ty/inhabitedness/def_id_forest.rs b/src/librustc/ty/inhabitedness/def_id_forest.rs index 6801e82fe7476..b029c2a709836 100644 --- a/src/librustc/ty/inhabitedness/def_id_forest.rs +++ b/src/librustc/ty/inhabitedness/def_id_forest.rs @@ -24,9 +24,9 @@ use ty::{DefId, DefIdTree}; #[derive(Clone)] pub struct DefIdForest { /// The minimal set of DefIds required to represent the whole set. - /// If A and B are DefIds in the DefIdForest, and A is a desecendant + /// If A and B are DefIds in the DefIdForest, and A is a descendant /// of B, then only B will be in root_ids. - /// We use a SmallVec here because (for its use for cacheing inhabitedness) + /// We use a SmallVec here because (for its use for caching inhabitedness) /// its rare that this will contain even two ids. root_ids: SmallVec<[DefId; 1]>, } diff --git a/src/librustc/ty/item_path.rs b/src/librustc/ty/item_path.rs index 09a3bcd061380..cc6328bf3b583 100644 --- a/src/librustc/ty/item_path.rs +++ b/src/librustc/ty/item_path.rs @@ -125,7 +125,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> { /// If possible, this pushes a global path resolving to `external_def_id` that is visible /// from at least one local module and returns true. If the crate defining `external_def_id` is - /// declared with an `extern crate`, the path is guarenteed to use the `extern crate`. + /// declared with an `extern crate`, the path is guaranteed to use the `extern crate`. pub fn try_push_visible_item_path(self, buffer: &mut T, external_def_id: DefId) -> bool where T: ItemPathBuffer { diff --git a/src/librustc/ty/sty.rs b/src/librustc/ty/sty.rs index 6923a6d21d63f..d8e2dc57a1519 100644 --- a/src/librustc/ty/sty.rs +++ b/src/librustc/ty/sty.rs @@ -741,7 +741,7 @@ pub type Region<'tcx> = &'tcx RegionKind; /// /// The process of doing that is called "skolemization". The bound regions /// are replaced by skolemized markers, which don't satisfy any relation -/// not explicity provided. +/// not explicitly provided. /// /// There are 2 kinds of skolemized regions in rustc: `ReFree` and /// `ReSkolemized`. When checking an item's body, `ReFree` is supposed diff --git a/src/librustc_borrowck/borrowck/mir/dataflow/impls.rs b/src/librustc_borrowck/borrowck/mir/dataflow/impls.rs index 1a1ac7f9c74d3..9e8aefcfee144 100644 --- a/src/librustc_borrowck/borrowck/mir/dataflow/impls.rs +++ b/src/librustc_borrowck/borrowck/mir/dataflow/impls.rs @@ -211,7 +211,7 @@ impl<'a, 'tcx: 'a> HasMoveData<'tcx> for DefinitelyInitializedLvals<'a, 'tcx> { /// you if an l-value *might* be uninitialized at a given point in the /// control flow. But `MovingOutStatements` also includes the added /// data of *which* particular statement causing the deinitialization -/// that the borrow checker's error meessage may need to report. +/// that the borrow checker's error message may need to report. #[allow(dead_code)] pub struct MovingOutStatements<'a, 'tcx: 'a> { tcx: TyCtxt<'a, 'tcx, 'tcx>, diff --git a/src/librustc_borrowck/borrowck/mir/dataflow/mod.rs b/src/librustc_borrowck/borrowck/mir/dataflow/mod.rs index f0f082a2561cc..8f381a35c37ec 100644 --- a/src/librustc_borrowck/borrowck/mir/dataflow/mod.rs +++ b/src/librustc_borrowck/borrowck/mir/dataflow/mod.rs @@ -321,11 +321,11 @@ pub trait BitDenotation { /// basic block) according to the effects of evaluating statement. /// /// This is used, in particular, for building up the - /// "transfer-function" represnting the overall-effect of the + /// "transfer-function" representing the overall-effect of the /// block, represented via GEN and KILL sets. /// /// The statement is identified as `bb_data[idx_stmt]`, where - /// `bb_data` is the sequence of statements identifed by `bb` in + /// `bb_data` is the sequence of statements identified by `bb` in /// the MIR. fn statement_effect(&self, sets: &mut BlockSets, @@ -337,7 +337,7 @@ pub trait BitDenotation { /// the terminator. /// /// This is used, in particular, for building up the - /// "transfer-function" represnting the overall-effect of the + /// "transfer-function" representing the overall-effect of the /// block, represented via GEN and KILL sets. /// /// The effects applied here cannot depend on which branch the diff --git a/src/librustc_borrowck/borrowck/mir/gather_moves.rs b/src/librustc_borrowck/borrowck/mir/gather_moves.rs index a0ecdcc8e2ff7..a3f8afb73cc8e 100644 --- a/src/librustc_borrowck/borrowck/mir/gather_moves.rs +++ b/src/librustc_borrowck/borrowck/mir/gather_moves.rs @@ -257,7 +257,7 @@ impl<'a, 'tcx> MoveDataBuilder<'a, 'tcx> { /// NOTE: lvalues behind references *do not* get a move path, which is /// problematic for borrowck. /// - /// Maybe we should have seperate "borrowck" and "moveck" modes. + /// Maybe we should have separate "borrowck" and "moveck" modes. fn move_path_for(&mut self, lval: &Lvalue<'tcx>) -> Result { diff --git a/src/librustc_data_structures/accumulate_vec.rs b/src/librustc_data_structures/accumulate_vec.rs index c03c2890ba34c..52306de74cb8b 100644 --- a/src/librustc_data_structures/accumulate_vec.rs +++ b/src/librustc_data_structures/accumulate_vec.rs @@ -13,7 +13,7 @@ //! Space for up to N elements is provided on the stack. If more elements are collected, Vec is //! used to store the values on the heap. //! -//! The N above is determined by Array's implementor, by way of an associatated constant. +//! The N above is determined by Array's implementor, by way of an associated constant. use std::ops::{Deref, DerefMut}; use std::iter::{self, IntoIterator, FromIterator}; diff --git a/src/librustc_data_structures/small_vec.rs b/src/librustc_data_structures/small_vec.rs index 4e2b378602102..74738e61b4467 100644 --- a/src/librustc_data_structures/small_vec.rs +++ b/src/librustc_data_structures/small_vec.rs @@ -14,7 +14,7 @@ //! used to store the values on the heap. SmallVec is similar to AccumulateVec, but adds //! the ability to push elements. //! -//! The N above is determined by Array's implementor, by way of an associatated constant. +//! The N above is determined by Array's implementor, by way of an associated constant. use std::ops::{Deref, DerefMut}; use std::iter::{IntoIterator, FromIterator}; diff --git a/src/librustc_data_structures/stable_hasher.rs b/src/librustc_data_structures/stable_hasher.rs index 5e291ea3c152b..6801aa455e11e 100644 --- a/src/librustc_data_structures/stable_hasher.rs +++ b/src/librustc_data_structures/stable_hasher.rs @@ -193,7 +193,7 @@ impl Hasher for StableHasher { /// Something that implements `HashStable` can be hashed in a way that is -/// stable across multiple compiliation sessions. +/// stable across multiple compilation sessions. pub trait HashStable { fn hash_stable(&self, hcx: &mut CTX, diff --git a/src/librustc_errors/emitter.rs b/src/librustc_errors/emitter.rs index 2d25d12d3a96e..efbc523561b6d 100644 --- a/src/librustc_errors/emitter.rs +++ b/src/librustc_errors/emitter.rs @@ -805,7 +805,7 @@ impl EmitterWriter { .map(|_| " ") .collect::(); - /// Return wether `style`, or the override if present and the style is `NoStyle`. + /// Return whether `style`, or the override if present and the style is `NoStyle`. fn style_or_override(style: Style, override_style: Option