Skip to content

Commit 3bc6858

Browse files
committed
auto merge of #8551 : huonw/rust/speling, r=alexcrichton
(This doesn't add/remove `u`s or change `ize` to `ise`, or anything like that.)
2 parents 6009011 + 6440343 commit 3bc6858

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+80
-79
lines changed

doc/rust.md

+3-3
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/etc/cmathconsts.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#include <math.h>
1414
#include <stdio.h>
1515

16-
// must match core::ctypes
16+
// must match std::ctypes
1717

1818
#define C_FLT(x) (float)x
1919
#define C_DBL(x) (double)x

src/etc/ziggurat_tables.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# xfail-license
33

44
# This creates the tables used for distributions implemented using the
5-
# ziggurat algorithm in `core::rand::distributions;`. They are
5+
# ziggurat algorithm in `std::rand::distributions;`. They are
66
# (basically) the tables as used in the ZIGNOR variant (Doornik 2005).
77
# They are changed rarely, so the generated file should be checked in
88
# to git.

src/etc/zsh/_rust

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ _rustc_opts_lint=(
3636
'path-statement[path statements with no effect]'
3737
'missing-trait-doc[detects missing documentation for traits]'
3838
'missing-struct-doc[detects missing documentation for structs]'
39-
'ctypes[proper use of core::libc types in foreign modules]'
39+
'ctypes[proper use of std::libc types in foreign modules]'
4040
"unused-mut[detect mut variables which don't need to be mutable]"
4141
'unused-imports[imports that are never used]'
4242
'heap-memory[use of any (~ type or @ type) heap memory]'

src/libextra/crypto/cryptoutil.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ pub fn add_bytes_to_bits_tuple
176176
/// method that modifies the buffer directory or provides the caller with bytes that can be modifies
177177
/// results in those bytes being marked as used by the buffer.
178178
pub trait FixedBuffer {
179-
/// Input a vector of bytes. If the buffer becomes full, proccess it with the provided
179+
/// Input a vector of bytes. If the buffer becomes full, process it with the provided
180180
/// function and then clear the buffer.
181181
fn input(&mut self, input: &[u8], func: &fn(&[u8]));
182182

src/libextra/crypto/digest.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -47,18 +47,18 @@ pub trait Digest {
4747
fn output_bits(&self) -> uint;
4848

4949
/**
50-
* Convenience functon that feeds a string into a digest
50+
* Convenience function that feeds a string into a digest.
5151
*
5252
* # Arguments
5353
*
54-
* * in The string to feed into the digest
54+
* * `input` The string to feed into the digest
5555
*/
5656
fn input_str(&mut self, input: &str) {
5757
self.input(input.as_bytes());
5858
}
5959

6060
/**
61-
* Convenience functon that retrieves the result of a digest as a
61+
* Convenience function that retrieves the result of a digest as a
6262
* ~str in hexadecimal format.
6363
*/
6464
fn result_str(&mut self) -> ~str {

src/libextra/enum_set.rs

+1-1
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/fileinput.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ impl FileInput {
156156
/**
157157
Create a `FileInput` object from a vec of files. An empty
158158
vec means lines are read from `stdin` (use `from_vec_raw` to stop
159-
this behaviour). Any occurence of `None` represents `stdin`.
159+
this behaviour). Any occurrence of `None` represents `stdin`.
160160
*/
161161
pub fn from_vec(files: ~[Option<Path>]) -> FileInput {
162162
FileInput::from_vec_raw(

src/libextra/flatpipes.rs

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

+1-1
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/libextra/term.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ impl Terminal {
157157
/// If the color is a bright color, but the terminal only supports 8 colors,
158158
/// the corresponding normal color will be used instead.
159159
///
160-
/// Rturns true if the color was set, false otherwise.
160+
/// Returns true if the color was set, false otherwise.
161161
pub fn bg(&self, color: color::Color) -> bool {
162162
let color = self.dim_if_necessary(color);
163163
if self.num_colors > color {

src/libstd/at_vec.rs

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

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

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

+1-1
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/io.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -1029,9 +1029,9 @@ pub fn FILE_reader(f: *libc::FILE, cleanup: bool) -> @Reader {
10291029
* # Example
10301030
*
10311031
* ~~~ {.rust}
1032-
* let stdin = core::io::stdin();
1032+
* let stdin = std::io::stdin();
10331033
* let line = stdin.read_line();
1034-
* core::io::print(line);
1034+
* std::io::print(line);
10351035
* ~~~
10361036
*/
10371037
pub fn stdin() -> @Reader {
@@ -1462,7 +1462,7 @@ pub trait WriterUtil {
14621462
/// (8 bytes).
14631463
fn write_le_f64(&self, f: f64);
14641464

1465-
/// Write a litten-endian IEEE754 single-precision floating-point
1465+
/// Write a little-endian IEEE754 single-precision floating-point
14661466
/// (4 bytes).
14671467
fn write_le_f32(&self, f: f32);
14681468

@@ -1598,7 +1598,7 @@ pub fn buffered_file_writer(path: &Path) -> Result<@Writer, ~str> {
15981598
* # Example
15991599
*
16001600
* ~~~ {.rust}
1601-
* let stdout = core::io::stdout();
1601+
* let stdout = std::io::stdout();
16021602
* stdout.write_str("hello\n");
16031603
* ~~~
16041604
*/
@@ -1610,7 +1610,7 @@ pub fn stdout() -> @Writer { fd_writer(libc::STDOUT_FILENO as c_int, false) }
16101610
* # Example
16111611
*
16121612
* ~~~ {.rust}
1613-
* let stderr = core::io::stderr();
1613+
* let stderr = std::io::stderr();
16141614
* stderr.write_str("hello\n");
16151615
* ~~~
16161616
*/

src/libstd/iterator.rs

+5-3
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,8 @@ pub trait Iterator<A> {
511511
i
512512
}
513513

514-
/// Return the element that gives the maximum value from the specfied function
514+
/// Return the element that gives the maximum value from the
515+
/// specified function.
515516
///
516517
/// # Example
517518
///
@@ -534,7 +535,8 @@ pub trait Iterator<A> {
534535
}).map_move(|(x, _)| x)
535536
}
536537

537-
/// Return the element that gives the minimum value from the specfied function
538+
/// Return the element that gives the minimum value from the
539+
/// specified function.
538540
///
539541
/// # Example
540542
///
@@ -1541,7 +1543,7 @@ pub struct Repeat<A> {
15411543
}
15421544

15431545
impl<A: Clone> Repeat<A> {
1544-
/// Create a new `Repeat` that enlessly repeats the element `elt`.
1546+
/// Create a new `Repeat` that endlessly repeats the element `elt`.
15451547
#[inline]
15461548
pub fn new(elt: A) -> Repeat<A> {
15471549
Repeat{element: elt}

src/libstd/num/f32.rs

+1-1
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/os.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ pub fn pipe() -> Pipe {
411411
// inheritance has to be handled in a different way that I do not
412412
// fully understand. Here we explicitly make the pipe non-inheritable,
413413
// which means to pass it to a subprocess they need to be duplicated
414-
// first, as in core::run.
414+
// first, as in std::run.
415415
let mut fds = Pipe {input: 0 as c_int,
416416
out: 0 as c_int };
417417
let res = libc::pipe(&mut fds.input, 1024 as ::libc::c_uint,

src/libstd/ptr.rs

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

+1-1
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/rand/distributions.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ fn ziggurat<R:Rng>(rng: &mut R,
6666
/// # Example
6767
///
6868
/// ~~~
69-
/// use core::rand::distributions::StandardNormal;
69+
/// use std::rand::distributions::StandardNormal;
7070
///
7171
/// fn main() {
7272
/// let normal = 2.0 + (*rand::random::<StandardNormal>()) * 3.0;
@@ -120,7 +120,7 @@ impl Rand for StandardNormal {
120120
/// # Example
121121
///
122122
/// ~~~
123-
/// use core::rand::distributions::Exp1;
123+
/// use std::rand::distributions::Exp1;
124124
///
125125
/// fn main() {
126126
/// let exp2 = (*rand::random::<Exp1>()) * 0.5;

src/libstd/result.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ use str::StrSlice;
2424

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

src/libstd/rt/io/extensions.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ pub trait WriterByteConversions {
262262
/// (8 bytes).
263263
fn write_le_f64(&mut self, f: f64);
264264

265-
/// Write a litten-endian IEEE754 single-precision floating-point
265+
/// Write a little-endian IEEE754 single-precision floating-point
266266
/// (4 bytes).
267267
fn write_le_f32(&mut self, f: f32);
268268

src/libstd/rt/io/mod.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ file, TCP, UDP, Unix domain sockets.
1919
Readers and Writers may be composed to add capabilities like string
2020
parsing, encoding, and compression.
2121
22-
This will likely live in core::io, not core::rt::io.
22+
This will likely live in std::io, not std::rt::io.
2323
2424
# Examples
2525
@@ -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
@@ -430,7 +430,7 @@ pub trait Reader {
430430
/// println(reader.read_line());
431431
/// }
432432
///
433-
/// # Failue
433+
/// # Failure
434434
///
435435
/// Returns `true` on failure.
436436
fn eof(&mut self) -> bool;

src/libstd/rt/mod.rs

+12-12
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,17 @@ out of `rt` as development proceeds.
4040
4141
Several modules in `core` are clients of `rt`:
4242
43-
* `core::task` - The user-facing interface to the Rust task model.
44-
* `core::task::local_data` - The interface to local data.
45-
* `core::gc` - The garbage collector.
46-
* `core::unstable::lang` - Miscellaneous lang items, some of which rely on `core::rt`.
47-
* `core::condition` - Uses local data.
48-
* `core::cleanup` - Local heap destruction.
49-
* `core::io` - In the future `core::io` will use an `rt` implementation.
50-
* `core::logging`
51-
* `core::pipes`
52-
* `core::comm`
53-
* `core::stackwalk`
43+
* `std::task` - The user-facing interface to the Rust task model.
44+
* `std::task::local_data` - The interface to local data.
45+
* `std::gc` - The garbage collector.
46+
* `std::unstable::lang` - Miscellaneous lang items, some of which rely on `std::rt`.
47+
* `std::condition` - Uses local data.
48+
* `std::cleanup` - Local heap destruction.
49+
* `std::io` - In the future `std::io` will use an `rt` implementation.
50+
* `std::logging`
51+
* `std::pipes`
52+
* `std::comm`
53+
* `std::stackwalk`
5454
5555
*/
5656

@@ -139,7 +139,7 @@ pub mod rc;
139139
/// scheduler and task context
140140
pub mod tube;
141141

142-
/// Simple reimplementation of core::comm
142+
/// Simple reimplementation of std::comm
143143
pub mod comm;
144144

145145
mod select;

0 commit comments

Comments
 (0)