diff --git a/src/doc/grammar.md b/src/doc/grammar.md index 0fd3070d3bd..a5a2b318db4 100644 --- a/src/doc/grammar.md +++ b/src/doc/grammar.md @@ -773,7 +773,7 @@ bound := path | lifetime ## Type kinds -**FIXME:** this this probably not relevant to the grammar... +**FIXME:** this is probably not relevant to the grammar... # Memory and concurrency models diff --git a/src/doc/trpl/concurrency.md b/src/doc/trpl/concurrency.md index a17f3a5cae5..d62a96f7308 100644 --- a/src/doc/trpl/concurrency.md +++ b/src/doc/trpl/concurrency.md @@ -195,7 +195,7 @@ our value if it's immutable, but we want to be able to mutate it, so we need something else to persuade the borrow checker we know what we're doing. It looks like we need some type that allows us to safely mutate a shared value, -for example a type that that can ensure only one thread at a time is able to +for example a type that can ensure only one thread at a time is able to mutate the value inside it at any one time. For that, we can use the `Mutex` type! diff --git a/src/doc/trpl/iterators.md b/src/doc/trpl/iterators.md index 3350df4ff7f..6cd0d9f8352 100644 --- a/src/doc/trpl/iterators.md +++ b/src/doc/trpl/iterators.md @@ -302,7 +302,7 @@ This will print `filter()` is an adapter that takes a closure as an argument. This closure returns `true` or `false`. The new iterator `filter()` produces -only the elements that that closure returns `true` for: +only the elements that the closure returns `true` for: ```rust for i in (1..100).filter(|&x| x % 2 == 0) { diff --git a/src/etc/test-float-parse/runtests.py b/src/etc/test-float-parse/runtests.py index 17a1b769bd6..27af63a5876 100644 --- a/src/etc/test-float-parse/runtests.py +++ b/src/etc/test-float-parse/runtests.py @@ -71,7 +71,7 @@ The output on stdout is treated as (f64, f32, decimal) record, encoded thusly: Incomplete records are an error. Not-a-Number bit patterns are invalid too. -The tests run serially but the validaition for a a single test is parallelized +The tests run serially but the validation for a single test is parallelized with ``multiprocessing``. Each test is launched as a subprocess. One thread supervises it: Accepts and enqueues records to validate, observe stderr, and waits for the process to exit. A set of worker processes perform diff --git a/src/libcollections/btree/map.rs b/src/libcollections/btree/map.rs index aedfbe546de..96d29c7da4a 100644 --- a/src/libcollections/btree/map.rs +++ b/src/libcollections/btree/map.rs @@ -593,7 +593,7 @@ mod stack { top: node::Handle<*mut Node, Type, NodeType>, } - /// A `PartialSearchStack` that doesn't hold a a reference to the next node, and is just + /// A `PartialSearchStack` that doesn't hold a reference to the next node, and is just /// just waiting for a `Handle` to that next node to be pushed. See `PartialSearchStack::with` /// for more details. pub struct Pusher<'id, 'a, K:'a, V:'a> { diff --git a/src/libcollectionstest/str.rs b/src/libcollectionstest/str.rs index b4555679e9c..4c5f47bcab0 100644 --- a/src/libcollectionstest/str.rs +++ b/src/libcollectionstest/str.rs @@ -86,7 +86,7 @@ fn test_find_str() { assert_eq!(data[43..86].find("iệt"), Some(77 - 43)); assert_eq!(data[43..86].find("Nam"), Some(83 - 43)); - // find every substring -- assert that it finds it, or an earlier occurence. + // find every substring -- assert that it finds it, or an earlier occurrence. let string = "Việt Namacbaabcaabaaba"; for (i, ci) in string.char_indices() { let ip = i + ci.len_utf8(); diff --git a/src/libcore/cell.rs b/src/libcore/cell.rs index d37f5169af1..1b4af44da46 100644 --- a/src/libcore/cell.rs +++ b/src/libcore/cell.rs @@ -598,7 +598,7 @@ impl<'b, T: ?Sized> Ref<'b, T> { } } - /// Make a new `Ref` for a optional component of the borrowed data, e.g. an + /// Make a new `Ref` for an optional component of the borrowed data, e.g. an /// enum variant. /// /// The `RefCell` is already immutably borrowed, so this cannot fail. @@ -668,7 +668,7 @@ impl<'b, T: ?Sized> RefMut<'b, T> { } } - /// Make a new `RefMut` for a optional component of the borrowed data, e.g. + /// Make a new `RefMut` for an optional component of the borrowed data, e.g. /// an enum variant. /// /// The `RefCell` is already mutably borrowed, so this cannot fail. diff --git a/src/libcore/intrinsics.rs b/src/libcore/intrinsics.rs index ece285a8313..08c017841e3 100644 --- a/src/libcore/intrinsics.rs +++ b/src/libcore/intrinsics.rs @@ -373,20 +373,20 @@ extern "rust-intrinsic" { /// a size of `count` * `size_of::()` and an alignment of /// `min_align_of::()` /// - /// The volatile parameter parameter is set to `true`, so it will not be optimized out. + /// The volatile parameter is set to `true`, so it will not be optimized out. pub fn volatile_copy_nonoverlapping_memory(dst: *mut T, src: *const T, count: usize); /// Equivalent to the appropriate `llvm.memmove.p0i8.0i8.*` intrinsic, with /// a size of `count` * `size_of::()` and an alignment of /// `min_align_of::()` /// - /// The volatile parameter parameter is set to `true`, so it will not be optimized out. + /// The volatile parameter is set to `true`, so it will not be optimized out. pub fn volatile_copy_memory(dst: *mut T, src: *const T, count: usize); /// Equivalent to the appropriate `llvm.memset.p0i8.*` intrinsic, with a /// size of `count` * `size_of::()` and an alignment of /// `min_align_of::()`. /// - /// The volatile parameter parameter is set to `true`, so it will not be optimized out. + /// The volatile parameter is set to `true`, so it will not be optimized out. pub fn volatile_set_memory(dst: *mut T, val: u8, count: usize); /// Perform a volatile load from the `src` pointer. diff --git a/src/libcore/marker.rs b/src/libcore/marker.rs index 35dde63e52b..bf95ce86850 100644 --- a/src/libcore/marker.rs +++ b/src/libcore/marker.rs @@ -381,7 +381,7 @@ mod impls { /// ``` /// /// Without the declaration `T:Reflect`, `foo` would not type check -/// (note: as a matter of style, it would be preferable to to write +/// (note: as a matter of style, it would be preferable to write /// `T:Any`, because `T:Any` implies `T:Reflect` and `T:'static`, but /// we use `Reflect` here to show how it works). The `Reflect` bound /// thus serves to alert `foo`'s caller to the fact that `foo` may diff --git a/src/libcore/num/bignum.rs b/src/libcore/num/bignum.rs index baeca6b8b49..18b34e24fcb 100644 --- a/src/libcore/num/bignum.rs +++ b/src/libcore/num/bignum.rs @@ -110,7 +110,7 @@ macro_rules! define_bignum { ($name:ident: type=$ty:ty, n=$n:expr) => ( /// Stack-allocated arbitrary-precision (up to certain limit) integer. /// - /// This is backed by an fixed-size array of given type ("digit"). + /// This is backed by a fixed-size array of given type ("digit"). /// While the array is not very large (normally some hundred bytes), /// copying it recklessly may result in the performance hit. /// Thus this is intentionally not `Copy`. diff --git a/src/libcore/num/flt2dec/mod.rs b/src/libcore/num/flt2dec/mod.rs index 7f7c61938cb..57d4bccbfa6 100644 --- a/src/libcore/num/flt2dec/mod.rs +++ b/src/libcore/num/flt2dec/mod.rs @@ -461,7 +461,7 @@ pub fn to_shortest_str<'a, T, F>(mut format_shortest: F, v: T, /// You probably would want `strategy::grisu::format_shortest` for this. /// /// The `dec_bounds` is a tuple `(lo, hi)` such that the number is formatted -/// as decimal only when `10^lo <= V < 10^hi`. Note that this is the *apparant* `V` +/// as decimal only when `10^lo <= V < 10^hi`. Note that this is the *apparent* `V` /// instead of the actual `v`! Thus any printed exponent in the exponential form /// cannot be in this range, avoiding any confusion. /// diff --git a/src/libcore/num/flt2dec/strategy/grisu.rs b/src/libcore/num/flt2dec/strategy/grisu.rs index 5b4b2e46478..13e01d9a7f7 100644 --- a/src/libcore/num/flt2dec/strategy/grisu.rs +++ b/src/libcore/num/flt2dec/strategy/grisu.rs @@ -488,7 +488,7 @@ pub fn format_exact_opt(d: &Decoded, buf: &mut [u8], limit: i16) // but scaling `max_ten_kappa << e` by 10 can result in overflow. // thus we are being sloppy here and widen the error range by a factor of 10. // this will increase the false negative rate, but only very, *very* slightly; - // it can only matter noticably when the mantissa is bigger than 60 bits. + // it can only matter noticeably when the mantissa is bigger than 60 bits. return possibly_round(buf, 0, exp, limit, v.f / 10, (max_ten_kappa as u64) << e, err << e); } else if ((exp as i32 - limit as i32) as usize) < buf.len() { (exp - limit) as usize diff --git a/src/libcore/num/mod.rs b/src/libcore/num/mod.rs index 340028b4beb..56e55155c65 100644 --- a/src/libcore/num/mod.rs +++ b/src/libcore/num/mod.rs @@ -1383,7 +1383,7 @@ fn from_str_radix(src: &str, radix: u32) // all valid digits are ascii, so we will just iterate over the utf8 bytes // and cast them to chars. .to_digit() will safely return None for anything - // other than a valid ascii digit for a the given radix, including the first-byte + // other than a valid ascii digit for the given radix, including the first-byte // of multi-byte sequences let src = src.as_bytes(); diff --git a/src/libcore/str/mod.rs b/src/libcore/str/mod.rs index 9f1439ea388..57daa95e8c4 100644 --- a/src/libcore/str/mod.rs +++ b/src/libcore/str/mod.rs @@ -562,7 +562,7 @@ macro_rules! derive_pattern_clone { } /// This macro generates two public iterator structs -/// wrapping an private internal one that makes use of the `Pattern` API. +/// wrapping a private internal one that makes use of the `Pattern` API. /// /// For all patterns `P: Pattern<'a>` the following items will be /// generated (generics omitted): diff --git a/src/libcoretest/num/dec2flt/mod.rs b/src/libcoretest/num/dec2flt/mod.rs index 131cf629575..51fea6e0171 100644 --- a/src/libcoretest/num/dec2flt/mod.rs +++ b/src/libcoretest/num/dec2flt/mod.rs @@ -16,7 +16,7 @@ use test; mod parse; mod rawfp; -// Take an float literal, turn it into a string in various ways (that are all trusted +// Take a float literal, turn it into a string in various ways (that are all trusted // to be correct) and see if those strings are parsed back to the value of the literal. // Requires a *polymorphic literal*, i.e. one that can serve as f64 as well as f32. macro_rules! test_literal { diff --git a/src/librustc/front/map/mod.rs b/src/librustc/front/map/mod.rs index 825d5da0c99..396e2bb5703 100644 --- a/src/librustc/front/map/mod.rs +++ b/src/librustc/front/map/mod.rs @@ -578,7 +578,7 @@ impl<'ast> Map<'ast> { } } - /// Given a node ID, get a list of of attributes associated with the AST + /// Given a node ID, get a list of attributes associated with the AST /// corresponding to the Node ID pub fn attrs(&self, id: NodeId) -> &'ast [ast::Attribute] { let attrs = match self.find(id) { diff --git a/src/librustc/middle/expr_use_visitor.rs b/src/librustc/middle/expr_use_visitor.rs index 1eed7fb95a1..e1f8aaead88 100644 --- a/src/librustc/middle/expr_use_visitor.rs +++ b/src/librustc/middle/expr_use_visitor.rs @@ -913,7 +913,7 @@ impl<'d,'t,'a,'tcx> ExprUseVisitor<'d,'t,'a,'tcx> { self.consume_expr(&*arm.body); } - /// Walks an pat that occurs in isolation (i.e. top-level of fn + /// Walks a pat that occurs in isolation (i.e. top-level of fn /// arg or let binding. *Not* a match arm or nested pat.) fn walk_irrefutable_pat(&mut self, cmt_discr: mc::cmt<'tcx>, pat: &hir::Pat) { let mut mode = Unknown; @@ -1136,7 +1136,7 @@ impl<'d,'t,'a,'tcx> ExprUseVisitor<'d,'t,'a,'tcx> { } hir::PatIdent(_, _, Some(_)) => { - // Do nothing; this is a binding (not a enum + // Do nothing; this is a binding (not an enum // variant or struct), and the cat_pattern call // will visit the substructure recursively. } @@ -1145,7 +1145,7 @@ impl<'d,'t,'a,'tcx> ExprUseVisitor<'d,'t,'a,'tcx> { hir::PatRegion(..) | hir::PatLit(..) | hir::PatRange(..) | hir::PatVec(..) => { // Similarly, each of these cases does not - // correspond to a enum variant or struct, so we + // correspond to an enum variant or struct, so we // do not do any `matched_pat` calls for these // cases either. } diff --git a/src/librustc/middle/infer/higher_ranked/mod.rs b/src/librustc/middle/infer/higher_ranked/mod.rs index b0fce71d3f0..ef6d9ae4191 100644 --- a/src/librustc/middle/infer/higher_ranked/mod.rs +++ b/src/librustc/middle/infer/higher_ranked/mod.rs @@ -567,7 +567,7 @@ pub fn plug_leaks<'a,'tcx,T>(infcx: &InferCtxt<'a,'tcx>, // Compute a mapping from the "taint set" of each skolemized // region back to the `ty::BoundRegion` that it originally - // represented. Because `leak_check` passed, we know that that + // represented. Because `leak_check` passed, we know that // these taint sets are mutually disjoint. let inv_skol_map: FnvHashMap = skol_map diff --git a/src/librustc/middle/traits/select.rs b/src/librustc/middle/traits/select.rs index 60f6cffa346..f6e35cf739d 100644 --- a/src/librustc/middle/traits/select.rs +++ b/src/librustc/middle/traits/select.rs @@ -2394,7 +2394,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> { /// errors as if there is no applicable impl, but rather report /// errors are about mismatched argument types. /// - /// Here is an example. Imagine we have an closure expression + /// Here is an example. Imagine we have a closure expression /// and we desugared it so that the type of the expression is /// `Closure`, and `Closure` expects an int as argument. Then it /// is "as if" the compiler generated this impl: diff --git a/src/librustc/middle/traits/util.rs b/src/librustc/middle/traits/util.rs index 1c5156aab02..c50c9e9765d 100644 --- a/src/librustc/middle/traits/util.rs +++ b/src/librustc/middle/traits/util.rs @@ -408,7 +408,7 @@ pub fn upcast<'tcx>(tcx: &ty::ctxt<'tcx>, .collect() } -/// Given an trait `trait_ref`, returns the number of vtable entries +/// Given a trait `trait_ref`, returns the number of vtable entries /// that come from `trait_ref`, excluding its supertraits. Used in /// computing the vtable base for an upcast trait of a trait object. pub fn count_own_vtable_entries<'tcx>(tcx: &ty::ctxt<'tcx>, diff --git a/src/librustc/middle/ty/adjustment.rs b/src/librustc/middle/ty/adjustment.rs index cadab499c07..c44ebcfdb69 100644 --- a/src/librustc/middle/ty/adjustment.rs +++ b/src/librustc/middle/ty/adjustment.rs @@ -48,7 +48,7 @@ pub enum AutoAdjustment<'tcx> { /// /// 1. The simplest cases are where the pointer is not adjusted fat vs thin. /// Here the pointer will be dereferenced N times (where a dereference can -/// happen to to raw or borrowed pointers or any smart pointer which implements +/// happen to raw or borrowed pointers or any smart pointer which implements /// Deref, including Box<_>). The number of dereferences is given by /// `autoderefs`. It can then be auto-referenced zero or one times, indicated /// by `autoref`, to either a raw or borrowed pointer. In these cases unsize is diff --git a/src/librustc/middle/ty/sty.rs b/src/librustc/middle/ty/sty.rs index c6debc38227..37ed716eaa0 100644 --- a/src/librustc/middle/ty/sty.rs +++ b/src/librustc/middle/ty/sty.rs @@ -126,7 +126,7 @@ pub enum TypeVariants<'tcx> { TyRef(&'tcx Region, TypeAndMut<'tcx>), /// If the def-id is Some(_), then this is the type of a specific - /// fn item. Otherwise, if None(_), it a fn pointer type. + /// fn item. Otherwise, if None(_), it is a fn pointer type. /// /// FIXME: Conflating function pointers and the type of a /// function is probably a terrible idea; a function pointer is a diff --git a/src/librustc_borrowck/borrowck/fragments.rs b/src/librustc_borrowck/borrowck/fragments.rs index 175bac01daa..1639fcf77a6 100644 --- a/src/librustc_borrowck/borrowck/fragments.rs +++ b/src/librustc_borrowck/borrowck/fragments.rs @@ -159,7 +159,7 @@ pub struct FragmentSets { /// FIXME(pnkfelix) probably do not want/need /// `parents_of_fragments` at all, if we can avoid it. /// - /// Update: I do not see a way to to avoid it. Maybe just remove + /// Update: I do not see a way to avoid it. Maybe just remove /// above fixme, or at least document why doing this may be hard. parents_of_fragments: Vec, diff --git a/src/librustc_borrowck/borrowck/mod.rs b/src/librustc_borrowck/borrowck/mod.rs index 4db7974f094..10e29ef843c 100644 --- a/src/librustc_borrowck/borrowck/mod.rs +++ b/src/librustc_borrowck/borrowck/mod.rs @@ -373,7 +373,7 @@ const DOWNCAST_PRINTED_OPERATOR: &'static str = " as "; // A local, "cleaned" version of `mc::InteriorKind` that drops // information that is not relevant to loan-path analysis. (In -// particular, the distinction between how precisely a array-element +// particular, the distinction between how precisely an array-element // is tracked is irrelevant here.) #[derive(Clone, Copy, PartialEq, Eq, Hash)] pub enum InteriorKind { diff --git a/src/librustc_trans/trans/_match.rs b/src/librustc_trans/trans/_match.rs index 1eb4a7a5e0c..dbb0e120805 100644 --- a/src/librustc_trans/trans/_match.rs +++ b/src/librustc_trans/trans/_match.rs @@ -963,8 +963,8 @@ fn insert_lllocals<'blk, 'tcx>(mut bcx: Block<'blk, 'tcx>, // leaving the remainder of the tuple `(_, // D(B))` still to be dropped in the future. // - // Thus, here we must must zero the place that - // we are moving *from*, because we do not yet + // Thus, here we must zero the place that we + // are moving *from*, because we do not yet // track drop flags for a fragmented parent // match input expression. // diff --git a/src/librustc_trans/trans/callee.rs b/src/librustc_trans/trans/callee.rs index b806f36b910..86a65f57bda 100644 --- a/src/librustc_trans/trans/callee.rs +++ b/src/librustc_trans/trans/callee.rs @@ -339,7 +339,7 @@ pub fn trans_fn_pointer_shim<'a, 'tcx>( let llargs = get_params(fcx.llfn); let self_idx = fcx.arg_offset(); - // the first argument (`self`) will be ptr to the the fn pointer + // the first argument (`self`) will be ptr to the fn pointer let llfnpointer = if is_by_ref { Load(bcx, llargs[self_idx]) } else { diff --git a/src/librustc_trans/trans/debuginfo/metadata.rs b/src/librustc_trans/trans/debuginfo/metadata.rs index a921bbbc43e..bc5152cba1f 100644 --- a/src/librustc_trans/trans/debuginfo/metadata.rs +++ b/src/librustc_trans/trans/debuginfo/metadata.rs @@ -809,7 +809,7 @@ pub fn type_metadata<'a, 'tcx>(cx: &CrateContext<'a, 'tcx>, let mut type_map = debug_context(cx).type_map.borrow_mut(); if already_stored_in_typemap { - // Also make sure that we already have a TypeMap entry entry for the unique type id. + // Also make sure that we already have a TypeMap entry for the unique type id. let metadata_for_uid = match type_map.find_metadata_for_unique_id(unique_type_id) { Some(metadata) => metadata, None => { diff --git a/src/librustc_trans/trans/expr.rs b/src/librustc_trans/trans/expr.rs index 67cbede5f82..6b9cec5ad24 100644 --- a/src/librustc_trans/trans/expr.rs +++ b/src/librustc_trans/trans/expr.rs @@ -2526,7 +2526,7 @@ impl OverflowOpViaInputCheck { // Note that the mask's value is derived from the LHS type // (since that is where the 32/64 distinction is relevant) but // the mask's type must match the RHS type (since they will - // both be fed into a and-binop) + // both be fed into an and-binop) let invert_mask = shift_mask_val(bcx, lhs_llty, rhs_llty, true); let outer_bits = And(bcx, rhs, invert_mask, binop_debug_loc); diff --git a/src/librustc_trans/trans/glue.rs b/src/librustc_trans/trans/glue.rs index 40a290a2715..d7b6cb41a0a 100644 --- a/src/librustc_trans/trans/glue.rs +++ b/src/librustc_trans/trans/glue.rs @@ -203,9 +203,9 @@ pub enum DropGlueKind<'tcx> { /// Skips the dtor, if any, for ty; drops the contents directly. /// Note that the dtor is only skipped at the most *shallow* /// level, namely, an `impl Drop for Ty` itself. So, for example, - /// if Ty is Newtype(S) then only the Drop impl for for Newtype - /// itself will be skipped, while the Drop impl for S, if any, - /// will be invoked. + /// if Ty is Newtype(S) then only the Drop impl for Newtype itself + /// will be skipped, while the Drop impl for S, if any, will be + /// invoked. TyContents(Ty<'tcx>), } diff --git a/src/librustc_trans/trans/intrinsic.rs b/src/librustc_trans/trans/intrinsic.rs index 605c27e0caa..0573d6301c5 100644 --- a/src/librustc_trans/trans/intrinsic.rs +++ b/src/librustc_trans/trans/intrinsic.rs @@ -1221,8 +1221,8 @@ fn try_intrinsic<'blk, 'tcx>(bcx: Block<'blk, 'tcx>, // MSVC's definition of the `rust_try` function. The exact implementation here // is a little different than the GNU (standard) version below, not only because // of the personality function but also because of the other fiddly bits about -// SEH. LLVM also currently requires us to structure this a very particular way -// as explained below. +// SEH. LLVM also currently requires us to structure this in a very particular +// way as explained below. // // Like with the GNU version we generate a shim wrapper fn trans_msvc_try<'blk, 'tcx>(bcx: Block<'blk, 'tcx>, diff --git a/src/librustc_trans/trans/meth.rs b/src/librustc_trans/trans/meth.rs index 614453830c6..c470e4276c4 100644 --- a/src/librustc_trans/trans/meth.rs +++ b/src/librustc_trans/trans/meth.rs @@ -476,8 +476,7 @@ fn trans_trait_callee_from_llval<'blk, 'tcx>(bcx: Block<'blk, 'tcx>, /// } /// /// What is the value of `x` when `foo` is invoked with `T=SomeTrait`? -/// The answer is that it it is a shim function generate by this -/// routine: +/// The answer is that it is a shim function generated by this routine: /// /// fn shim(t: &SomeTrait) -> int { /// // ... call t.get() virtually ... diff --git a/src/librustc_trans/trans/type_of.rs b/src/librustc_trans/trans/type_of.rs index b7a232822fe..437c0d9cbc3 100644 --- a/src/librustc_trans/trans/type_of.rs +++ b/src/librustc_trans/trans/type_of.rs @@ -361,7 +361,7 @@ pub fn in_memory_type_of<'a, 'tcx>(cx: &CrateContext<'a, 'tcx>, t: Ty<'tcx>) -> let repr = adt::represent_type(cx, t); // Unboxed closures can have substitutions in all spaces // inherited from their environment, so we use entire - // contents of the VecPerParamSpace to to construct the llvm + // contents of the VecPerParamSpace to construct the llvm // name adt::incomplete_type_of(cx, &*repr, "closure") } diff --git a/src/librustc_typeck/astconv.rs b/src/librustc_typeck/astconv.rs index a05d9b19d23..299b6be9951 100644 --- a/src/librustc_typeck/astconv.rs +++ b/src/librustc_typeck/astconv.rs @@ -347,7 +347,7 @@ fn create_region_substs<'tcx>( { let tcx = this.tcx(); - // If the type is parameterized by the this region, then replace this + // If the type is parameterized by this region, then replace this // region with the current anon region binding (in other words, // whatever & would get replaced with). let expected_num_region_params = decl_generics.regions.len(TypeSpace); @@ -1238,7 +1238,7 @@ fn one_bound_for_assoc_type<'tcx>(tcx: &ty::ctxt<'tcx>, Ok(bounds[0].clone()) } -// Create a type from a a path to an associated type. +// Create a type from a path to an associated type. // For a path A::B::C::D, ty and ty_path_def are the type and def for A::B::C // and item_segment is the path segment for D. We return a type and a def for // the whole path. diff --git a/src/librustc_typeck/check/dropck.rs b/src/librustc_typeck/check/dropck.rs index 870a81e510e..dfe8bd78c1b 100644 --- a/src/librustc_typeck/check/dropck.rs +++ b/src/librustc_typeck/check/dropck.rs @@ -185,7 +185,7 @@ fn ensure_drop_predicates_are_implied_by_item_defn<'tcx>( for predicate in predicates { // (We do not need to worry about deep analysis of type // expressions etc because the Drop impls are already forced - // to take on a structure that is roughly a alpha-renaming of + // to take on a structure that is roughly an alpha-renaming of // the generic parameters of the item definition.) // This path now just checks *all* predicates via the direct diff --git a/src/librustc_typeck/check/mod.rs b/src/librustc_typeck/check/mod.rs index 278aa9450ee..00482f2d53c 100644 --- a/src/librustc_typeck/check/mod.rs +++ b/src/librustc_typeck/check/mod.rs @@ -1878,7 +1878,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { } // If there are no more fallbacks to apply at this point we have applied all possible - // defaults and type inference will procede as normal. + // defaults and type inference will proceed as normal. if unbound_tyvars.is_empty() { break; } @@ -2222,7 +2222,7 @@ fn make_overloaded_lvalue_return_type<'a, 'tcx>(fcx: &FnCtxt<'a, 'tcx>, { match method { Some(method) => { - // extract method method return type, which will be &T; + // extract method return type, which will be &T; // all LB regions should have been instantiated during method lookup let ret_ty = method.ty.fn_ret(); let ret_ty = fcx.tcx().no_late_bound_regions(&ret_ty).unwrap().unwrap(); @@ -4106,7 +4106,7 @@ fn check_const_with_ty<'a, 'tcx>(fcx: &FnCtxt<'a, 'tcx>, // Gather locals in statics (because of block expressions). // This is technically unnecessary because locals in static items are forbidden, // but prevents type checking from blowing up before const checking can properly - // emit a error. + // emit an error. GatherLocalsVisitor { fcx: fcx }.visit_expr(e); check_expr_with_hint(fcx, e, declty); @@ -4360,7 +4360,7 @@ pub fn instantiate_path<'a, 'tcx>(fcx: &FnCtxt<'a, 'tcx>, // parameters permitted at present, but perhaps we will allow // them in the future.) // - // 1b. Reference to a enum variant or tuple-like struct: + // 1b. Reference to an enum variant or tuple-like struct: // // struct foo(...) // enum E { foo(...) } diff --git a/src/librustc_typeck/check/regionck.rs b/src/librustc_typeck/check/regionck.rs index b4a99dcb576..c2610da3944 100644 --- a/src/librustc_typeck/check/regionck.rs +++ b/src/librustc_typeck/check/regionck.rs @@ -77,7 +77,7 @@ //! borrowed pointer? I mean any data that is reached by first //! dereferencing a borrowed pointer and then either traversing //! interior offsets or boxes. We say that the guarantor -//! of such data it the region of the borrowed pointer that was +//! of such data is the region of the borrowed pointer that was //! traversed. This is essentially the same as the ownership //! relation, except that a borrowed pointer never owns its //! contents. diff --git a/src/librustc_typeck/collect.rs b/src/librustc_typeck/collect.rs index 25a61414ab5..272d776a891 100644 --- a/src/librustc_typeck/collect.rs +++ b/src/librustc_typeck/collect.rs @@ -507,7 +507,7 @@ impl<'tcx> GetTypeParameterBounds<'tcx> for ty::GenericPredicates<'tcx> { /// Find bounds from hir::Generics. This requires scanning through the /// AST. We do this to avoid having to convert *all* the bounds, which /// would create artificial cycles. Instead we can only convert the -/// bounds for those a type parameter `X` if `X::Foo` is used. +/// bounds for a type parameter `X` if `X::Foo` is used. impl<'tcx> GetTypeParameterBounds<'tcx> for hir::Generics { fn get_type_parameter_bounds(&self, astconv: &AstConv<'tcx>, diff --git a/src/librustc_typeck/diagnostics.rs b/src/librustc_typeck/diagnostics.rs index 4746819f6a9..3b6cc37181e 100644 --- a/src/librustc_typeck/diagnostics.rs +++ b/src/librustc_typeck/diagnostics.rs @@ -109,7 +109,7 @@ fn main(){ "##, E0026: r##" -This error indicates that a struct pattern attempted to extract a non-existant +This error indicates that a struct pattern attempted to extract a non-existent field from a struct. Struct fields are identified by the name used before the colon `:` so struct patterns should resemble the declaration of the struct type being matched. @@ -3352,7 +3352,7 @@ register_diagnostics! { E0182, E0183, // E0187, // can't infer the kind of the closure -// E0188, // can not cast a immutable reference to a mutable pointer +// E0188, // can not cast an immutable reference to a mutable pointer // E0189, // deprecated: can only cast a boxed pointer to a boxed object // E0190, // deprecated: can only cast a &-pointer to an &-object E0196, // cannot determine a type for this closure diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs index 3492635a20b..160c7e7d754 100644 --- a/src/librustdoc/clean/mod.rs +++ b/src/librustdoc/clean/mod.rs @@ -153,7 +153,7 @@ impl<'a, 'tcx> Clean for visit_ast::RustdocVisitor<'a, 'tcx> { // // Note that this loop only searches the top-level items of the crate, // and this is intentional. If we were to search the entire crate for an - // item tagged with `#[doc(primitive)]` then we we would also have to + // item tagged with `#[doc(primitive)]` then we would also have to // search the entirety of external modules for items tagged // `#[doc(primitive)]`, which is a pretty inefficient process (decoding // all that metadata unconditionally). diff --git a/src/librustdoc/html/toc.rs b/src/librustdoc/html/toc.rs index 8f3e63820da..53be8b5bc06 100644 --- a/src/librustdoc/html/toc.rs +++ b/src/librustdoc/html/toc.rs @@ -55,8 +55,8 @@ pub struct TocBuilder { /// strictly increasing (i.e. chain[0].level < chain[1].level < /// ...) with each entry being the most recent occurrence of a /// heading with that level (it doesn't include the most recent - /// occurrences of every level, just, if *is* in `chain` then is is - /// the most recent one). + /// occurrences of every level, just, if it *is* in `chain` then + /// it is the most recent one). /// /// We also have `chain[0].level <= top_level.entries[last]`. chain: Vec diff --git a/src/libstd/io/buffered.rs b/src/libstd/io/buffered.rs index 90bcbe7fe86..acab63315e4 100644 --- a/src/libstd/io/buffered.rs +++ b/src/libstd/io/buffered.rs @@ -546,7 +546,7 @@ impl IntoInnerError { /// let stream = match stream.into_inner() { /// Ok(s) => s, /// Err(e) => { - /// // Here, e is a IntoInnerError, let's re-examine the buffer: + /// // Here, e is an IntoInnerError, let's re-examine the buffer: /// let buffer = e.into_inner(); /// /// // do stuff to try to recover diff --git a/src/libstd/io/mod.rs b/src/libstd/io/mod.rs index a76755dadd3..166909f20b7 100644 --- a/src/libstd/io/mod.rs +++ b/src/libstd/io/mod.rs @@ -23,7 +23,7 @@ //! Because they are traits, they're implemented by a number of other types, //! and you can implement them for your types too. As such, you'll see a //! few different types of I/O throughout the documentation in this module: -//! `File`s, `TcpStream`s, and somtimes even `Vec`s. For example, `Read` +//! `File`s, `TcpStream`s, and sometimes even `Vec`s. For example, `Read` //! adds a `read()` method, which we can use on `File`s: //! //! ``` @@ -234,7 +234,7 @@ //! The return type of `read_input()`, `io::Result<()>`, is a very common type //! for functions which don't have a 'real' return value, but do want to return //! errors if they happen. In this case, the only purpose of this function is -//! to read the line and print it, so we use use `()`. +//! to read the line and print it, so we use `()`. //! //! [result]: type.Result.html //! [try]: macro.try!.html diff --git a/src/libstd/io/stdio.rs b/src/libstd/io/stdio.rs index c2110ef1d83..31b881bebf0 100644 --- a/src/libstd/io/stdio.rs +++ b/src/libstd/io/stdio.rs @@ -146,7 +146,7 @@ pub struct Stdin { inner: Arc>>>, } -/// A locked reference to the a `Stdin` handle. +/// A locked reference to the `Stdin` handle. /// /// This handle implements both the `Read` and `BufRead` traits and is /// constructed via the `lock` method on `Stdin`. @@ -323,7 +323,7 @@ pub struct Stdout { inner: Arc>>>>, } -/// A locked reference to the a `Stdout` handle. +/// A locked reference to the `Stdout` handle. /// /// This handle implements the `Write` trait and is constructed via the `lock` /// method on `Stdout`. @@ -430,7 +430,7 @@ pub struct Stderr { inner: Arc>>>, } -/// A locked reference to the a `Stderr` handle. +/// A locked reference to the `Stderr` handle. /// /// This handle implements the `Write` trait and is constructed via the `lock` /// method on `Stderr`. diff --git a/src/libstd/net/ip.rs b/src/libstd/net/ip.rs index 09aea50cfbe..633e7326bb1 100644 --- a/src/libstd/net/ip.rs +++ b/src/libstd/net/ip.rs @@ -22,7 +22,7 @@ use libc; use sys_common::{AsInner, FromInner}; use net::{hton, ntoh}; -/// An IP address, either a IPv4 or IPv6 address. +/// An IP address, either an IPv4 or IPv6 address. #[unstable(feature = "ip_addr", reason = "recent addition", issue = "27801")] #[derive(Copy, Clone, Eq, PartialEq, Debug, Hash, PartialOrd, Ord)] pub enum IpAddr { diff --git a/src/libstd/prelude/mod.rs b/src/libstd/prelude/mod.rs index 82578172802..f1c626cc165 100644 --- a/src/libstd/prelude/mod.rs +++ b/src/libstd/prelude/mod.rs @@ -74,7 +74,7 @@ //! [`Eq`](../cmp/trait.Eq.html), //! [`Ord`](../cmp/trait.Ord.html) //! }. -//! The comparision traits, which implement the comparison operators +//! The comparison traits, which implement the comparison operators //! and are often seen in trait bounds. //! * `std::convert::`{ //! [`AsRef`](../convert/trait.AsRef.html), diff --git a/src/libstd/sync/mpsc/mod.rs b/src/libstd/sync/mpsc/mod.rs index 8c5cec969a6..a0d0147296a 100644 --- a/src/libstd/sync/mpsc/mod.rs +++ b/src/libstd/sync/mpsc/mod.rs @@ -427,7 +427,7 @@ impl UnsafeFlavor for Receiver { /// use std::sync::mpsc::channel; /// use std::thread; /// -/// // tx is is the sending half (tx for transmission), and rx is the receiving +/// // tx is the sending half (tx for transmission), and rx is the receiving /// // half (rx for receiving). /// let (tx, rx) = channel(); /// diff --git a/src/libstd/sys/common/wtf8.rs b/src/libstd/sys/common/wtf8.rs index 10f77d0207c..a6eada832cd 100644 --- a/src/libstd/sys/common/wtf8.rs +++ b/src/libstd/sys/common/wtf8.rs @@ -146,13 +146,13 @@ impl fmt::Debug for Wtf8Buf { } impl Wtf8Buf { - /// Creates an new, empty WTF-8 string. + /// Creates a new, empty WTF-8 string. #[inline] pub fn new() -> Wtf8Buf { Wtf8Buf { bytes: Vec::new() } } - /// Creates an new, empty WTF-8 string with pre-allocated capacity for `n` bytes. + /// Creates a new, empty WTF-8 string with pre-allocated capacity for `n` bytes. #[inline] pub fn with_capacity(n: usize) -> Wtf8Buf { Wtf8Buf { bytes: Vec::with_capacity(n) } diff --git a/src/libstd/sys/unix/ext/process.rs b/src/libstd/sys/unix/ext/process.rs index 81980ea25fb..dcfa376c81e 100644 --- a/src/libstd/sys/unix/ext/process.rs +++ b/src/libstd/sys/unix/ext/process.rs @@ -39,7 +39,7 @@ pub trait CommandExt { /// This is not enough to create a daemon process. The *init* process should /// be the child reaper of a daemon. This can be achieved if the parent /// process exit. Moreover, a daemon should not have a controlling terminal. - /// To acheive this, a session leader (the child) must spawn another process + /// To achieve this, a session leader (the child) must spawn another process /// (the daemon) in the same session. #[unstable(feature = "process_session_leader", reason = "recently added", issue = "27811")] diff --git a/src/libstd/sys/unix/mod.rs b/src/libstd/sys/unix/mod.rs index 964bc08ff4e..3a88f36399e 100644 --- a/src/libstd/sys/unix/mod.rs +++ b/src/libstd/sys/unix/mod.rs @@ -49,7 +49,7 @@ pub mod time; pub mod stdio; pub fn init() { - // By default, some platforms will send a *signal* when a EPIPE error + // By default, some platforms will send a *signal* when an EPIPE error // would otherwise be delivered. This runtime doesn't install a SIGPIPE // handler, causing it to kill the program, which isn't exactly what we // want! diff --git a/src/libstd/sys/windows/mod.rs b/src/libstd/sys/windows/mod.rs index 04bb5e5ea38..85f5d4e5884 100644 --- a/src/libstd/sys/windows/mod.rs +++ b/src/libstd/sys/windows/mod.rs @@ -75,8 +75,8 @@ fn to_utf16_os(s: &OsStr) -> Vec { v } -// Many Windows APIs follow a pattern of where we hand the a buffer and then -// they will report back to us how large the buffer should be or how many bytes +// Many Windows APIs follow a pattern of where we hand a buffer and then they +// will report back to us how large the buffer should be or how many bytes // currently reside in the buffer. This function is an abstraction over these // functions by making them easier to call. // diff --git a/src/libstd/sys/windows/mutex.rs b/src/libstd/sys/windows/mutex.rs index 277c3d14c0e..b770156582d 100644 --- a/src/libstd/sys/windows/mutex.rs +++ b/src/libstd/sys/windows/mutex.rs @@ -22,7 +22,7 @@ //! more details. //! //! 3. While CriticalSection is fair and SRWLock is not, the current Rust policy -//! is there there are no guarantees of fairness. +//! is that there are no guarantees of fairness. //! //! The downside of this approach, however, is that SRWLock is not available on //! Windows XP, so we continue to have a fallback implementation where diff --git a/src/libsyntax/ext/base.rs b/src/libsyntax/ext/base.rs index aaaca8bd4d8..7459f8b8f24 100644 --- a/src/libsyntax/ext/base.rs +++ b/src/libsyntax/ext/base.rs @@ -600,7 +600,7 @@ impl<'a> ExtCtxt<'a> { self.expander().fold_expr(e) } - /// Returns a `Folder` for deeply expanding all macros in a AST node. + /// Returns a `Folder` for deeply expanding all macros in an AST node. pub fn expander<'b>(&'b mut self) -> expand::MacroExpander<'b, 'a> { expand::MacroExpander::new(self) } diff --git a/src/libsyntax/ext/tt/macro_parser.rs b/src/libsyntax/ext/tt/macro_parser.rs index 01fd4608ecb..8dec9ae1e98 100644 --- a/src/libsyntax/ext/tt/macro_parser.rs +++ b/src/libsyntax/ext/tt/macro_parser.rs @@ -32,7 +32,7 @@ //! As it processes them, it fills up `eof_eis` with items that would be valid if //! the macro invocation is now over, `bb_eis` with items that are waiting on //! a Rust nonterminal like `$e:expr`, and `next_eis` with items that are waiting -//! on the a particular token. Most of the logic concerns moving the · through the +//! on a particular token. Most of the logic concerns moving the · through the //! repetitions indicated by Kleene stars. It only advances or calls out to the //! real Rust parser when no `cur_eis` items remain //! diff --git a/src/libsyntax/ext/tt/macro_rules.rs b/src/libsyntax/ext/tt/macro_rules.rs index 0a95f24a721..cce4450b299 100644 --- a/src/libsyntax/ext/tt/macro_rules.rs +++ b/src/libsyntax/ext/tt/macro_rules.rs @@ -497,7 +497,7 @@ fn is_in_follow(_: &ExtCtxt, tok: &Token, frag: &str) -> Result { Ok(true) }, "block" => { - // anything can follow block, the braces provide a easy boundary to + // anything can follow block, the braces provide an easy boundary to // maintain Ok(true) }, diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs index 18c6d74d62e..39b1b746de8 100644 --- a/src/libsyntax/feature_gate.rs +++ b/src/libsyntax/feature_gate.rs @@ -1107,8 +1107,7 @@ pub enum UnstableFeatures { /// Errors are bypassed for bootstrapping. This is required any time /// during the build that feature-related lints are set to warn or above /// because the build turns on warnings-as-errors and uses lots of unstable - /// features. As a result, this this is always required for building Rust - /// itself. + /// features. As a result, this is always required for building Rust itself. Cheat } diff --git a/src/rustllvm/PassWrapper.cpp b/src/rustllvm/PassWrapper.cpp index 6513fdfd2f2..4308023a9a5 100644 --- a/src/rustllvm/PassWrapper.cpp +++ b/src/rustllvm/PassWrapper.cpp @@ -250,7 +250,7 @@ LLVMRustWriteOutputFile(LLVMTargetMachineRef Target, #endif PM->run(*unwrap(M)); - // Apparently `addPassesToEmitFile` adds an pointer to our on-the-stack output + // Apparently `addPassesToEmitFile` adds a pointer to our on-the-stack output // stream (OS), so the only real safe place to delete this is here? Don't we // wish this was written in Rust? delete PM; diff --git a/src/test/compile-fail/associated-types-invalid-trait-ref-issue-18865.rs b/src/test/compile-fail/associated-types-invalid-trait-ref-issue-18865.rs index b6c4d59c848..d48cff405a6 100644 --- a/src/test/compile-fail/associated-types-invalid-trait-ref-issue-18865.rs +++ b/src/test/compile-fail/associated-types-invalid-trait-ref-issue-18865.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// Test that we report an error if the trait ref in an qualified type +// Test that we report an error if the trait ref in a qualified type // uses invalid type arguments. trait Foo { diff --git a/src/test/compile-fail/const-len-underflow-separate-spans.rs b/src/test/compile-fail/const-len-underflow-separate-spans.rs index cd021a0d3b1..786c72b66f3 100644 --- a/src/test/compile-fail/const-len-underflow-separate-spans.rs +++ b/src/test/compile-fail/const-len-underflow-separate-spans.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// Check that an constant-evaluation underflow highlights the correct +// Check that a constant-evaluation underflow highlights the correct // spot (where the underflow occurred), while also providing the // overall context for what caused the evaluation. diff --git a/src/test/compile-fail/const-len-underflow-subspans.rs b/src/test/compile-fail/const-len-underflow-subspans.rs index a31da114679..020717dc1e1 100644 --- a/src/test/compile-fail/const-len-underflow-subspans.rs +++ b/src/test/compile-fail/const-len-underflow-subspans.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// Check that an constant-evaluation underflow highlights the correct +// Check that a constant-evaluation underflow highlights the correct // spot (where the underflow occurred). const ONE: usize = 1; diff --git a/src/test/compile-fail/dropck_tarena_unsound_drop.rs b/src/test/compile-fail/dropck_tarena_unsound_drop.rs index 600c794109c..6cbed34c7ad 100644 --- a/src/test/compile-fail/dropck_tarena_unsound_drop.rs +++ b/src/test/compile-fail/dropck_tarena_unsound_drop.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// Check that a arena (TypedArena) cannot carry elements whose drop +// Check that an arena (TypedArena) cannot carry elements whose drop // methods might access borrowed data of lifetime that does not // strictly outlive the arena itself. // @@ -30,7 +30,7 @@ struct CheckId { v: T } // In the code below, the impl of HasId for `&'a usize` does not // actually access the borrowed data, but the point is that the // interface to CheckId does not (and cannot) know that, and therefore -// when encountering the a value V of type CheckId, we must +// when encountering a value V of type CheckId, we must // conservatively force the type S to strictly outlive V. impl Drop for CheckId { fn drop(&mut self) { diff --git a/src/test/compile-fail/dropck_trait_cycle_checked.rs b/src/test/compile-fail/dropck_trait_cycle_checked.rs index 6e0679da949..e701718028a 100644 --- a/src/test/compile-fail/dropck_trait_cycle_checked.rs +++ b/src/test/compile-fail/dropck_trait_cycle_checked.rs @@ -9,7 +9,7 @@ // except according to those terms. // Reject mixing cyclic structure and Drop when using trait -// objects to hide the the cross-references. +// objects to hide the cross-references. // // (Compare against compile-fail/dropck_vec_cycle_checked.rs) diff --git a/src/test/compile-fail/issue-17904-2.rs b/src/test/compile-fail/issue-17904-2.rs index a33ec23a16a..a15ccb71aa7 100644 --- a/src/test/compile-fail/issue-17904-2.rs +++ b/src/test/compile-fail/issue-17904-2.rs @@ -9,7 +9,7 @@ // except according to those terms. // Test that we can parse a unit struct with a where clause, even if -// it leads to a error later on since `T` is unused. +// it leads to an error later on since `T` is unused. struct Foo where T: Copy; //~ ERROR parameter `T` is never used diff --git a/src/test/compile-fail/issue-1920-2.rs b/src/test/compile-fail/issue-1920-2.rs index 57eb82a156b..c73a1735064 100644 --- a/src/test/compile-fail/issue-1920-2.rs +++ b/src/test/compile-fail/issue-1920-2.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -//! Test that when a crate is linked under another name that that name is used in global paths +//! Test that when a crate is linked under another name that name is used in global paths extern crate core as bar; diff --git a/src/test/compile-fail/issue-6801.rs b/src/test/compile-fail/issue-6801.rs index 8261862c5fc..792d27c179b 100644 --- a/src/test/compile-fail/issue-6801.rs +++ b/src/test/compile-fail/issue-6801.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// Creating a stack closure which references an box and then +// Creating a stack closure which references a box and then // transferring ownership of the box before invoking the stack // closure results in a crash. diff --git a/src/test/compile-fail/regions-outlives-projection-container-hrtb.rs b/src/test/compile-fail/regions-outlives-projection-container-hrtb.rs index b8c4a7f8a8c..ec0631a881a 100644 --- a/src/test/compile-fail/regions-outlives-projection-container-hrtb.rs +++ b/src/test/compile-fail/regions-outlives-projection-container-hrtb.rs @@ -37,7 +37,7 @@ pub struct WithHrAssoc } fn with_assoc<'a,'b>() { - // We get an error because beacuse 'b:'a does not hold: + // We get an error because 'b:'a does not hold: let _: &'a WithHrAssoc> = loop { }; //~^ ERROR reference has a longer lifetime diff --git a/src/test/compile-fail/unboxed-closures-recursive-fn-using-fn-mut.rs b/src/test/compile-fail/unboxed-closures-recursive-fn-using-fn-mut.rs index 2dcd7a97d89..23306823c72 100644 --- a/src/test/compile-fail/unboxed-closures-recursive-fn-using-fn-mut.rs +++ b/src/test/compile-fail/unboxed-closures-recursive-fn-using-fn-mut.rs @@ -12,7 +12,7 @@ use std::marker::PhantomData; -// A erroneous variant of `run-pass/unboxed_closures-infer-recursive-fn.rs` +// An erroneous variant of `run-pass/unboxed_closures-infer-recursive-fn.rs` // where we attempt to perform mutation in the recursive function. This fails to compile // because it winds up requiring `FnMut` which enforces linearity. diff --git a/src/test/compile-fail/variance-regions-direct.rs b/src/test/compile-fail/variance-regions-direct.rs index 319b81bde36..bb452eecbfc 100644 --- a/src/test/compile-fail/variance-regions-direct.rs +++ b/src/test/compile-fail/variance-regions-direct.rs @@ -48,7 +48,7 @@ struct Test5<'a, 'b:'a> { //~ ERROR regions=[[+, o];[];[]] // Invariance is a trap from which NO ONE CAN ESCAPE. // In other words, even though the `&'b isize` occurs in -// a argument list (which is contravariant), that +// an argument list (which is contravariant), that // argument list occurs in an invariant context. #[rustc_variance] diff --git a/src/test/run-fail/issue-18576.rs b/src/test/run-fail/issue-18576.rs index 0b82a0d8d83..e326949458e 100644 --- a/src/test/run-fail/issue-18576.rs +++ b/src/test/run-fail/issue-18576.rs @@ -11,7 +11,7 @@ // error-pattern:stop // #18576 -// Make sure that an calling extern function pointer in an unreachable +// Make sure that calling an extern function pointer in an unreachable // context doesn't cause an LLVM assertion #[allow(unreachable_code)] diff --git a/src/test/run-pass/dropck_tarena_sound_drop.rs b/src/test/run-pass/dropck_tarena_sound_drop.rs index b0c4f4ca272..db30bfbf747 100644 --- a/src/test/run-pass/dropck_tarena_sound_drop.rs +++ b/src/test/run-pass/dropck_tarena_sound_drop.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// Check that a arena (TypedArena) can carry elements whose drop +// Check that an arena (TypedArena) can carry elements whose drop // methods might access borrowed data, as long as the borrowed data // has lifetime that strictly outlives the arena itself. // diff --git a/src/test/run-pass/impl-inherent-non-conflict.rs b/src/test/run-pass/impl-inherent-non-conflict.rs index 0d43f1ca706..209b4acb095 100644 --- a/src/test/run-pass/impl-inherent-non-conflict.rs +++ b/src/test/run-pass/impl-inherent-non-conflict.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// Ensure that an user-defined type admits multiple inherent methods +// Ensure that a user-defined type admits multiple inherent methods // with the same name, which can be called on values that have a // precise enough type to allow distinguishing between the methods. diff --git a/src/test/run-pass/issue-24085.rs b/src/test/run-pass/issue-24085.rs index 3617b0d3a57..fde32cb9023 100644 --- a/src/test/run-pass/issue-24085.rs +++ b/src/test/run-pass/issue-24085.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// Regression test for #24085. Errors were occuring in region +// Regression test for #24085. Errors were occurring in region // inference due to the requirement that `'a:b'`, which was getting // incorrectly translated in connection with the closure below.