Skip to content

Commit abe94f9

Browse files
committed
doc: correct spelling in documentation.
1 parent 1ad0cf5 commit abe94f9

23 files changed

+35
-36
lines changed

doc/rust.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ a referencing source file, or by the name of the crate itself.
582582

583583
Each source file contains a sequence of zero or more `item` definitions,
584584
and may optionally begin with any number of `attributes` that apply to the containing module.
585-
Atributes on the anonymous crate module define important metadata that influences
585+
Attributes on the anonymous crate module define important metadata that influences
586586
the behavior of the compiler.
587587

588588
~~~~~~~~
@@ -1273,7 +1273,7 @@ since the typechecker checks that any type with an implementation of `Circle` al
12731273

12741274
In type-parameterized functions,
12751275
methods of the supertrait may be called on values of subtrait-bound type parameters.
1276-
Refering to the previous example of `trait Circle : Shape`:
1276+
Referring to the previous example of `trait Circle : Shape`:
12771277

12781278
~~~
12791279
# trait Shape { fn area(&self) -> float; }
@@ -1914,7 +1914,7 @@ A field access on a record is an [lvalue](#lvalues-rvalues-and-temporaries) refe
19141914
When the field is mutable, it can be [assigned](#assignment-expressions) to.
19151915

19161916
When the type of the expression to the left of the dot is a pointer to a record or structure,
1917-
it is automatically derferenced to make the field access possible.
1917+
it is automatically dereferenced to make the field access possible.
19181918

19191919

19201920
### Vector expressions

src/libextra/enum_set.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ pub struct EnumSet<E> {
1818
priv bits: uint
1919
}
2020

21-
/// An iterface for casting C-like enum to uint and back.
21+
/// An interface for casting C-like enum to uint and back.
2222
pub trait CLike {
2323
/// Converts C-like enum to uint.
2424
fn to_uint(&self) -> uint;

src/libextra/flatpipes.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ Constructors for flat pipes that send POD types using memcpy.
166166
167167
This module is currently unsafe because it uses `Clone + Send` as a type
168168
parameter bounds meaning POD (plain old data), but `Clone + Send` and
169-
POD are not equivelant.
169+
POD are not equivalent.
170170
171171
*/
172172
pub mod pod {

src/libextra/stats.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ pub fn write_boxplot(w: @io::Writer, s: &Summary, width_hint: uint) {
365365
w.write_str(histr);
366366
}
367367

368-
/// Returns a HashMap with the number of occurences of every element in the
368+
/// Returns a HashMap with the number of occurrences of every element in the
369369
/// sequence that the iterator exposes.
370370
pub fn freq_count<T: Iterator<U>, U: Eq+Hash>(mut iter: T) -> hashmap::HashMap<U, uint> {
371371
let mut map = hashmap::HashMap::new::<U, uint>();

src/libstd/at_vec.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ pub mod raw {
200200
* Sets the length of a vector
201201
*
202202
* This will explicitly set the size of the vector, without actually
203-
* modifing its buffers, so it is up to the caller to ensure that
203+
* modifying its buffers, so it is up to the caller to ensure that
204204
* the vector is actually the specified size.
205205
*/
206206
#[inline]

src/libstd/bool.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ and more.
3333
3434
Also, a few conversion functions: `to_bit` and `to_str`.
3535
36-
Finally, some inquries into the nature of truth: `is_true` and `is_false`.
36+
Finally, some inquiries into the nature of truth: `is_true` and `is_false`.
3737
3838
*/
3939

src/libstd/fmt/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ helper methods.
147147
## Internationalization
148148
149149
The formatting syntax supported by the `ifmt!` extension supports
150-
internationalization by providing "methods" which execute various differnet
150+
internationalization by providing "methods" which execute various different
151151
outputs depending on the input. The syntax and methods provided are similar to
152152
other internationalization systems, so again nothing should seem alien.
153153
Currently two methods are supported by this extension: "select" and "plural".

src/libstd/fmt/parse.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ pub enum Position<'self> {
6666
ArgumentNext, ArgumentIs(uint), ArgumentNamed(&'self str)
6767
}
6868

69-
/// Enum of alignments which are supoprted.
69+
/// Enum of alignments which are supported.
7070
#[deriving(Eq)]
7171
pub enum Alignment { AlignLeft, AlignRight, AlignUnknown }
7272

src/libstd/num/f32.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ pub static neg_infinity: f32 = -1.0_f32/0.0_f32;
125125
pub mod consts {
126126
// FIXME (requires Issue #1433 to fix): replace with mathematical
127127
// staticants from cmath.
128-
/// Archimedes' staticant
128+
/// Archimedes' constant
129129
pub static pi: f32 = 3.14159265358979323846264338327950288_f32;
130130

131131
/// pi/2.0

src/libstd/ptr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ pub unsafe fn array_each_with_len<T>(arr: **T, len: uint, cb: &fn(*T)) {
254254
passing to the provided callback function
255255
256256
SAFETY NOTE: This will only work with a null-terminated
257-
pointer array. Barely less-dodgey Pointer Arithmetic.
257+
pointer array. Barely less-dodgy Pointer Arithmetic.
258258
Dragons be here.
259259
*/
260260
pub unsafe fn array_each<T>(arr: **T, cb: &fn(*T)) {

src/libstd/rand.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,7 @@ pub fn rng() -> IsaacRng {
658658

659659
/// Create a weak random number generator with a default algorithm and seed.
660660
///
661-
/// It returns the fatest `Rng` algorithm currently available in Rust without
661+
/// It returns the fastest `Rng` algorithm currently available in Rust without
662662
/// consideration for cryptography or security. If you require a specifically
663663
/// seeded `Rng` for consistency over time you should pick one algorithm and
664664
/// create the `Rng` yourself.

src/libstd/result.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ use str::StrSlice;
2525

2626
/// `Result` is a type that represents either success (`Ok`) or failure (`Err`).
2727
///
28-
/// In order to provide informative error messages, `E` is reqired to implement `ToStr`.
28+
/// In order to provide informative error messages, `E` is required to implement `ToStr`.
2929
/// It is further recommended for `E` to be a descriptive error type, eg a `enum` for
3030
/// all possible errors cases.
3131
#[deriving(Clone, Eq)]

src/libstd/rt/io/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ Asynchronous interfaces are most often associated with the callback
9393
(continuation-passing) style popularised by node.js. Such systems rely
9494
on all computations being run inside an event loop which maintains a
9595
list of all pending I/O events; when one completes the registered
96-
callback is run and the code that made the I/O request continiues.
96+
callback is run and the code that made the I/O request continues.
9797
Such interfaces achieve non-blocking at the expense of being more
9898
difficult to reason about.
9999
@@ -136,7 +136,7 @@ Rust's I/O employs a combination of techniques to reduce boilerplate
136136
while still providing feedback about errors. The basic strategy:
137137
138138
* Errors are fatal by default, resulting in task failure
139-
* Errors raise the `io_error` conditon which provides an opportunity to inspect
139+
* Errors raise the `io_error` condition which provides an opportunity to inspect
140140
an IoError object containing details.
141141
* Return values must have a sensible null or zero value which is returned
142142
if a condition is handled successfully. This may be an `Option`, an empty
@@ -189,7 +189,7 @@ will start passing around null or zero objects when wrapped in a condition handl
189189
* XXX: How should we use condition handlers that return values?
190190
* XXX: Should EOF raise default conditions when EOF is not an error?
191191
192-
# Issues withi/o scheduler affinity, work stealing, task pinning
192+
# Issues with i/o scheduler affinity, work stealing, task pinning
193193
194194
# Resource management
195195

src/libstd/rt/task.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ pub struct Coroutine {
6969
saved_context: Context
7070
}
7171

72-
/// Some tasks have a deciated home scheduler that they must run on.
72+
/// Some tasks have a dedicated home scheduler that they must run on.
7373
pub enum SchedHome {
7474
AnySched,
7575
Sched(SchedHandle)
@@ -592,4 +592,3 @@ mod test {
592592
}
593593
}
594594
}
595-

src/libstd/rt/uv/uvll.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
* There are also a collection of helper functions to ease interacting
2424
* with the low-level API.
2525
*
26-
* As new functionality, existant in uv.h, is added to the rust stdlib,
26+
* As new functionality, existent in uv.h, is added to the rust stdlib,
2727
* the mappings should be added in this module.
2828
*/
2929

src/libstd/run.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ pub struct ProcessOptions<'self> {
9090
in_fd: Option<c_int>,
9191

9292
/**
93-
* If this is None then a new pipe will be created for the new progam's
93+
* If this is None then a new pipe will be created for the new program's
9494
* output and Process.output() will provide a Reader to read from this pipe.
9595
*
9696
* If this is Some(file-descriptor) then the new process will write its output
@@ -100,7 +100,7 @@ pub struct ProcessOptions<'self> {
100100
out_fd: Option<c_int>,
101101

102102
/**
103-
* If this is None then a new pipe will be created for the new progam's
103+
* If this is None then a new pipe will be created for the new program's
104104
* error stream and Process.error() will provide a Reader to read from this pipe.
105105
*
106106
* If this is Some(file-descriptor) then the new process will write its error output
@@ -840,7 +840,7 @@ pub fn process_output(prog: &str, args: &[~str]) -> ProcessOutput {
840840
* Note that this is private to avoid race conditions on unix where if
841841
* a user calls waitpid(some_process.get_id()) then some_process.finish()
842842
* and some_process.destroy() and some_process.finalize() will then either
843-
* operate on a none-existant process or, even worse, on a newer process
843+
* operate on a none-existent process or, even worse, on a newer process
844844
* with the same id.
845845
*/
846846
fn waitpid(pid: pid_t) -> int {

src/libstd/str.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ impl<'self, Sep: CharEq> Iterator<&'self str> for CharSplitIterator<'self, Sep>
382382
}
383383
}
384384

385-
/// An iterator over the start and end indicies of the matches of a
385+
/// An iterator over the start and end indices of the matches of a
386386
/// substring within a larger string
387387
#[deriving(Clone)]
388388
pub struct MatchesIndexIterator<'self> {
@@ -893,7 +893,7 @@ pub mod raw {
893893
/// Sets the length of a string
894894
///
895895
/// This will explicitly set the size of the string, without actually
896-
/// modifing its buffers, so it is up to the caller to ensure that
896+
/// modifying its buffers, so it is up to the caller to ensure that
897897
/// the string is actually the specified size.
898898
#[inline]
899899
pub unsafe fn set_len(s: &mut ~str, new_len: uint) {

src/libstd/task/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ impl TaskBuilder {
365365
spawn::spawn_raw(opts, f);
366366
}
367367

368-
/// Runs a task, while transfering ownership of one argument to the child.
368+
/// Runs a task, while transferring ownership of one argument to the child.
369369
pub fn spawn_with<A:Send>(&mut self, arg: A, f: ~fn(v: A)) {
370370
let arg = Cell::new(arg);
371371
do self.spawn {
@@ -474,10 +474,10 @@ pub fn spawn_indestructible(f: ~fn()) {
474474

475475
pub fn spawn_with<A:Send>(arg: A, f: ~fn(v: A)) {
476476
/*!
477-
* Runs a task, while transfering ownership of one argument to the
477+
* Runs a task, while transferring ownership of one argument to the
478478
* child.
479479
*
480-
* This is useful for transfering ownership of noncopyables to
480+
* This is useful for transferring ownership of noncopyables to
481481
* another task.
482482
*
483483
* This function is equivalent to `task().spawn_with(arg, f)`.

src/libstd/to_bytes.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ pub type Cb<'self> = &'self fn(buf: &[u8]) -> bool;
2828
* A trait to implement in order to make a type hashable;
2929
* This works in combination with the trait `Hash::Hash`, and
3030
* may in the future be merged with that trait or otherwise
31-
* modified when default methods and trait inheritence are
31+
* modified when default methods and trait inheritance are
3232
* completed.
3333
*/
3434
pub trait IterBytes {

src/libstd/unstable/atomics.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,14 @@ pub struct AtomicBool {
3939
}
4040

4141
/**
42-
* A signed atomic integer type, supporting basic atomic aritmetic operations
42+
* A signed atomic integer type, supporting basic atomic arithmetic operations
4343
*/
4444
pub struct AtomicInt {
4545
priv v: int
4646
}
4747

4848
/**
49-
* An unsigned atomic integer type, supporting basic atomic aritmetic operations
49+
* An unsigned atomic integer type, supporting basic atomic arithmetic operations
5050
*/
5151
pub struct AtomicUint {
5252
priv v: uint
@@ -497,7 +497,7 @@ pub unsafe fn atomic_xor<T>(dst: &mut T, val: T, order: Ordering) -> T {
497497
* A fence 'A' which has `Release` ordering semantics, synchronizes with a
498498
* fence 'B' with (at least) `Acquire` semantics, if and only if there exists
499499
* atomic operations X and Y, both operating on some atomic object 'M' such
500-
* that A is sequenced before X, Y is synchronized before B and Y obsevers
500+
* that A is sequenced before X, Y is synchronized before B and Y observers
501501
* the change to M. This provides a happens-before dependence between A and B.
502502
*
503503
* Atomic operations with `Release` or `Acquire` semantics can also synchronize

src/libstd/unstable/finally.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ stack closures that emulates Java-style try/finally blocks.
1818
do || {
1919
...
2020
}.finally {
21-
alway_run_this();
21+
always_run_this();
2222
}
2323
~~~
2424
*/

src/libstd/unstable/intrinsics.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ semantics as C++11. See the LLVM documentation on [[atomics]].
2222
2323
A quick refresher on memory ordering:
2424
25-
* Acquire - a barrier for aquiring a lock. Subsequent reads and writes
25+
* Acquire - a barrier for acquiring a lock. Subsequent reads and writes
2626
take place after the barrier.
2727
* Release - a barrier for releasing a lock. Preceding reads and writes
2828
take place before the barrier.

src/libstd/vec.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ impl<'self, T> Iterator<&'self [T]> for WindowIter<'self, T> {
468468
/// elements at a time).
469469
///
470470
/// When the vector len is not evenly divided by the chunk size,
471-
/// the last slice of the iteration will be the remainer.
471+
/// the last slice of the iteration will be the remainder.
472472
#[deriving(Clone)]
473473
pub struct ChunkIter<'self, T> {
474474
priv v: &'self [T],
@@ -1930,7 +1930,7 @@ pub mod raw {
19301930
* Sets the length of a vector
19311931
*
19321932
* This will explicitly set the size of the vector, without actually
1933-
* modifing its buffers, so it is up to the caller to ensure that
1933+
* modifying its buffers, so it is up to the caller to ensure that
19341934
* the vector is actually the specified size.
19351935
*/
19361936
#[inline]

0 commit comments

Comments
 (0)