Skip to content

Commit b9a026a

Browse files
Armavicaalexcrichton
authored andcommitted
Fix minor doc typos
1 parent 2c8b112 commit b9a026a

File tree

27 files changed

+55
-55
lines changed

27 files changed

+55
-55
lines changed

src/libextra/hex.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -60,7 +60,7 @@ pub trait FromHex {
6060
pub enum FromHexError {
6161
/// The input contained a character not part of the hex format
6262
InvalidHexCharacter(char, uint),
63-
/// The input had a invalid length
63+
/// The input had an invalid length
6464
InvalidHexLength,
6565
}
6666

src/libextra/num/bigint.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1292,7 +1292,7 @@ impl ToStrRadix for BigInt {
12921292
}
12931293
12941294
impl FromStrRadix for BigInt {
1295-
/// Creates and initializes an BigInt.
1295+
/// Creates and initializes a BigInt.
12961296
#[inline]
12971297
fn from_str_radix(s: &str, radix: uint) -> Option<BigInt> {
12981298
BigInt::parse_bytes(s.as_bytes(), radix)
@@ -1385,7 +1385,7 @@ impl<R: Rng> RandBigInt for R {
13851385
}
13861386
13871387
impl BigInt {
1388-
/// Creates and initializes an BigInt.
1388+
/// Creates and initializes a BigInt.
13891389
#[inline]
13901390
pub fn new(sign: Sign, v: ~[BigDigit]) -> BigInt {
13911391
BigInt::from_biguint(sign, BigUint::new(v))

src/librustc/middle/kind.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ pub fn check_durable(tcx: ty::ctxt, ty: ty::t, sp: Span) -> bool {
485485
}
486486
}
487487

488-
/// This is rather subtle. When we are casting a value to a instantiated
488+
/// This is rather subtle. When we are casting a value to an instantiated
489489
/// trait like `a as trait<'r>`, regionck already ensures that any references
490490
/// that appear in the type of `a` are bounded by `'r` (ed.: rem
491491
/// FIXME(#5723)). However, it is possible that there are *type parameters*
@@ -516,7 +516,7 @@ pub fn check_cast_for_escaping_regions(
516516
target_ty: ty::t,
517517
source_span: Span)
518518
{
519-
// Determine what type we are casting to; if it is not an trait, then no
519+
// Determine what type we are casting to; if it is not a trait, then no
520520
// worries.
521521
match ty::get(target_ty).sty {
522522
ty::ty_trait(..) => {}

src/librustc/middle/lint.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ static lint_table: &'static [(&'static str, LintSpec)] = &[
371371
("unused_must_use",
372372
LintSpec {
373373
lint: UnusedMustUse,
374-
desc: "unused result of an type flagged as #[must_use]",
374+
desc: "unused result of a type flagged as #[must_use]",
375375
default: warn,
376376
}),
377377

src/librustc/middle/trans/_match.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -244,7 +244,7 @@ pub enum VecLenOpt {
244244
vec_len_ge(/* length of prefix */uint)
245245
}
246246

247-
// An option identifying a branch (either a literal, a enum variant or a
247+
// An option identifying a branch (either a literal, an enum variant or a
248248
// range)
249249
enum Opt {
250250
lit(Lit),

src/librustc/middle/ty.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -2591,7 +2591,7 @@ pub fn type_is_sized(cx: ctxt, ty: ty::t) -> bool {
25912591
}
25922592
}
25932593

2594-
// Whether a type is enum like, that is a enum type with only nullary
2594+
// Whether a type is enum like, that is an enum type with only nullary
25952595
// constructors
25962596
pub fn type_is_c_like_enum(cx: ctxt, ty: t) -> bool {
25972597
match get(ty).sty {

src/librustc/middle/typeck/astconv.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -385,7 +385,7 @@ pub fn ast_ty_to_ty<AC:AstConv, RS:RegionScope>(
385385
}
386386

387387
// Handle @, ~, and & being able to mean strs and vecs.
388-
// If a_seq_ty is a str or a vec, make it an str/vec.
388+
// If a_seq_ty is a str or a vec, make it a str/vec.
389389
// Also handle first-class trait types.
390390
fn mk_pointer<AC:AstConv,
391391
RS:RegionScope>(

src/librustc/middle/typeck/check/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -2008,7 +2008,7 @@ pub fn check_expr_with_unifier(fcx: @FnCtxt,
20082008
}
20092009
}
20102010

2011-
// could be either a expr_binop or an expr_assign_binop
2011+
// could be either an expr_binop or an expr_assign_binop
20122012
fn check_binop(fcx: @FnCtxt,
20132013
callee_id: ast::NodeId,
20142014
expr: &ast::Expr,

src/librustc/middle/typeck/collect.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -737,7 +737,7 @@ pub fn instantiate_trait_ref(ccx: &CrateCtxt,
737737
/*!
738738
* Instantiates the path for the given trait reference, assuming that
739739
* it's bound to a valid trait type. Returns the def_id for the defining
740-
* trait. Fails if the type is a type other than an trait type.
740+
* trait. Fails if the type is a type other than a trait type.
741741
*/
742742

743743
// FIXME(#5121) -- distinguish early vs late lifetime params

src/librustc/util/sha2.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -476,7 +476,7 @@ pub struct Sha256 {
476476
}
477477

478478
impl Sha256 {
479-
/// Construct an new instance of a SHA-256 digest.
479+
/// Construct a new instance of a SHA-256 digest.
480480
pub fn new() -> Sha256 {
481481
Sha256 {
482482
engine: Engine256::new(&H256)

src/librustdoc/html/render.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -101,7 +101,7 @@ pub enum ExternalLocation {
101101
enum Implementor {
102102
/// Paths are displayed specially by omitting the `impl XX for` cruft
103103
PathType(clean::Type),
104-
/// This is the generic representation of an trait implementor, used for
104+
/// This is the generic representation of a trait implementor, used for
105105
/// primitive types and otherwise non-path types.
106106
OtherType(clean::Generics, /* trait */ clean::Type, /* for */ clean::Type),
107107
}

src/libstd/any.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -118,7 +118,7 @@ impl<'a> AnyMutRefExt<'a> for &'a mut Any {
118118
}
119119
}
120120

121-
/// Extension methods for a owning `Any` trait object
121+
/// Extension methods for an owning `Any` trait object
122122
pub trait AnyOwnExt {
123123
/// Returns the boxed value if it is of type `T`, or
124124
/// `Err(Self)` if it isn't.

src/libstd/ascii.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -27,13 +27,13 @@ use option::{Option, Some, None};
2727
pub struct Ascii { priv chr: u8 }
2828

2929
impl Ascii {
30-
/// Converts a ascii character into a `u8`.
30+
/// Converts an ascii character into a `u8`.
3131
#[inline]
3232
pub fn to_byte(self) -> u8 {
3333
self.chr
3434
}
3535

36-
/// Converts a ascii character into a `char`.
36+
/// Converts an ascii character into a `char`.
3737
#[inline]
3838
pub fn to_char(self) -> char {
3939
self.chr as char
@@ -314,9 +314,9 @@ impl IterBytes for Ascii {
314314
}
315315
}
316316

317-
/// Trait to convert to a owned byte array by consuming self
317+
/// Trait to convert to an owned byte array by consuming self
318318
pub trait IntoBytes {
319-
/// Converts to a owned byte array by consuming self
319+
/// Converts to an owned byte array by consuming self
320320
fn into_bytes(self) -> ~[u8];
321321
}
322322

src/libstd/io/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ Some examples of obvious things you might want to do
8383
let lines: ~[~str] = file.lines().collect();
8484
```
8585
86-
* Make an simple HTTP request
86+
* Make a simple HTTP request
8787
FIXME This needs more improvement: TcpStream constructor taking &str,
8888
`write_str` and `write_line` methods.
8989

src/libstd/iter.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ pub trait Iterator<A> {
213213

214214

215215
/// Creates an iterator that has a `.peek()` method
216-
/// that returns a optional reference to the next element.
216+
/// that returns an optional reference to the next element.
217217
///
218218
/// # Example
219219
///

src/libstd/num/f32.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -812,7 +812,7 @@ impl num::ToStrRadix for f32 {
812812
}
813813

814814
/// Convert a string in base 16 to a float.
815-
/// Accepts a optional binary exponent.
815+
/// Accepts an optional binary exponent.
816816
///
817817
/// This function accepts strings such as
818818
///
@@ -844,7 +844,7 @@ pub fn from_str_hex(num: &str) -> Option<f32> {
844844

845845
impl FromStr for f32 {
846846
/// Convert a string in base 10 to a float.
847-
/// Accepts a optional decimal exponent.
847+
/// Accepts an optional decimal exponent.
848848
///
849849
/// This function accepts strings such as
850850
///
@@ -876,7 +876,7 @@ impl FromStr for f32 {
876876
}
877877

878878
impl num::FromStrRadix for f32 {
879-
/// Convert a string in an given base to a float.
879+
/// Convert a string in a given base to a float.
880880
///
881881
/// Due to possible conflicts, this function does **not** accept
882882
/// the special values `inf`, `-inf`, `+inf` and `NaN`, **nor**

src/libstd/num/f64.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -814,7 +814,7 @@ impl num::ToStrRadix for f64 {
814814
}
815815

816816
/// Convert a string in base 16 to a float.
817-
/// Accepts a optional binary exponent.
817+
/// Accepts an optional binary exponent.
818818
///
819819
/// This function accepts strings such as
820820
///
@@ -846,7 +846,7 @@ pub fn from_str_hex(num: &str) -> Option<f64> {
846846

847847
impl FromStr for f64 {
848848
/// Convert a string in base 10 to a float.
849-
/// Accepts a optional decimal exponent.
849+
/// Accepts an optional decimal exponent.
850850
///
851851
/// This function accepts strings such as
852852
///
@@ -878,7 +878,7 @@ impl FromStr for f64 {
878878
}
879879

880880
impl num::FromStrRadix for f64 {
881-
/// Convert a string in an given base to a float.
881+
/// Convert a string in a given base to a float.
882882
///
883883
/// Due to possible conflicts, this function does **not** accept
884884
/// the special values `inf`, `-inf`, `+inf` and `NaN`, **nor**

src/libstd/num/strconv.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -517,7 +517,7 @@ static DIGIT_E_RADIX: uint = ('e' as uint) - ('a' as uint) + 11u;
517517
* - `ExpBin`: Accepts numbers with a binary exponent like `42P-8` or
518518
* `FFp128`. The exponent string itself is always base 10.
519519
* Can conflict with `radix`, see Failure.
520-
* - `empty_zero` - Whether to accept a empty `buf` as a 0 or not.
520+
* - `empty_zero` - Whether to accept an empty `buf` as a 0 or not.
521521
* - `ignore_underscores` - Whether all underscores within the string should
522522
* be ignored.
523523
*

src/libstd/option.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ impl<T> Option<T> {
121121
// Getting to contained values
122122
/////////////////////////////////////////////////////////////////////////
123123

124-
/// Unwraps a option, yielding the content of a `Some`
124+
/// Unwraps an option, yielding the content of a `Some`
125125
/// Fails if the value is a `None` with a custom failure message provided by `msg`.
126126
#[inline]
127127
pub fn expect<M: Any + Send>(self, msg: M) -> T {

src/libstd/result.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ impl<T, E> Result<T, E> {
102102
// Transforming contained values
103103
/////////////////////////////////////////////////////////////////////////
104104

105-
/// Maps an `Result<T, E>` to `Result<U, E>` by applying a function to an
105+
/// Maps a `Result<T, E>` to `Result<U, E>` by applying a function to an
106106
/// contained `Ok` value, leaving an `Err` value untouched.
107107
///
108108
/// This function can be used to compose the results of two functions.
@@ -120,7 +120,7 @@ impl<T, E> Result<T, E> {
120120
}
121121
}
122122

123-
/// Maps an `Result<T, E>` to `Result<T, F>` by applying a function to an
123+
/// Maps a `Result<T, E>` to `Result<T, F>` by applying a function to an
124124
/// contained `Err` value, leaving an `Ok` value untouched.
125125
///
126126
/// This function can be used to pass through a successful result while handling

src/libstd/send_str.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -38,7 +38,7 @@ impl SendStr {
3838
}
3939
}
4040

41-
/// Returns `true` if this `SendStr` wraps an static string
41+
/// Returns `true` if this `SendStr` wraps a static string
4242
#[inline]
4343
pub fn is_static(&self) -> bool {
4444
match *self {

src/libstd/str.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -417,7 +417,7 @@ pub struct CharSplitsN<'a, Sep> {
417417
priv invert: bool,
418418
}
419419

420-
/// An iterator over the words of a string, separated by an sequence of whitespace
420+
/// An iterator over the words of a string, separated by a sequence of whitespace
421421
pub type Words<'a> =
422422
Filter<'a, &'a str, CharSplits<'a, extern "Rust" fn(char) -> bool>>;
423423

src/libstd/vec.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -804,7 +804,7 @@ pub trait CloneableVector<T> {
804804
/// Copy `self` into a new owned vector
805805
fn to_owned(&self) -> ~[T];
806806

807-
/// Convert `self` into a owned vector, not making a copy if possible.
807+
/// Convert `self` into an owned vector, not making a copy if possible.
808808
fn into_owned(self) -> ~[T];
809809
}
810810

src/libsyntax/ast.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -680,7 +680,7 @@ pub enum TokenTree {
680680
//
681681
// As a final, horrifying aside, note that macro-by-example's input is
682682
// also matched by one of these matchers. Holy self-referential! It is matched
683-
// by an MatchSeq, specifically this one:
683+
// by a MatchSeq, specifically this one:
684684
//
685685
// $( $lhs:matchers => $rhs:tt );+
686686
//

0 commit comments

Comments
 (0)