Skip to content

Commit ca95e7f

Browse files
committed
auto merge of rust-lang#6345 : seanmoon/rust/fix-typos, r=sanxiyn
Hi there, Really enjoying Rust. Noticed a few typos so I searched around for a few more--here's some fixes. Ran `make check` and got `summary of 24 test runs: 4868 passed; 0 failed; 330 ignored`. Thanks! Sean
2 parents 5617916 + bd4ee7c commit ca95e7f

27 files changed

+35
-35
lines changed

src/compiletest/runtest.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -764,7 +764,7 @@ fn _arm_exec_compiled_test(config: config, props: TestProps,
764764
logv(config, fmt!("executing (%s) %s", config.target, cmdline));
765765
766766
// adb shell dose not forward stdout and stderr of internal result
767-
// to stdout and stderr seperately but to stdout only
767+
// to stdout and stderr separately but to stdout only
768768
let mut newargs_out = ~[];
769769
let mut newargs_err = ~[];
770770
let subargs = args.args;

src/libcore/at_vec.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ pub fn capacity<T>(v: @[T]) -> uint {
5252
* # Arguments
5353
*
5454
* * size - An initial size of the vector to reserve
55-
* * builder - A function that will construct the vector. It recieves
55+
* * builder - A function that will construct the vector. It receives
5656
* as an argument a function that will push an element
5757
* onto the vector being constructed.
5858
*/
@@ -70,7 +70,7 @@ pub fn build_sized<A>(size: uint, builder: &fn(push: &fn(v: A))) -> @[A] {
7070
*
7171
* # Arguments
7272
*
73-
* * builder - A function that will construct the vector. It recieves
73+
* * builder - A function that will construct the vector. It receives
7474
* as an argument a function that will push an element
7575
* onto the vector being constructed.
7676
*/
@@ -87,7 +87,7 @@ pub fn build<A>(builder: &fn(push: &fn(v: A))) -> @[A] {
8787
* # Arguments
8888
*
8989
* * size - An option, maybe containing initial size of the vector to reserve
90-
* * builder - A function that will construct the vector. It recieves
90+
* * builder - A function that will construct the vector. It receives
9191
* as an argument a function that will push an element
9292
* onto the vector being constructed.
9393
*/

src/libcore/rt/io/extensions.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
//! Utility mixins that apply to all Readers and Writers
1212
1313
// XXX: Not sure how this should be structured
14-
// XXX: Iteration should probably be considered seperately
14+
// XXX: Iteration should probably be considered separately
1515

1616
pub trait ReaderUtil {
1717

src/libcore/task/local_data_priv.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ unsafe fn get_newsched_local_map(local: *mut LocalStorage) -> TaskLocalMap {
133133

134134
unsafe fn key_to_key_value<T: 'static>(key: LocalDataKey<T>) -> *libc::c_void {
135135
// Keys are closures, which are (fnptr,envptr) pairs. Use fnptr.
136-
// Use reintepret_cast -- transmute would leak (forget) the closure.
136+
// Use reinterpret_cast -- transmute would leak (forget) the closure.
137137
let pair: (*libc::c_void, *libc::c_void) = cast::transmute_copy(&key);
138138
pair.first()
139139
}

src/libcore/vec.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ pub fn build<A>(builder: &fn(push: &fn(v: A))) -> ~[A] {
219219
* # Arguments
220220
*
221221
* * size - An option, maybe containing initial size of the vector to reserve
222-
* * builder - A function that will construct the vector. It recieves
222+
* * builder - A function that will construct the vector. It receives
223223
* as an argument a function that will push an element
224224
* onto the vector being constructed.
225225
*/

src/librustc/middle/trans/machine.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ pub fn nonzero_llsize_of(cx: @CrateContext, t: TypeRef) -> ValueRef {
8787
}
8888

8989
// Returns the preferred alignment of the given type for the current target.
90-
// The preffered alignment may be larger than the alignment used when
90+
// The preferred alignment may be larger than the alignment used when
9191
// packing the type into structs. This will be used for things like
9292
// allocations inside a stack frame, which LLVM has a free hand in.
9393
pub fn llalign_of_pref(cx: @CrateContext, t: TypeRef) -> uint {
@@ -96,7 +96,7 @@ pub fn llalign_of_pref(cx: @CrateContext, t: TypeRef) -> uint {
9696
}
9797
}
9898

99-
// Returns the minimum alignment of a type required by the plattform.
99+
// Returns the minimum alignment of a type required by the platform.
100100
// This is the alignment that will be used for struct fields, arrays,
101101
// and similar ABI-mandated things.
102102
pub fn llalign_of_min(cx: @CrateContext, t: TypeRef) -> uint {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ use syntax::print::pprust::expr_to_str;
3131
use syntax::visit;
3232

3333
// vtable resolution looks for places where trait bounds are
34-
// subsituted in and figures out which vtable is used. There is some
34+
// substituted in and figures out which vtable is used. There is some
3535
// extra complication thrown in to support early "opportunistic"
3636
// vtable resolution. This is a hacky mechanism that is invoked while
3737
// typechecking function calls (after typechecking non-closure

src/libstd/arena.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
// calling the destructors on them.
2121
// One subtle point that needs to be addressed is how to handle
2222
// failures while running the user provided initializer function. It
23-
// is important to not run the destructor on uninitalized objects, but
23+
// is important to not run the destructor on uninitialized objects, but
2424
// how to detect them is somewhat subtle. Since alloc() can be invoked
2525
// recursively, it is not sufficient to simply exclude the most recent
2626
// object. To solve this without requiring extra space, we use the low

src/libstd/flatpipes.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ or transformed to and from, byte vectors.
1515
1616
The `FlatPort` and `FlatChan` types implement the generic channel and
1717
port interface for arbitrary types and transport strategies. It can
18-
particularly be used to send and recieve serializable types over I/O
18+
particularly be used to send and receive serializable types over I/O
1919
streams.
2020
2121
`FlatPort` and `FlatChan` implement the same comm traits as pipe-based
@@ -55,7 +55,7 @@ use core::sys::size_of;
5555
use core::vec;
5656

5757
/**
58-
A FlatPort, consisting of a `BytePort` that recieves byte vectors,
58+
A FlatPort, consisting of a `BytePort` that receives byte vectors,
5959
and an `Unflattener` that converts the bytes to a value.
6060
6161
Create using the constructors in the `serial` and `pod` modules.
@@ -821,7 +821,7 @@ mod test {
821821
}
822822
}
823823
824-
// Reciever task
824+
// Receiver task
825825
do task::spawn || {
826826
// Wait for a connection
827827
let (conn, res_chan) = accept_port.recv();
@@ -840,7 +840,7 @@ mod test {
840840
841841
for int::range(0, 10) |i| {
842842
let j = port.recv();
843-
debug!("receieved %?", j);
843+
debug!("received %?", j);
844844
assert!(i == j);
845845
}
846846

src/libstd/getopts.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,7 @@ pub mod groups {
623623
desc_sep
624624
};
625625
626-
// Normalize desc to contain words seperated by one space character
626+
// Normalize desc to contain words separated by one space character
627627
let mut desc_normalized_whitespace = ~"";
628628
for str::each_word(desc) |word| {
629629
desc_normalized_whitespace.push_str(word);

src/libstd/net_ip.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ mod test {
420420
if result::is_err(&ga_result) {
421421
fail!(~"got err result from net::ip::get_addr();")
422422
}
423-
// note really sure how to realiably test/assert
423+
// note really sure how to reliably test/assert
424424
// this.. mostly just wanting to see it work, atm.
425425
let results = result::unwrap(ga_result);
426426
debug!("test_get_addr: Number of results for %s: %?",

src/libstd/rope.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,7 @@ pub mod node {
565565
*
566566
* # Fields
567567
*
568-
* * byte_offset = The number of bytes skippen in `content`
568+
* * byte_offset = The number of bytes skipped in `content`
569569
* * byte_len - The number of bytes of `content` to use
570570
* * char_len - The number of chars in the leaf.
571571
* * content - Contents of the leaf.

src/libstd/test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ pub mod rustrt {
3232
}
3333

3434
// The name of a test. By convention this follows the rules for rust
35-
// paths; i.e. it should be a series of identifiers seperated by double
35+
// paths; i.e. it should be a series of identifiers separated by double
3636
// colons. This way if some test runner wants to arrange the tests
3737
// hierarchically it may.
3838

src/libstd/uv_global_loop.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,6 @@ mod test {
227227
exit_po.recv();
228228
};
229229
debug!(~"test_stress_gl_uv_global_loop_high_level_global_timer"+
230-
~" exiting sucessfully!");
230+
~" exiting successfully!");
231231
}
232232
}

src/libstd/uv_iotask.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ fn impl_uv_iotask_async(iotask: &IoTask) {
243243
exit_po.recv();
244244
}
245245

246-
// this fn documents the bear minimum neccesary to roll your own
246+
// this fn documents the bear minimum necessary to roll your own
247247
// high_level_loop
248248
#[cfg(test)]
249249
fn spawn_test_loop(exit_ch: ~Chan<()>) -> IoTask {

src/libstd/uv_ll.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ pub struct sockaddr_in {
269269
}
270270

271271
// unix size: 28 .. FIXME #1645
272-
// stuck with 32 becuse of rust padding structs?
272+
// stuck with 32 because of rust padding structs?
273273
#[cfg(target_arch="x86_64")]
274274
pub struct sockaddr_in6 {
275275
a0: *u8, a1: *u8,
@@ -286,7 +286,7 @@ pub struct sockaddr_in6 {
286286
}
287287

288288
// unix size: 28 .. FIXME #1645
289-
// stuck with 32 becuse of rust padding structs?
289+
// stuck with 32 because of rust padding structs?
290290
pub type addr_in = addr_in_impl::addr_in;
291291
#[cfg(unix)]
292292
pub mod addr_in_impl {
@@ -1377,7 +1377,7 @@ mod test {
13771377
let tcp_init_result = tcp_init(test_loop as *libc::c_void,
13781378
tcp_handle_ptr);
13791379
if (tcp_init_result == 0) {
1380-
debug!(~"sucessful tcp_init_result");
1380+
debug!(~"successful tcp_init_result");
13811381
13821382
debug!(~"building addr...");
13831383
let addr = ip4_addr(ip, port);

src/libsyntax/ext/quote.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,7 @@ fn expand_tts(cx: @ext_ctxt,
697697
// compiler (which we don't really want to do) and, in any case, only
698698
// pushed the problem a very small step further back: an error
699699
// resulting from a parse of the resulting quote is still attributed to
700-
// the site the string literal occured, which was in a source file
700+
// the site the string literal occurred, which was in a source file
701701
// _other_ than the one the user has control over. For example, an
702702
// error in a quote from the protocol compiler, invoked in user code
703703
// using proto! for example, will be attributed to the pipec.rs file in

src/rt/rust_log.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
*/
2525
static lock_and_signal _log_lock;
2626
/**
27-
* Indicates whether we are outputing to the console.
27+
* Indicates whether we are outputting to the console.
2828
* Protected by _log_lock;
2929
*/
3030
static bool _log_to_console = true;

src/rt/rust_signal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#ifndef RUST_SIGNAL_H
1212
#define RUST_SIGNAL_H
1313

14-
// Just an abstrict class that reperesents something that can be signalled
14+
// Just an abstract class that represents something that can be signalled
1515
class rust_signal {
1616
public:
1717
virtual void signal() = 0;

src/test/compile-fail/borrowck-lend-flow-match.rs

Lines changed: 1 addition & 1 deletion
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-
// xfail-pretty -- comments are infaithfully preserved
11+
// xfail-pretty -- comments are unfaithfully preserved
1212

1313
#[allow(unused_variable)];
1414
#[allow(dead_assignment)];

src/test/compile-fail/borrowck-pat-reassign-binding.rs

Lines changed: 1 addition & 1 deletion
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-
// xfail-pretty -- comments are infaithfully preserved
11+
// xfail-pretty -- comments are unfaithfully preserved
1212

1313
fn main() {
1414
let mut x: Option<int> = None;

src/test/compile-fail/issue-1448-2.rs

Lines changed: 1 addition & 1 deletion
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-
// Regresion test for issue #1448 and #1386
11+
// Regression test for issue #1448 and #1386
1212

1313
fn main() {
1414
debug!("%u", 10i); //~ ERROR mismatched types

src/test/compile-fail/issue-4935.rs

Lines changed: 1 addition & 1 deletion
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-
// Regresion test for issue #4935
11+
// Regression test for issue #4935
1212

1313
fn foo(a: uint) {}
1414
fn main() { foo(5, 6) } //~ ERROR this function takes 1 parameter but 2 parameters were supplied

src/test/run-fail/too-much-recursion-unwinding.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// xfail-test leaks
1212
// error-pattern:ran out of stack
1313

14-
// Test that the task fails after hiting the recursion limit
14+
// Test that the task fails after hitting the recursion limit
1515
// during unwinding
1616

1717
fn recurse() {

src/test/run-pass/extern-pass-TwoU64s.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
// xfail-fast This works standalone on windows but not with check-fast.
1515
// possibly because there is another test that uses this extern fn but gives it
16-
// a diferent signature
16+
// a different signature
1717

1818
#[deriving(Eq)]
1919
struct TwoU64s {

src/test/run-pass/issue-2989.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ impl methods for () {
2121
}
2222

2323
// the position of this function is significant! - if it comes before methods
24-
// then it works, if it comes after it then it doesnt!
24+
// then it works, if it comes after it then it doesn't!
2525
fn to_bools(bitv: Storage) -> ~[bool] {
2626
vec::from_fn(8, |i| {
2727
let w = i / 64;

src/test/run-pass/while-cont.rs

Lines changed: 1 addition & 1 deletion
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-
// Issue #825: Should recheck the loop contition after continuing
11+
// Issue #825: Should recheck the loop condition after continuing
1212
pub fn main() {
1313
let mut i = 1;
1414
while i > 0 {

0 commit comments

Comments
 (0)