diff --git a/src/libextra/hex.rs b/src/libextra/hex.rs index 343d6aac437a0..4fd59bb3aa503 100644 --- a/src/libextra/hex.rs +++ b/src/libextra/hex.rs @@ -1,4 +1,4 @@ -// Copyright 2013 The Rust Project Developers. See the COPYRIGHT +// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // @@ -60,7 +60,7 @@ pub trait FromHex { pub enum FromHexError { /// The input contained a character not part of the hex format InvalidHexCharacter(char, uint), - /// The input had a invalid length + /// The input had an invalid length InvalidHexLength, } diff --git a/src/libextra/num/bigint.rs b/src/libextra/num/bigint.rs index 6dfe036d207b9..c1959843d598b 100644 --- a/src/libextra/num/bigint.rs +++ b/src/libextra/num/bigint.rs @@ -1292,7 +1292,7 @@ impl ToStrRadix for BigInt { } impl FromStrRadix for BigInt { - /// Creates and initializes an BigInt. + /// Creates and initializes a BigInt. #[inline] fn from_str_radix(s: &str, radix: uint) -> Option { BigInt::parse_bytes(s.as_bytes(), radix) @@ -1385,7 +1385,7 @@ impl RandBigInt for R { } impl BigInt { - /// Creates and initializes an BigInt. + /// Creates and initializes a BigInt. #[inline] pub fn new(sign: Sign, v: ~[BigDigit]) -> BigInt { BigInt::from_biguint(sign, BigUint::new(v)) diff --git a/src/librustc/middle/kind.rs b/src/librustc/middle/kind.rs index 880074256c02b..c05ca3e876950 100644 --- a/src/librustc/middle/kind.rs +++ b/src/librustc/middle/kind.rs @@ -485,7 +485,7 @@ pub fn check_durable(tcx: ty::ctxt, ty: ty::t, sp: Span) -> bool { } } -/// This is rather subtle. When we are casting a value to a instantiated +/// This is rather subtle. When we are casting a value to an instantiated /// trait like `a as trait<'r>`, regionck already ensures that any references /// that appear in the type of `a` are bounded by `'r` (ed.: rem /// FIXME(#5723)). However, it is possible that there are *type parameters* @@ -516,7 +516,7 @@ pub fn check_cast_for_escaping_regions( target_ty: ty::t, source_span: Span) { - // Determine what type we are casting to; if it is not an trait, then no + // Determine what type we are casting to; if it is not a trait, then no // worries. match ty::get(target_ty).sty { ty::ty_trait(..) => {} diff --git a/src/librustc/middle/lint.rs b/src/librustc/middle/lint.rs index 9ccd9a463a37b..0e25fb15bd452 100644 --- a/src/librustc/middle/lint.rs +++ b/src/librustc/middle/lint.rs @@ -369,7 +369,7 @@ static lint_table: &'static [(&'static str, LintSpec)] = &[ ("unused_must_use", LintSpec { lint: UnusedMustUse, - desc: "unused result of an type flagged as #[must_use]", + desc: "unused result of a type flagged as #[must_use]", default: warn, }), diff --git a/src/librustc/middle/trans/_match.rs b/src/librustc/middle/trans/_match.rs index 2fabc44d0e4b2..7bc37d4e69512 100644 --- a/src/librustc/middle/trans/_match.rs +++ b/src/librustc/middle/trans/_match.rs @@ -1,4 +1,4 @@ -// Copyright 2012 The Rust Project Developers. See the COPYRIGHT +// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // @@ -244,7 +244,7 @@ pub enum VecLenOpt { vec_len_ge(/* length of prefix */uint) } -// An option identifying a branch (either a literal, a enum variant or a +// An option identifying a branch (either a literal, an enum variant or a // range) enum Opt { lit(Lit), diff --git a/src/librustc/middle/ty.rs b/src/librustc/middle/ty.rs index 3182c4a7ec285..804fbb5e2f718 100644 --- a/src/librustc/middle/ty.rs +++ b/src/librustc/middle/ty.rs @@ -1,4 +1,4 @@ -// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT +// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // @@ -2580,7 +2580,7 @@ pub fn type_is_sized(cx: ctxt, ty: ty::t) -> bool { } } -// Whether a type is enum like, that is a enum type with only nullary +// Whether a type is enum like, that is an enum type with only nullary // constructors pub fn type_is_c_like_enum(cx: ctxt, ty: t) -> bool { match get(ty).sty { diff --git a/src/librustc/middle/typeck/astconv.rs b/src/librustc/middle/typeck/astconv.rs index f1e1f379b0c5e..25a5fd50ff1bf 100644 --- a/src/librustc/middle/typeck/astconv.rs +++ b/src/librustc/middle/typeck/astconv.rs @@ -1,4 +1,4 @@ -// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT +// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // @@ -294,7 +294,7 @@ pub fn ast_ty_to_ty( } // Handle @, ~, and & being able to mean strs and vecs. - // If a_seq_ty is a str or a vec, make it an str/vec. + // If a_seq_ty is a str or a vec, make it a str/vec. // Also handle first-class trait types. fn mk_pointer( diff --git a/src/librustc/middle/typeck/check/mod.rs b/src/librustc/middle/typeck/check/mod.rs index cefda4372749c..f83b9989d4ad0 100644 --- a/src/librustc/middle/typeck/check/mod.rs +++ b/src/librustc/middle/typeck/check/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT +// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // @@ -1984,7 +1984,7 @@ pub fn check_expr_with_unifier(fcx: @FnCtxt, } } - // could be either a expr_binop or an expr_assign_binop + // could be either an expr_binop or an expr_assign_binop fn check_binop(fcx: @FnCtxt, callee_id: ast::NodeId, expr: &ast::Expr, diff --git a/src/librustc/middle/typeck/collect.rs b/src/librustc/middle/typeck/collect.rs index 04d708f0638e9..98e95c676ee33 100644 --- a/src/librustc/middle/typeck/collect.rs +++ b/src/librustc/middle/typeck/collect.rs @@ -1,4 +1,4 @@ -// Copyright 2012 The Rust Project Developers. See the COPYRIGHT +// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // @@ -736,7 +736,7 @@ pub fn instantiate_trait_ref(ccx: &CrateCtxt, /*! * Instantiates the path for the given trait reference, assuming that * it's bound to a valid trait type. Returns the def_id for the defining - * trait. Fails if the type is a type other than an trait type. + * trait. Fails if the type is a type other than a trait type. */ // FIXME(#5121) -- distinguish early vs late lifetime params diff --git a/src/librustc/util/sha2.rs b/src/librustc/util/sha2.rs index b0695bc0128eb..74fefe4168369 100644 --- a/src/librustc/util/sha2.rs +++ b/src/librustc/util/sha2.rs @@ -1,4 +1,4 @@ -// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT +// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // @@ -476,7 +476,7 @@ pub struct Sha256 { } impl Sha256 { - /// Construct an new instance of a SHA-256 digest. + /// Construct a new instance of a SHA-256 digest. pub fn new() -> Sha256 { Sha256 { engine: Engine256::new(&H256) diff --git a/src/librustdoc/html/render.rs b/src/librustdoc/html/render.rs index 90ed4a4c744c5..2885d05a5bd5c 100644 --- a/src/librustdoc/html/render.rs +++ b/src/librustdoc/html/render.rs @@ -1,4 +1,4 @@ -// Copyright 2013 The Rust Project Developers. See the COPYRIGHT +// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // @@ -101,7 +101,7 @@ pub enum ExternalLocation { enum Implementor { /// Paths are displayed specially by omitting the `impl XX for` cruft PathType(clean::Type), - /// This is the generic representation of an trait implementor, used for + /// This is the generic representation of a trait implementor, used for /// primitive types and otherwise non-path types. OtherType(clean::Generics, /* trait */ clean::Type, /* for */ clean::Type), } diff --git a/src/libstd/any.rs b/src/libstd/any.rs index 814cf3287717b..72ccf6be023ea 100644 --- a/src/libstd/any.rs +++ b/src/libstd/any.rs @@ -1,4 +1,4 @@ -// Copyright 2013 The Rust Project Developers. See the COPYRIGHT +// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // @@ -118,7 +118,7 @@ impl<'a> AnyMutRefExt<'a> for &'a mut Any { } } -/// Extension methods for a owning `Any` trait object +/// Extension methods for an owning `Any` trait object pub trait AnyOwnExt { /// Returns the boxed value if it is of type `T`, or /// `Err(Self)` if it isn't. diff --git a/src/libstd/ascii.rs b/src/libstd/ascii.rs index 546f555038756..83aec9d0aa639 100644 --- a/src/libstd/ascii.rs +++ b/src/libstd/ascii.rs @@ -1,4 +1,4 @@ -// Copyright 2013 The Rust Project Developers. See the COPYRIGHT +// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // @@ -27,13 +27,13 @@ use option::{Option, Some, None}; pub struct Ascii { priv chr: u8 } impl Ascii { - /// Converts a ascii character into a `u8`. + /// Converts an ascii character into a `u8`. #[inline] pub fn to_byte(self) -> u8 { self.chr } - /// Converts a ascii character into a `char`. + /// Converts an ascii character into a `char`. #[inline] pub fn to_char(self) -> char { self.chr as char @@ -314,9 +314,9 @@ impl IterBytes for Ascii { } } -/// Trait to convert to a owned byte array by consuming self +/// Trait to convert to an owned byte array by consuming self pub trait IntoBytes { - /// Converts to a owned byte array by consuming self + /// Converts to an owned byte array by consuming self fn into_bytes(self) -> ~[u8]; } diff --git a/src/libstd/io/mod.rs b/src/libstd/io/mod.rs index cadcbdd51f57b..69f0cf96ffc34 100644 --- a/src/libstd/io/mod.rs +++ b/src/libstd/io/mod.rs @@ -83,7 +83,7 @@ Some examples of obvious things you might want to do let lines: ~[~str] = file.lines().collect(); ``` -* Make an simple HTTP request +* Make a simple HTTP request FIXME This needs more improvement: TcpStream constructor taking &str, `write_str` and `write_line` methods. diff --git a/src/libstd/iter.rs b/src/libstd/iter.rs index 5a38b7cb2e196..df7b04dcd1976 100644 --- a/src/libstd/iter.rs +++ b/src/libstd/iter.rs @@ -213,7 +213,7 @@ pub trait Iterator { /// Creates an iterator that has a `.peek()` method - /// that returns a optional reference to the next element. + /// that returns an optional reference to the next element. /// /// # Example /// diff --git a/src/libstd/num/f32.rs b/src/libstd/num/f32.rs index 0af8f155c6878..0d98300c5d6bf 100644 --- a/src/libstd/num/f32.rs +++ b/src/libstd/num/f32.rs @@ -1,4 +1,4 @@ -// Copyright 2012 The Rust Project Developers. See the COPYRIGHT +// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // @@ -812,7 +812,7 @@ impl num::ToStrRadix for f32 { } /// Convert a string in base 16 to a float. -/// Accepts a optional binary exponent. +/// Accepts an optional binary exponent. /// /// This function accepts strings such as /// @@ -844,7 +844,7 @@ pub fn from_str_hex(num: &str) -> Option { impl FromStr for f32 { /// Convert a string in base 10 to a float. - /// Accepts a optional decimal exponent. + /// Accepts an optional decimal exponent. /// /// This function accepts strings such as /// @@ -876,7 +876,7 @@ impl FromStr for f32 { } impl num::FromStrRadix for f32 { - /// Convert a string in an given base to a float. + /// Convert a string in a given base to a float. /// /// Due to possible conflicts, this function does **not** accept /// the special values `inf`, `-inf`, `+inf` and `NaN`, **nor** diff --git a/src/libstd/num/f64.rs b/src/libstd/num/f64.rs index 1155a89876e5a..c22f29c6fe0e3 100644 --- a/src/libstd/num/f64.rs +++ b/src/libstd/num/f64.rs @@ -1,4 +1,4 @@ -// Copyright 2012 The Rust Project Developers. See the COPYRIGHT +// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // @@ -814,7 +814,7 @@ impl num::ToStrRadix for f64 { } /// Convert a string in base 16 to a float. -/// Accepts a optional binary exponent. +/// Accepts an optional binary exponent. /// /// This function accepts strings such as /// @@ -846,7 +846,7 @@ pub fn from_str_hex(num: &str) -> Option { impl FromStr for f64 { /// Convert a string in base 10 to a float. - /// Accepts a optional decimal exponent. + /// Accepts an optional decimal exponent. /// /// This function accepts strings such as /// @@ -878,7 +878,7 @@ impl FromStr for f64 { } impl num::FromStrRadix for f64 { - /// Convert a string in an given base to a float. + /// Convert a string in a given base to a float. /// /// Due to possible conflicts, this function does **not** accept /// the special values `inf`, `-inf`, `+inf` and `NaN`, **nor** diff --git a/src/libstd/num/strconv.rs b/src/libstd/num/strconv.rs index 67f6d006b5787..1ecabff875872 100644 --- a/src/libstd/num/strconv.rs +++ b/src/libstd/num/strconv.rs @@ -1,4 +1,4 @@ -// Copyright 2013 The Rust Project Developers. See the COPYRIGHT +// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // @@ -517,7 +517,7 @@ static DIGIT_E_RADIX: uint = ('e' as uint) - ('a' as uint) + 11u; * - `ExpBin`: Accepts numbers with a binary exponent like `42P-8` or * `FFp128`. The exponent string itself is always base 10. * Can conflict with `radix`, see Failure. - * - `empty_zero` - Whether to accept a empty `buf` as a 0 or not. + * - `empty_zero` - Whether to accept an empty `buf` as a 0 or not. * - `ignore_underscores` - Whether all underscores within the string should * be ignored. * diff --git a/src/libstd/option.rs b/src/libstd/option.rs index 833f20210434b..fd5f3a233e6bf 100644 --- a/src/libstd/option.rs +++ b/src/libstd/option.rs @@ -121,7 +121,7 @@ impl Option { // Getting to contained values ///////////////////////////////////////////////////////////////////////// - /// Unwraps a option, yielding the content of a `Some` + /// Unwraps an option, yielding the content of a `Some` /// Fails if the value is a `None` with a custom failure message provided by `msg`. #[inline] pub fn expect(self, msg: M) -> T { diff --git a/src/libstd/result.rs b/src/libstd/result.rs index c3618bad18ec4..4783c983d00f9 100644 --- a/src/libstd/result.rs +++ b/src/libstd/result.rs @@ -102,7 +102,7 @@ impl Result { // Transforming contained values ///////////////////////////////////////////////////////////////////////// - /// Maps an `Result` to `Result` by applying a function to an + /// Maps a `Result` to `Result` by applying a function to an /// contained `Ok` value, leaving an `Err` value untouched. /// /// This function can be used to compose the results of two functions. @@ -120,7 +120,7 @@ impl Result { } } - /// Maps an `Result` to `Result` by applying a function to an + /// Maps a `Result` to `Result` by applying a function to an /// contained `Err` value, leaving an `Ok` value untouched. /// /// This function can be used to pass through a successful result while handling diff --git a/src/libstd/send_str.rs b/src/libstd/send_str.rs index b6c9acd26723d..2599a74a748cb 100644 --- a/src/libstd/send_str.rs +++ b/src/libstd/send_str.rs @@ -1,4 +1,4 @@ -// Copyright 2013 The Rust Project Developers. See the COPYRIGHT +// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // @@ -38,7 +38,7 @@ impl SendStr { } } - /// Returns `true` if this `SendStr` wraps an static string + /// Returns `true` if this `SendStr` wraps a static string #[inline] pub fn is_static(&self) -> bool { match *self { diff --git a/src/libstd/str.rs b/src/libstd/str.rs index 9cc9799d0c017..16af8367edf3d 100644 --- a/src/libstd/str.rs +++ b/src/libstd/str.rs @@ -1,4 +1,4 @@ -// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT +// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // @@ -417,7 +417,7 @@ pub struct CharSplitsN<'a, Sep> { priv invert: bool, } -/// An iterator over the words of a string, separated by an sequence of whitespace +/// An iterator over the words of a string, separated by a sequence of whitespace pub type Words<'a> = Filter<'a, &'a str, CharSplits<'a, extern "Rust" fn(char) -> bool>>; diff --git a/src/libstd/vec.rs b/src/libstd/vec.rs index 467bcf075f60c..057e7ae468038 100644 --- a/src/libstd/vec.rs +++ b/src/libstd/vec.rs @@ -803,7 +803,7 @@ pub trait CloneableVector { /// Copy `self` into a new owned vector fn to_owned(&self) -> ~[T]; - /// Convert `self` into a owned vector, not making a copy if possible. + /// Convert `self` into an owned vector, not making a copy if possible. fn into_owned(self) -> ~[T]; } diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs index 3070ecde71e6b..b8bac83b37506 100644 --- a/src/libsyntax/ast.rs +++ b/src/libsyntax/ast.rs @@ -1,4 +1,4 @@ -// Copyright 2012 The Rust Project Developers. See the COPYRIGHT +// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // @@ -679,7 +679,7 @@ pub enum TokenTree { // // As a final, horrifying aside, note that macro-by-example's input is // also matched by one of these matchers. Holy self-referential! It is matched -// by an MatchSeq, specifically this one: +// by a MatchSeq, specifically this one: // // $( $lhs:matchers => $rhs:tt );+ // diff --git a/src/libsyntax/ext/deriving/generic.rs b/src/libsyntax/ext/deriving/generic.rs index 3c9401b109f3a..5e7936cfd68c6 100644 --- a/src/libsyntax/ext/deriving/generic.rs +++ b/src/libsyntax/ext/deriving/generic.rs @@ -1,4 +1,4 @@ -// Copyright 2013 The Rust Project Developers. See the COPYRIGHT +// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // @@ -42,7 +42,7 @@ arguments: the same variant (e.g. `None`, `Some(1)` and `None`). If `const_nonmatching` is true, this will contain an empty list. - `StaticEnum` and `StaticStruct` for static methods, where the type - being derived upon is either a enum or struct respectively. (Any + being derived upon is either an enum or struct respectively. (Any argument with type Self is just grouped among the non-self arguments.) diff --git a/src/test/compile-fail/borrowck-anon-fields-struct.rs b/src/test/compile-fail/borrowck-anon-fields-struct.rs index bcaa3b9086cf3..46215d6b16436 100644 --- a/src/test/compile-fail/borrowck-anon-fields-struct.rs +++ b/src/test/compile-fail/borrowck-anon-fields-struct.rs @@ -1,5 +1,5 @@ // Tests that we are able to distinguish when loans borrow different -// anonymous fields of an tuple vs the same anonymous field. +// anonymous fields of a tuple vs the same anonymous field. struct Y(uint, uint); diff --git a/src/test/run-pass/expr-match-fail-all.rs b/src/test/run-pass/expr-match-fail-all.rs index aef11a78e0dbb..5c83e81d8be2c 100644 --- a/src/test/run-pass/expr-match-fail-all.rs +++ b/src/test/run-pass/expr-match-fail-all.rs @@ -1,4 +1,4 @@ -// Copyright 2012 The Rust Project Developers. See the COPYRIGHT +// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // @@ -11,7 +11,7 @@ -// When all branches of an match expression result in fail, the entire +// When all branches of a match expression result in fail, the entire // match expression results in fail. pub fn main() { let _x =