Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: correct spelling in documentation, convert remaining uses of core to std #8551

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions doc/rust.md
Original file line number Diff line number Diff line change
@@ -582,7 +582,7 @@ a referencing source file, or by the name of the crate itself.

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

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

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

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

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


### Vector expressions
2 changes: 1 addition & 1 deletion src/etc/cmathconsts.c
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@
#include <math.h>
#include <stdio.h>

// must match core::ctypes
// must match std::ctypes

#define C_FLT(x) (float)x
#define C_DBL(x) (double)x
2 changes: 1 addition & 1 deletion src/etc/ziggurat_tables.py
Original file line number Diff line number Diff line change
@@ -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.
2 changes: 1 addition & 1 deletion src/etc/zsh/_rust
Original file line number Diff line number Diff line change
@@ -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]'
2 changes: 1 addition & 1 deletion src/libextra/crypto/cryptoutil.rs
Original file line number Diff line number Diff line change
@@ -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]));

6 changes: 3 additions & 3 deletions src/libextra/crypto/digest.rs
Original file line number Diff line number Diff line change
@@ -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 {
2 changes: 1 addition & 1 deletion src/libextra/enum_set.rs
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@ pub struct EnumSet<E> {
priv bits: uint
}

/// An iterface for casting C-like enum to uint and back.
/// An interface for casting C-like enum to uint and back.
pub trait CLike {
/// Converts C-like enum to uint.
fn to_uint(&self) -> uint;
2 changes: 1 addition & 1 deletion src/libextra/fileinput.rs
Original file line number Diff line number Diff line change
@@ -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<Path>]) -> FileInput {
FileInput::from_vec_raw(
2 changes: 1 addition & 1 deletion src/libextra/flatpipes.rs
Original file line number Diff line number Diff line change
@@ -166,7 +166,7 @@ Constructors for flat pipes that send POD types using memcpy.

This module is currently unsafe because it uses `Clone + Send` as a type
parameter bounds meaning POD (plain old data), but `Clone + Send` and
POD are not equivelant.
POD are not equivalent.

*/
pub mod pod {
2 changes: 1 addition & 1 deletion src/libextra/stats.rs
Original file line number Diff line number Diff line change
@@ -365,7 +365,7 @@ pub fn write_boxplot(w: @io::Writer, s: &Summary, width_hint: uint) {
w.write_str(histr);
}

/// Returns a HashMap with the number of occurences of every element in the
/// Returns a HashMap with the number of occurrences of every element in the
/// sequence that the iterator exposes.
pub fn freq_count<T: Iterator<U>, U: Eq+Hash>(mut iter: T) -> hashmap::HashMap<U, uint> {
let mut map = hashmap::HashMap::new::<U, uint>();
2 changes: 1 addition & 1 deletion src/libextra/term.rs
Original file line number Diff line number Diff line change
@@ -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 {
2 changes: 1 addition & 1 deletion src/libstd/at_vec.rs
Original file line number Diff line number Diff line change
@@ -200,7 +200,7 @@ pub mod raw {
* Sets the length of a vector
*
* This will explicitly set the size of the vector, without actually
* modifing its buffers, so it is up to the caller to ensure that
* modifying its buffers, so it is up to the caller to ensure that
* the vector is actually the specified size.
*/
#[inline]
2 changes: 1 addition & 1 deletion src/libstd/bool.rs
Original file line number Diff line number Diff line change
@@ -33,7 +33,7 @@ and more.

Also, a few conversion functions: `to_bit` and `to_str`.

Finally, some inquries into the nature of truth: `is_true` and `is_false`.
Finally, some inquiries into the nature of truth: `is_true` and `is_false`.

*/

2 changes: 1 addition & 1 deletion src/libstd/fmt/mod.rs
Original file line number Diff line number Diff line change
@@ -147,7 +147,7 @@ helper methods.
## Internationalization

The formatting syntax supported by the `ifmt!` extension supports
internationalization by providing "methods" which execute various differnet
internationalization by providing "methods" which execute various different
outputs depending on the input. The syntax and methods provided are similar to
other internationalization systems, so again nothing should seem alien.
Currently two methods are supported by this extension: "select" and "plural".
2 changes: 1 addition & 1 deletion src/libstd/fmt/parse.rs
Original file line number Diff line number Diff line change
@@ -66,7 +66,7 @@ pub enum Position<'self> {
ArgumentNext, ArgumentIs(uint), ArgumentNamed(&'self str)
}

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

10 changes: 5 additions & 5 deletions src/libstd/io.rs
Original file line number Diff line number Diff line change
@@ -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 {
@@ -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);

@@ -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");
* ~~~
*/
8 changes: 5 additions & 3 deletions src/libstd/iterator.rs
Original file line number Diff line number Diff line change
@@ -511,7 +511,8 @@ pub trait Iterator<A> {
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<A> {
}).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<A> {
}

impl<A: Clone> Repeat<A> {
/// 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<A> {
Repeat{element: elt}
2 changes: 1 addition & 1 deletion src/libstd/num/f32.rs
Original file line number Diff line number Diff line change
@@ -125,7 +125,7 @@ pub static neg_infinity: f32 = -1.0_f32/0.0_f32;
pub mod consts {
// FIXME (requires Issue #1433 to fix): replace with mathematical
// staticants from cmath.
/// Archimedes' staticant
/// Archimedes' constant
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I kinda prefer staticant

pub static pi: f32 = 3.14159265358979323846264338327950288_f32;

/// pi/2.0
2 changes: 1 addition & 1 deletion src/libstd/os.rs
Original file line number Diff line number Diff line change
@@ -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,
2 changes: 1 addition & 1 deletion src/libstd/ptr.rs
Original file line number Diff line number Diff line change
@@ -254,7 +254,7 @@ pub unsafe fn array_each_with_len<T>(arr: **T, len: uint, cb: &fn(*T)) {
passing to the provided callback function

SAFETY NOTE: This will only work with a null-terminated
pointer array. Barely less-dodgey Pointer Arithmetic.
pointer array. Barely less-dodgy Pointer Arithmetic.
Dragons be here.
*/
pub unsafe fn array_each<T>(arr: **T, cb: &fn(*T)) {
2 changes: 1 addition & 1 deletion src/libstd/rand.rs
Original file line number Diff line number Diff line change
@@ -658,7 +658,7 @@ pub fn rng() -> IsaacRng {

/// Create a weak random number generator with a default algorithm and seed.
///
/// It returns the fatest `Rng` algorithm currently available in Rust without
/// It returns the fastest `Rng` algorithm currently available in Rust without
/// consideration for cryptography or security. If you require a specifically
/// seeded `Rng` for consistency over time you should pick one algorithm and
/// create the `Rng` yourself.
4 changes: 2 additions & 2 deletions src/libstd/rand/distributions.rs
Original file line number Diff line number Diff line change
@@ -66,7 +66,7 @@ fn ziggurat<R:Rng>(rng: &mut R,
/// # Example
///
/// ~~~
/// use core::rand::distributions::StandardNormal;
/// use std::rand::distributions::StandardNormal;
///
/// fn main() {
/// let normal = 2.0 + (*rand::random::<StandardNormal>()) * 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::<Exp1>()) * 0.5;
2 changes: 1 addition & 1 deletion src/libstd/result.rs
Original file line number Diff line number Diff line change
@@ -25,7 +25,7 @@ use str::StrSlice;

/// `Result` is a type that represents either success (`Ok`) or failure (`Err`).
///
/// In order to provide informative error messages, `E` is reqired to implement `ToStr`.
/// In order to provide informative error messages, `E` is required to implement `ToStr`.
/// It is further recommended for `E` to be a descriptive error type, eg a `enum` for
/// all possible errors cases.
#[deriving(Clone, Eq)]
2 changes: 1 addition & 1 deletion src/libstd/rt/io/extensions.rs
Original file line number Diff line number Diff line change
@@ -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);

10 changes: 5 additions & 5 deletions src/libstd/rt/io/mod.rs
Original file line number Diff line number Diff line change
@@ -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

@@ -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

@@ -430,7 +430,7 @@ pub trait Reader {
/// println(reader.read_line());
/// }
///
/// # Failue
/// # Failure
///
/// Returns `true` on failure.
fn eof(&mut self) -> bool;
24 changes: 12 additions & 12 deletions src/libstd/rt/mod.rs
Original file line number Diff line number Diff line change
@@ -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;
Loading