From abe94f9b4d0d072e2477b989715c6c79e97de259 Mon Sep 17 00:00:00 2001 From: Huon Wilson Date: Fri, 16 Aug 2013 15:41:28 +1000 Subject: doc: correct spelling in documentation. --- src/libstd/rt/io/mod.rs | 6 +++--- src/libstd/rt/task.rs | 3 +-- src/libstd/rt/uv/uvll.rs | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) (limited to 'src/libstd/rt') diff --git a/src/libstd/rt/io/mod.rs b/src/libstd/rt/io/mod.rs index c980dc9d73e..78c4cec2d4c 100644 --- a/src/libstd/rt/io/mod.rs +++ b/src/libstd/rt/io/mod.rs @@ -93,7 +93,7 @@ Asynchronous interfaces are most often associated with the callback (continuation-passing) style popularised by node.js. Such systems rely on all computations being run inside an event loop which maintains a list of all pending I/O events; when one completes the registered -callback is run and the code that made the I/O request continiues. +callback is run and the code that made the I/O request continues. Such interfaces achieve non-blocking at the expense of being more difficult to reason about. @@ -136,7 +136,7 @@ Rust's I/O employs a combination of techniques to reduce boilerplate while still providing feedback about errors. The basic strategy: * Errors are fatal by default, resulting in task failure -* Errors raise the `io_error` conditon which provides an opportunity to inspect +* Errors raise the `io_error` condition which provides an opportunity to inspect an IoError object containing details. * Return values must have a sensible null or zero value which is returned 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 * XXX: How should we use condition handlers that return values? * XXX: Should EOF raise default conditions when EOF is not an error? -# Issues withi/o scheduler affinity, work stealing, task pinning +# Issues with i/o scheduler affinity, work stealing, task pinning # Resource management diff --git a/src/libstd/rt/task.rs b/src/libstd/rt/task.rs index 708166518bb..01a8882e4f9 100644 --- a/src/libstd/rt/task.rs +++ b/src/libstd/rt/task.rs @@ -69,7 +69,7 @@ pub struct Coroutine { saved_context: Context } -/// Some tasks have a deciated home scheduler that they must run on. +/// Some tasks have a dedicated home scheduler that they must run on. pub enum SchedHome { AnySched, Sched(SchedHandle) @@ -592,4 +592,3 @@ mod test { } } } - diff --git a/src/libstd/rt/uv/uvll.rs b/src/libstd/rt/uv/uvll.rs index e240395a495..d892fc8024f 100644 --- a/src/libstd/rt/uv/uvll.rs +++ b/src/libstd/rt/uv/uvll.rs @@ -23,7 +23,7 @@ * There are also a collection of helper functions to ease interacting * with the low-level API. * - * As new functionality, existant in uv.h, is added to the rust stdlib, + * As new functionality, existent in uv.h, is added to the rust stdlib, * the mappings should be added in this module. */ -- cgit 1.4.1-3-g733a5 From 72fd02d93985bc9be359d736eec0484cb51a8b3f Mon Sep 17 00:00:00 2001 From: Huon Wilson Date: Fri, 16 Aug 2013 15:54:14 +1000 Subject: doc: convert remaining uses of core:: to std::. --- src/etc/cmathconsts.c | 2 +- src/etc/ziggurat_tables.py | 2 +- src/etc/zsh/_rust | 2 +- src/libstd/io.rs | 8 ++++---- src/libstd/os.rs | 2 +- src/libstd/rand/distributions.rs | 4 ++-- src/libstd/rt/io/mod.rs | 2 +- src/libstd/rt/mod.rs | 24 ++++++++++++------------ src/libstd/rt/uv/mod.rs | 2 +- src/libsyntax/ast.rs | 6 +++--- src/rt/rust_log.cpp | 2 +- src/test/compile-fail/issue-5543.rs | 4 ++-- 12 files changed, 30 insertions(+), 30 deletions(-) (limited to 'src/libstd/rt') diff --git a/src/etc/cmathconsts.c b/src/etc/cmathconsts.c index 7a7f13a7e97..21b1b377afa 100644 --- a/src/etc/cmathconsts.c +++ b/src/etc/cmathconsts.c @@ -13,7 +13,7 @@ #include #include -// must match core::ctypes +// must match std::ctypes #define C_FLT(x) (float)x #define C_DBL(x) (double)x diff --git a/src/etc/ziggurat_tables.py b/src/etc/ziggurat_tables.py index c8f873037d8..51c0da39bd5 100755 --- a/src/etc/ziggurat_tables.py +++ b/src/etc/ziggurat_tables.py @@ -2,7 +2,7 @@ # xfail-license # This creates the tables used for distributions implemented using the -# ziggurat algorithm in `core::rand::distributions;`. They are +# ziggurat algorithm in `std::rand::distributions;`. They are # (basically) the tables as used in the ZIGNOR variant (Doornik 2005). # They are changed rarely, so the generated file should be checked in # to git. diff --git a/src/etc/zsh/_rust b/src/etc/zsh/_rust index 7320eced7e1..3d0163d9e25 100644 --- a/src/etc/zsh/_rust +++ b/src/etc/zsh/_rust @@ -36,7 +36,7 @@ _rustc_opts_lint=( 'path-statement[path statements with no effect]' 'missing-trait-doc[detects missing documentation for traits]' 'missing-struct-doc[detects missing documentation for structs]' - 'ctypes[proper use of core::libc types in foreign modules]' + 'ctypes[proper use of std::libc types in foreign modules]' "unused-mut[detect mut variables which don't need to be mutable]" 'unused-imports[imports that are never used]' 'heap-memory[use of any (~ type or @ type) heap memory]' diff --git a/src/libstd/io.rs b/src/libstd/io.rs index 2c18bd272e8..0df575b7f41 100644 --- a/src/libstd/io.rs +++ b/src/libstd/io.rs @@ -1029,9 +1029,9 @@ pub fn FILE_reader(f: *libc::FILE, cleanup: bool) -> @Reader { * # Example * * ~~~ {.rust} -* let stdin = core::io::stdin(); +* let stdin = std::io::stdin(); * let line = stdin.read_line(); -* core::io::print(line); +* std::io::print(line); * ~~~ */ pub fn stdin() -> @Reader { @@ -1598,7 +1598,7 @@ pub fn buffered_file_writer(path: &Path) -> Result<@Writer, ~str> { * # Example * * ~~~ {.rust} -* let stdout = core::io::stdout(); +* let stdout = std::io::stdout(); * stdout.write_str("hello\n"); * ~~~ */ @@ -1610,7 +1610,7 @@ pub fn stdout() -> @Writer { fd_writer(libc::STDOUT_FILENO as c_int, false) } * # Example * * ~~~ {.rust} -* let stderr = core::io::stderr(); +* let stderr = std::io::stderr(); * stderr.write_str("hello\n"); * ~~~ */ diff --git a/src/libstd/os.rs b/src/libstd/os.rs index c916be79c53..53c5d255f1c 100644 --- a/src/libstd/os.rs +++ b/src/libstd/os.rs @@ -411,7 +411,7 @@ pub fn pipe() -> Pipe { // inheritance has to be handled in a different way that I do not // fully understand. Here we explicitly make the pipe non-inheritable, // which means to pass it to a subprocess they need to be duplicated - // first, as in core::run. + // first, as in std::run. let mut fds = Pipe {input: 0 as c_int, out: 0 as c_int }; let res = libc::pipe(&mut fds.input, 1024 as ::libc::c_uint, diff --git a/src/libstd/rand/distributions.rs b/src/libstd/rand/distributions.rs index 56eae042875..67be7986c33 100644 --- a/src/libstd/rand/distributions.rs +++ b/src/libstd/rand/distributions.rs @@ -66,7 +66,7 @@ fn ziggurat(rng: &mut R, /// # Example /// /// ~~~ -/// use core::rand::distributions::StandardNormal; +/// use std::rand::distributions::StandardNormal; /// /// fn main() { /// let normal = 2.0 + (*rand::random::()) * 3.0; @@ -120,7 +120,7 @@ impl Rand for StandardNormal { /// # Example /// /// ~~~ -/// use core::rand::distributions::Exp1; +/// use std::rand::distributions::Exp1; /// /// fn main() { /// let exp2 = (*rand::random::()) * 0.5; diff --git a/src/libstd/rt/io/mod.rs b/src/libstd/rt/io/mod.rs index 78c4cec2d4c..aec9168b5d1 100644 --- a/src/libstd/rt/io/mod.rs +++ b/src/libstd/rt/io/mod.rs @@ -19,7 +19,7 @@ file, TCP, UDP, Unix domain sockets. Readers and Writers may be composed to add capabilities like string parsing, encoding, and compression. -This will likely live in core::io, not core::rt::io. +This will likely live in std::io, not std::rt::io. # Examples diff --git a/src/libstd/rt/mod.rs b/src/libstd/rt/mod.rs index 65214d0cea7..58e86f97f71 100644 --- a/src/libstd/rt/mod.rs +++ b/src/libstd/rt/mod.rs @@ -40,17 +40,17 @@ out of `rt` as development proceeds. Several modules in `core` are clients of `rt`: -* `core::task` - The user-facing interface to the Rust task model. -* `core::task::local_data` - The interface to local data. -* `core::gc` - The garbage collector. -* `core::unstable::lang` - Miscellaneous lang items, some of which rely on `core::rt`. -* `core::condition` - Uses local data. -* `core::cleanup` - Local heap destruction. -* `core::io` - In the future `core::io` will use an `rt` implementation. -* `core::logging` -* `core::pipes` -* `core::comm` -* `core::stackwalk` +* `std::task` - The user-facing interface to the Rust task model. +* `std::task::local_data` - The interface to local data. +* `std::gc` - The garbage collector. +* `std::unstable::lang` - Miscellaneous lang items, some of which rely on `std::rt`. +* `std::condition` - Uses local data. +* `std::cleanup` - Local heap destruction. +* `std::io` - In the future `std::io` will use an `rt` implementation. +* `std::logging` +* `std::pipes` +* `std::comm` +* `std::stackwalk` */ @@ -139,7 +139,7 @@ pub mod rc; /// scheduler and task context pub mod tube; -/// Simple reimplementation of core::comm +/// Simple reimplementation of std::comm pub mod comm; mod select; diff --git a/src/libstd/rt/uv/mod.rs b/src/libstd/rt/uv/mod.rs index 6c5a28b31b1..59833a16ed8 100644 --- a/src/libstd/rt/uv/mod.rs +++ b/src/libstd/rt/uv/mod.rs @@ -10,7 +10,7 @@ /*! -Bindings to libuv, along with the default implementation of `core::rt::rtio`. +Bindings to libuv, along with the default implementation of `std::rt::rtio`. UV types consist of the event loop (Loop), Watchers, Requests and Callbacks. diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs index 17247222c3f..b01c19a59c1 100644 --- a/src/libsyntax/ast.rs +++ b/src/libsyntax/ast.rs @@ -100,7 +100,7 @@ pub struct Lifetime { } // a "Path" is essentially Rust's notion of a name; -// for instance: core::cmp::Eq . It's represented +// for instance: std::cmp::Eq . It's represented // as a sequence of identifiers, along with a bunch // of supporting information. #[deriving(Clone, Eq, Encodable, Decodable, IterBytes)] @@ -1093,8 +1093,8 @@ pub enum inlined_item { /* hold off on tests ... they appear in a later merge. #[cfg(test)] mod test { - use core::option::{None, Option, Some}; - use core::uint; + use std::option::{None, Option, Some}; + use std::uint; use extra; use codemap::*; use super::*; diff --git a/src/rt/rust_log.cpp b/src/rt/rust_log.cpp index 25b246c69f5..127a1b57a21 100644 --- a/src/rt/rust_log.cpp +++ b/src/rt/rust_log.cpp @@ -31,7 +31,7 @@ const size_t default_log_level = log_err; // This is a rather ugly parser for strings in the form // "crate1,crate2.mod3,crate3.x=1". Log levels are 0-255, -// with the most likely ones being 0-3 (defined in core::). +// with the most likely ones being 0-3 (defined in std::). size_t parse_logging_spec(char* spec, log_directive* dirs) { size_t dir = 0; while (dir < max_log_directives && *spec) { diff --git a/src/test/compile-fail/issue-5543.rs b/src/test/compile-fail/issue-5543.rs index cad47eff013..c2b15c2fd1b 100644 --- a/src/test/compile-fail/issue-5543.rs +++ b/src/test/compile-fail/issue-5543.rs @@ -9,8 +9,8 @@ // except according to those terms. // xfail-test -use core::io::ReaderUtil; -use core::io::Reader; +use std::io::ReaderUtil; +use std::io::Reader; fn bar(r:@ReaderUtil) -> ~str { r.read_line() } -- cgit 1.4.1-3-g733a5 From 6440343a6c26fca12ef2e323fa7738dce9da1986 Mon Sep 17 00:00:00 2001 From: Huon Wilson Date: Sun, 18 Aug 2013 08:28:04 +1000 Subject: More spelling corrections. --- src/libextra/crypto/cryptoutil.rs | 2 +- src/libextra/crypto/digest.rs | 6 +++--- src/libextra/fileinput.rs | 2 +- src/libextra/term.rs | 2 +- src/libstd/io.rs | 2 +- src/libstd/iterator.rs | 8 +++++--- src/libstd/rt/io/extensions.rs | 2 +- src/libstd/rt/io/mod.rs | 2 +- src/libstd/to_str.rs | 2 +- 9 files changed, 15 insertions(+), 13 deletions(-) (limited to 'src/libstd/rt') diff --git a/src/libextra/crypto/cryptoutil.rs b/src/libextra/crypto/cryptoutil.rs index 43e3b5c89af..30159d3dc5d 100644 --- a/src/libextra/crypto/cryptoutil.rs +++ b/src/libextra/crypto/cryptoutil.rs @@ -125,7 +125,7 @@ pub fn shift_add_check_overflow_tuple /// method that modifies the buffer directory or provides the caller with bytes that can be modifies /// results in those bytes being marked as used by the buffer. pub trait FixedBuffer { - /// Input a vector of bytes. If the buffer becomes full, proccess it with the provided + /// Input a vector of bytes. If the buffer becomes full, process it with the provided /// function and then clear the buffer. fn input(&mut self, input: &[u8], func: &fn(&[u8])); diff --git a/src/libextra/crypto/digest.rs b/src/libextra/crypto/digest.rs index 217f5b0a417..c7f228af332 100644 --- a/src/libextra/crypto/digest.rs +++ b/src/libextra/crypto/digest.rs @@ -47,18 +47,18 @@ pub trait Digest { fn output_bits(&self) -> uint; /** - * Convenience functon that feeds a string into a digest + * Convenience function that feeds a string into a digest. * * # Arguments * - * * in The string to feed into the digest + * * `input` The string to feed into the digest */ fn input_str(&mut self, input: &str) { self.input(input.as_bytes()); } /** - * Convenience functon that retrieves the result of a digest as a + * Convenience function that retrieves the result of a digest as a * ~str in hexadecimal format. */ fn result_str(&mut self) -> ~str { diff --git a/src/libextra/fileinput.rs b/src/libextra/fileinput.rs index e268e83bf3f..3b4fad3eaa7 100644 --- a/src/libextra/fileinput.rs +++ b/src/libextra/fileinput.rs @@ -156,7 +156,7 @@ impl FileInput { /** Create a `FileInput` object from a vec of files. An empty vec means lines are read from `stdin` (use `from_vec_raw` to stop - this behaviour). Any occurence of `None` represents `stdin`. + this behaviour). Any occurrence of `None` represents `stdin`. */ pub fn from_vec(files: ~[Option]) -> FileInput { FileInput::from_vec_raw( diff --git a/src/libextra/term.rs b/src/libextra/term.rs index d0412b8954d..d8eb3cfa500 100644 --- a/src/libextra/term.rs +++ b/src/libextra/term.rs @@ -157,7 +157,7 @@ impl Terminal { /// If the color is a bright color, but the terminal only supports 8 colors, /// the corresponding normal color will be used instead. /// - /// Rturns true if the color was set, false otherwise. + /// Returns true if the color was set, false otherwise. pub fn bg(&self, color: color::Color) -> bool { let color = self.dim_if_necessary(color); if self.num_colors > color { diff --git a/src/libstd/io.rs b/src/libstd/io.rs index 0df575b7f41..0668ad3cfd8 100644 --- a/src/libstd/io.rs +++ b/src/libstd/io.rs @@ -1462,7 +1462,7 @@ pub trait WriterUtil { /// (8 bytes). fn write_le_f64(&self, f: f64); - /// Write a litten-endian IEEE754 single-precision floating-point + /// Write a little-endian IEEE754 single-precision floating-point /// (4 bytes). fn write_le_f32(&self, f: f32); diff --git a/src/libstd/iterator.rs b/src/libstd/iterator.rs index 34bbe9292a5..1d32c5df14e 100644 --- a/src/libstd/iterator.rs +++ b/src/libstd/iterator.rs @@ -511,7 +511,8 @@ pub trait Iterator { i } - /// Return the element that gives the maximum value from the specfied function + /// Return the element that gives the maximum value from the + /// specified function. /// /// # Example /// @@ -534,7 +535,8 @@ pub trait Iterator { }).map_move(|(x, _)| x) } - /// Return the element that gives the minimum value from the specfied function + /// Return the element that gives the minimum value from the + /// specified function. /// /// # Example /// @@ -1541,7 +1543,7 @@ pub struct Repeat { } impl Repeat { - /// Create a new `Repeat` that enlessly repeats the element `elt`. + /// Create a new `Repeat` that endlessly repeats the element `elt`. #[inline] pub fn new(elt: A) -> Repeat { Repeat{element: elt} diff --git a/src/libstd/rt/io/extensions.rs b/src/libstd/rt/io/extensions.rs index 2d21bf0f9dc..d136ddc0fdf 100644 --- a/src/libstd/rt/io/extensions.rs +++ b/src/libstd/rt/io/extensions.rs @@ -262,7 +262,7 @@ pub trait WriterByteConversions { /// (8 bytes). fn write_le_f64(&mut self, f: f64); - /// Write a litten-endian IEEE754 single-precision floating-point + /// Write a little-endian IEEE754 single-precision floating-point /// (4 bytes). fn write_le_f32(&mut self, f: f32); diff --git a/src/libstd/rt/io/mod.rs b/src/libstd/rt/io/mod.rs index aec9168b5d1..9ec1b699b1d 100644 --- a/src/libstd/rt/io/mod.rs +++ b/src/libstd/rt/io/mod.rs @@ -430,7 +430,7 @@ pub trait Reader { /// println(reader.read_line()); /// } /// - /// # Failue + /// # Failure /// /// Returns `true` on failure. fn eof(&mut self) -> bool; diff --git a/src/libstd/to_str.rs b/src/libstd/to_str.rs index 4649aac08b9..a8c450a0516 100644 --- a/src/libstd/to_str.rs +++ b/src/libstd/to_str.rs @@ -31,7 +31,7 @@ pub trait ToStr { /// Trait for converting a type to a string, consuming it in the process. pub trait ToStrConsume { - /// Cosume and convert to a string. + /// Consume and convert to a string. fn into_str(self) -> ~str; } -- cgit 1.4.1-3-g733a5