Skip to content

Commit 37bd466

Browse files
committed
Spelling/doc formatting fixes.
1 parent e7e5e9c commit 37bd466

File tree

20 files changed

+31
-29
lines changed

20 files changed

+31
-29
lines changed

src/libcollections/hashmap.rs

+1-1
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

+2-2
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

+1-1
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

+4-2
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

+1-1
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

+1-1
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@
252252
//! The suitability of `fail!` as an error handling mechanism is
253253
//! limited by Rust's lack of any way to "catch" and resume execution
254254
//! from a thrown exception. Therefore using failure for error
255-
//! handling requires encapsulating fallable code in a task. Calling
255+
//! handling requires encapsulating fallible code in a task. Calling
256256
//! the `fail!` macro, or invoking `fail!` indirectly should be
257257
//! avoided as an error reporting strategy. Failure is only for
258258
//! unrecoverable errors and a failing task is typically the sign of

src/libgetopts/lib.rs

+1-1
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

+2-2
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

+1-1
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

+1-1
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

src/libnative/io/timer_unix.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
//!
2424
//! Whenever the call to select() times out, then a channel receives a message.
2525
//! Whenever the call returns that the file descriptor has information, then the
26-
//! channel from timers is drained, enqueueing all incoming requests.
26+
//! channel from timers is drained, enqueuing all incoming requests.
2727
//!
2828
//! The actual implementation of the helper thread is a sorted array of
2929
//! timers in terms of target firing date. The target is the absolute time at
@@ -42,7 +42,7 @@
4242
//! thread. Whenever the timer is modified, it first takes ownership back from
4343
//! the worker thread in order to modify the same data structure. This has the
4444
//! side effect of "cancelling" the previous requests while allowing a
45-
//! re-enqueueing later on.
45+
//! re-enqueuing later on.
4646
//!
4747
//! Note that all time units in this file are in *milliseconds*.
4848

src/librustc/middle/borrowck/doc.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ the pointer itself `LV` goes out of scope:
424424
```
425425
426426
The scope of a managed referent is also the scope of the pointer. This
427-
is a conservative approximation, since there may be other aliases fo
427+
is a conservative approximation, since there may be other aliases for
428428
that same managed box that would cause it to live longer:
429429
430430
```notrust
@@ -536,7 +536,7 @@ The final rules govern the computation of *restrictions*, meaning that
536536
we compute the set of actions that will be illegal for the life of the
537537
loan. The predicate is written `RESTRICTIONS(LV, LT, ACTIONS) =
538538
RESTRICTION*`, which can be read "in order to prevent `ACTIONS` from
539-
occuring on `LV`, the restrictions `RESTRICTION*` must be respected
539+
occurring on `LV`, the restrictions `RESTRICTION*` must be respected
540540
for the lifetime of the loan".
541541
542542
Note that there is an initial set of restrictions: these restrictions
@@ -551,7 +551,7 @@ are computed based on the kind of borrow:
551551
The reasoning here is that a mutable borrow must be the only writer,
552552
therefore it prevents other writes (`MUTATE`), mutable borrows
553553
(`CLAIM`), and immutable borrows (`FREEZE`). An immutable borrow
554-
permits other immutable borows but forbids writes and mutable borows.
554+
permits other immutable borrows but forbids writes and mutable borows.
555555
Finally, a const borrow just wants to be sure that the value is not
556556
moved out from under it, so no actions are forbidden.
557557

src/librustc/middle/trans/context.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ pub struct CrateContext {
7373
/// came from)
7474
pub external_srcs: RefCell<NodeMap<ast::DefId>>,
7575
/// A set of static items which cannot be inlined into other crates. This
76-
/// will pevent in IIItem() structures from being encoded into the metadata
76+
/// will prevent in IIItem() structures from being encoded into the metadata
7777
/// that is generated
7878
pub non_inlineable_statics: RefCell<NodeSet>,
7979
/// Cache instances of monomorphized functions

src/librustc/middle/typeck/infer/doc.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ yet, that's what we're trying to find! In our code, we opt to unify
244244
245245
# Implementation details
246246
247-
We make use of a trait-like impementation strategy to consolidate
247+
We make use of a trait-like implementation strategy to consolidate
248248
duplicated code between subtypes, GLB, and LUB computations. See the
249249
section on "Type Combining" below for details.
250250

src/librustuv/timeout.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ use uvio::UvIoFactory;
2121
use {Loop, UvError, uv_error_to_io_error, Request, wakeup};
2222
use {UvHandle, wait_until_woken_after};
2323

24-
/// Managment of a timeout when gaining access to a portion of a duplex stream.
24+
/// Management of a timeout when gaining access to a portion of a duplex stream.
2525
pub struct AccessTimeout {
2626
state: TimeoutState,
2727
timer: Option<Box<TimerWatcher>>,

src/libstd/io/mod.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ pub enum IoErrorKind {
402402
PermissionDenied,
403403
/// A network connection failed for some reason not specified in this list.
404404
ConnectionFailed,
405-
/// The network operation failed because the network connection was cloesd.
405+
/// The network operation failed because the network connection was closed.
406406
Closed,
407407
/// The connection was refused by the remote server.
408408
ConnectionRefused,
@@ -469,7 +469,7 @@ pub trait Reader {
469469
/// inspected for in the error's `kind` field. Also note that reading 0
470470
/// bytes is not considered an error in all circumstances
471471
///
472-
/// # Implementaton Note
472+
/// # Implementation Note
473473
///
474474
/// When implementing this method on a new Reader, you are strongly encouraged
475475
/// not to return 0 if you can avoid it.
@@ -938,9 +938,9 @@ fn extend_sign(val: u64, nbytes: uint) -> i64 {
938938

939939
/// A trait for objects which are byte-oriented streams. Writers are defined by
940940
/// one method, `write`. This function will block until the provided buffer of
941-
/// bytes has been entirely written, and it will return any failurs which occur.
941+
/// bytes has been entirely written, and it will return any failures which occur.
942942
///
943-
/// Another commonly overriden method is the `flush` method for writers such as
943+
/// Another commonly overridden method is the `flush` method for writers such as
944944
/// buffered writers.
945945
///
946946
/// Writers are intended to be composable with one another. Many objects

src/libstd/io/process.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ impl Command {
123123
/// * Inherit the current process's environment
124124
/// * Inherit the current process's working directory
125125
/// * A readable pipe for stdin (file descriptor 0)
126-
/// * A writeable pipe for stdour and stderr (file descriptors 1 and 2)
126+
/// * A writeable pipe for stdout and stderr (file descriptors 1 and 2)
127127
///
128128
/// Builder methods are provided to change these defaults and
129129
/// otherwise configure the process.

src/libstd/io/stdio.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ fn src<T>(fd: libc::c_int, readable: bool, f: |StdSource| -> T) -> T {
9292
/// provided unbuffered access to stdin.
9393
///
9494
/// Care should be taken when creating multiple handles to the stdin of a
95-
/// process. Beause this is a buffered reader by default, it's possible for
95+
/// process. Because this is a buffered reader by default, it's possible for
9696
/// pending input to be unconsumed in one reader and unavailable to other
9797
/// readers. It is recommended that only one handle at a time is created for the
9898
/// stdin of a process.

src/libstd/io/timer.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ use rt::rtio::{IoFactory, LocalIo, RtioTimer};
5252
/// # }
5353
/// ```
5454
///
55-
/// If only sleeping is necessary, then a convenience api is provided through
55+
/// If only sleeping is necessary, then a convenience API is provided through
5656
/// the `io::timer` module.
5757
///
5858
/// ```

src/libterm/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
//! Terminal formatting library.
1212
//!
1313
//! This crate provides the `Terminal` trait, which abstracts over an [ANSI
14-
//! Termina][ansi] to provide color printing, among other things. There are two implementations,
14+
//! Terminal][ansi] to provide color printing, among other things. There are two implementations,
1515
//! the `TerminfoTerminal`, which uses control characters from a
1616
//! [terminfo][ti] database, and `WinConsole`, which uses the [Win32 Console
1717
//! API][win].

0 commit comments

Comments
 (0)