Skip to content

Commit 02117dd

Browse files
committed
auto merge of #14357 : huonw/rust/spelling, r=pnkfelix
The span on a inner doc-comment would point to the next token, e.g. the span for the `a` line points to the `b` line, and the span of `b` points to the `fn`. ```rust //! a //! b fn bar() {} ```
2 parents ec0258a + d3fde84 commit 02117dd

File tree

21 files changed

+35
-33
lines changed

21 files changed

+35
-33
lines changed

src/libcollections/hashmap.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -659,7 +659,7 @@ static INITIAL_LOAD_FACTOR: Fraction = (9, 10);
659659
/// on creation by default, this means the ordering of the keys is
660660
/// randomized, but makes the tables more resistant to
661661
/// denial-of-service attacks (Hash DoS). This behaviour can be
662-
/// overriden with one of the constructors.
662+
/// overridden with one of the constructors.
663663
///
664664
/// It is required that the keys implement the `Eq` and `Hash` traits, although
665665
/// this can frequently be achieved by using `#[deriving(Eq, Hash)]`.

src/libcore/cell.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
//! Sharable mutable containers.
11+
//! Shareable mutable containers.
1212
//!
1313
//! Values of the `Cell` and `RefCell` types may be mutated through
1414
//! shared references (i.e. the common `&T` type), whereas most Rust
@@ -41,7 +41,7 @@
4141
//! preventing crash bugs. Because of that, inherited mutability is
4242
//! preferred, and interior mutability is something of a last
4343
//! resort. Since cell types enable mutation where it would otherwise
44-
//! be disallowed though, there are occassions when interior
44+
//! be disallowed though, there are occasions when interior
4545
//! mutability might be appropriate, or even *must* be used, e.g.
4646
//!
4747
//! * Introducing inherited mutability roots to shared types.

src/libcore/fmt/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ pub trait FormatWriter {
7676
/// This function will return an instance of `FormatError` on error.
7777
fn write(&mut self, bytes: &[u8]) -> Result;
7878

79-
/// Glue for usage of the `write!` macro with implementors of this trait.
79+
/// Glue for usage of the `write!` macro with implementers of this trait.
8080
///
8181
/// This method should generally not be invoked manually, but rather through
8282
/// the `write!` macro itself.

src/libcore/iter.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -872,10 +872,12 @@ pub trait OrdIterator<A> {
872872
/// `min_max` finds the minimum and maximum elements in the iterator.
873873
///
874874
/// The return type `MinMaxResult` is an enum of three variants:
875+
///
875876
/// - `NoElements` if the iterator is empty.
876877
/// - `OneElement(x)` if the iterator has exactly one element.
877-
/// - `MinMax(x, y)` is returned otherwise, where `x <= y`. Two values are equal if and only if
878-
/// there is more than one element in the iterator and all elements are equal.
878+
/// - `MinMax(x, y)` is returned otherwise, where `x <= y`. Two
879+
/// values are equal if and only if there is more than one
880+
/// element in the iterator and all elements are equal.
879881
///
880882
/// On an iterator of length `n`, `min_max` does `1.5 * n` comparisons,
881883
/// and so faster than calling `min` and `max separately which does `2 * n` comparisons.

src/libcore/kinds.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ pub mod marker {
266266
#[deriving(Eq,Clone)]
267267
pub struct NoCopy;
268268

269-
/// A type which is considered "not sharable", meaning that
269+
/// A type which is considered "not shareable", meaning that
270270
/// its contents are not threadsafe, hence they cannot be
271271
/// shared between tasks.
272272
#[lang="no_share_bound"]

src/libcore/result.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@
260260
//! The suitability of `fail!` as an error handling mechanism is
261261
//! limited by Rust's lack of any way to "catch" and resume execution
262262
//! from a thrown exception. Therefore using failure for error
263-
//! handling requires encapsulating fallable code in a task. Calling
263+
//! handling requires encapsulating fallible code in a task. Calling
264264
//! the `fail!` macro, or invoking `fail!` indirectly should be
265265
//! avoided as an error reporting strategy. Failure is only for
266266
//! unrecoverable errors and a failing task is typically the sign of

src/libgetopts/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ pub enum Fail_ {
190190
UnrecognizedOption(StrBuf),
191191
/// A required option is not present.
192192
OptionMissing(StrBuf),
193-
/// A single occurence option is being used multiple times.
193+
/// A single occurrence option is being used multiple times.
194194
OptionDuplicated(StrBuf),
195195
/// There's an argument being passed to a non-argument option.
196196
UnexpectedArgument(StrBuf),

src/libgraphviz/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ pub trait Labeller<'a,N,E> {
395395
fn graph_id(&'a self) -> Id<'a>;
396396

397397
/// Maps `n` to a unique identifier with respect to `self`. The
398-
/// implementor is responsible for ensuring that the returned name
398+
/// implementer is responsible for ensuring that the returned name
399399
/// is a valid DOT identifier.
400400
fn node_id(&'a self, n: &N) -> Id<'a>;
401401

@@ -457,7 +457,7 @@ pub type Edges<'a,E> = MaybeOwnedVector<'a,E>;
457457
/// that is bound by the self lifetime `'a`.
458458
///
459459
/// The `nodes` and `edges` method each return instantiations of
460-
/// `MaybeOwnedVector` to leave implementors the freedom to create
460+
/// `MaybeOwnedVector` to leave implementers the freedom to create
461461
/// entirely new vectors or to pass back slices into internally owned
462462
/// vectors.
463463
pub trait GraphWalk<'a, N, E> {

src/libgraphviz/maybe_owned_vec.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ use std::slice;
3131
/// Some clients will have a pre-allocated vector ready to hand off in
3232
/// a slice; others will want to create the set on the fly and hand
3333
/// off ownership, via either `Growable` or `FixedLen` depending on
34-
/// which kind of vector they have constucted. (The `FixedLen`
34+
/// which kind of vector they have constructed. (The `FixedLen`
3535
/// variant is provided for interoperability with `std::slice` methods
3636
/// that return `~[T]`.)
3737
pub enum MaybeOwnedVector<'a,T> {

src/libgreen/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@
125125
//! }
126126
//! ```
127127
//!
128-
//! > **Note**: This `main` funciton in this example does *not* have I/O
128+
//! > **Note**: This `main` function in this example does *not* have I/O
129129
//! > support. The basic event loop does not provide any support
130130
//!
131131
//! # Starting with I/O support in libgreen

0 commit comments

Comments
 (0)