Fix spelling errors and capitalization.

This commit is contained in:
Joseph Crail 2014-09-02 01:35:58 -04:00
parent d59d97cbec
commit b7bfe04b2d
48 changed files with 64 additions and 64 deletions

View file

@ -289,7 +289,7 @@ pub trait Set<T>: Collection {
}
/// A mutable collection of values which are distinct from one another that
/// can be mutaed.
/// can be mutated.
pub trait MutableSet<T>: Set<T> + Mutable {
/// Adds a value to the set. Returns `true` if the value was not already
/// present in the set.

View file

@ -132,7 +132,7 @@ impl<T> RingBuf<T> {
elts: Vec::from_fn(cmp::max(MINIMUM_CAPACITY, n), |_| None)}
}
/// Retrieva an element in the `RingBuf` by index.
/// Retrieve an element in the `RingBuf` by index.
///
/// Fails if there is no element with the given index.
///

View file

@ -324,7 +324,7 @@ impl<V:Clone> SmallIntMap<V> {
/// Updates a value in the map. If the key already exists in the map,
/// modifies the value with `ff` taking `oldval, newval`.
/// Otherwise, sets the value to `newval`.
/// Returasn `true` if the key did not already exist in the map.
/// Returns `true` if the key did not already exist in the map.
///
/// # Example
///

View file

@ -44,7 +44,7 @@
//!
//! # Representation
//!
//! Rust's string type, `str`, is a sequence of unicode scalar values encoded as a
//! Rust's string type, `str`, is a sequence of Unicode scalar values encoded as a
//! stream of UTF-8 bytes. All strings are guaranteed to be validly encoded UTF-8
//! sequences. Additionally, strings are not null-terminated and can contain null
//! bytes.

View file

@ -201,7 +201,7 @@ pub fn escape_unicode(c: char, f: |char|) {
/// - Tab, CR and LF are escaped as '\t', '\r' and '\n' respectively.
/// - Single-quote, double-quote and backslash chars are backslash-escaped.
/// - Any other chars in the range [0x20,0x7e] are not escaped.
/// - Any other chars are given hex unicode escapes; see `escape_unicode`.
/// - Any other chars are given hex Unicode escapes; see `escape_unicode`.
///
pub fn escape_default(c: char, f: |char|) {
match c {
@ -290,7 +290,7 @@ pub trait Char {
/// * Single-quote, double-quote and backslash chars are backslash-
/// escaped.
/// * Any other chars in the range [0x20,0x7e] are not escaped.
/// * Any other chars are given hex unicode escapes; see `escape_unicode`.
/// * Any other chars are given hex Unicode escapes; see `escape_unicode`.
fn escape_default(&self, f: |char|);
/// Returns the amount of bytes this character would need if encoded in

View file

@ -311,7 +311,7 @@ extern "rust-intrinsic" {
/// Gives the address for the return value of the enclosing function.
///
/// Using this instrinsic in a function that does not use an out pointer
/// Using this intrinsic in a function that does not use an out pointer
/// will trigger a compiler error.
pub fn return_address() -> *const u8;

View file

@ -1128,7 +1128,7 @@ pub trait StrSlice<'a> {
fn contains_char(&self, needle: char) -> bool;
/// An iterator over the characters of `self`. Note, this iterates
/// over unicode code-points, not unicode graphemes.
/// over Unicode code-points, not Unicode graphemes.
///
/// # Example
///
@ -1505,7 +1505,7 @@ pub trait StrSlice<'a> {
/// Pluck a character out of a string and return the index of the next
/// character.
///
/// This function can be used to iterate over the unicode characters of a
/// This function can be used to iterate over the Unicode characters of a
/// string.
///
/// # Example
@ -1549,7 +1549,7 @@ pub trait StrSlice<'a> {
/// # Return value
///
/// A record {ch: char, next: uint} containing the char value and the byte
/// index of the next unicode character.
/// index of the next Unicode character.
///
/// # Failure
///
@ -1559,7 +1559,7 @@ pub trait StrSlice<'a> {
/// Given a byte position and a str, return the previous char and its position.
///
/// This function can be used to iterate over a unicode string in reverse.
/// This function can be used to iterate over a Unicode string in reverse.
///
/// Returns 0 for next index if called on start index 0.
///

View file

@ -65,7 +65,7 @@
* definitions common-to-all (held in modules named c95, c99, posix88, posix01
* and posix08) and definitions that appear only on *some* platforms (named
* 'extra'). This would be things like significant OSX foundation kit, or Windows
* library kernel32.dll, or various fancy glibc, linux or BSD extensions.
* library kernel32.dll, or various fancy glibc, Linux or BSD extensions.
*
* In addition to the per-platform 'extra' modules, we define a module of
* 'common BSD' libc routines that never quite made it into POSIX but show up

View file

@ -901,8 +901,8 @@ impl rtio::RtioUdpSocket for UdpSocket {
//
// It turns out that there's this nifty MSG_DONTWAIT flag which can be passed to
// send/recv, but the niftiness wears off once you realize it only works well on
// linux [1] [2]. This means that it's pretty easy to get a nonblocking
// operation on linux (no flag fiddling, no affecting other objects), but not on
// Linux [1] [2]. This means that it's pretty easy to get a nonblocking
// operation on Linux (no flag fiddling, no affecting other objects), but not on
// other platforms.
//
// To work around this constraint on other platforms, we end up using the
@ -922,7 +922,7 @@ impl rtio::RtioUdpSocket for UdpSocket {
// operations performed in the lock are *nonblocking* to avoid holding the mutex
// forever.
//
// So, in summary, linux uses MSG_DONTWAIT and doesn't need mutexes, everyone
// So, in summary, Linux uses MSG_DONTWAIT and doesn't need mutexes, everyone
// else uses O_NONBLOCK and mutexes with some trickery to make sure blocking
// reads/writes are still blocking.
//

View file

@ -655,7 +655,7 @@ impl UnixAcceptor {
// using the original server pipe.
let handle = self.listener.handle;
// If we've had an artifical call to close_accept, be sure to never
// If we've had an artificial call to close_accept, be sure to never
// proceed in accepting new clients in the future
if self.inner.closed.load(atomic::SeqCst) { return Err(util::eof()) }

View file

@ -151,7 +151,7 @@ impl rtio::RtioProcess for Process {
#[cfg(unix)] use libc::EINVAL as ERROR;
#[cfg(windows)] use libc::ERROR_NOTHING_TO_TERMINATE as ERROR;
// On linux (and possibly other unices), a process that has exited will
// On Linux (and possibly other unices), a process that has exited will
// continue to accept signals because it is "defunct". The delivery of
// signals will only fail once the child has been reaped. For this
// reason, if the process hasn't exited yet, then we attempt to collect

View file

@ -8,12 +8,12 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
//! Timers for non-linux/non-windows OSes
//! Timers for non-Linux/non-Windows OSes
//!
//! This module implements timers with a worker thread, select(), and a lot of
//! witchcraft that turns out to be horribly inaccurate timers. The unfortunate
//! part is that I'm at a loss of what else to do one these OSes. This is also
//! why linux has a specialized timerfd implementation and windows has its own
//! why Linux has a specialized timerfd implementation and windows has its own
//! implementation (they're more accurate than this one).
//!
//! The basic idea is that there is a worker thread that's communicated to via a

View file

@ -15,7 +15,7 @@
//! This module contains the implementation of a Windows specific console TTY.
//! Also converts between UTF-16 and UTF-8. Windows has very poor support for
//! UTF-8 and some functions will fail. In particular ReadFile and ReadConsole
//! will fail when the codepage is set to UTF-8 and a unicode character is
//! will fail when the codepage is set to UTF-8 and a Unicode character is
//! entered.
//!
//! FIXME

View file

@ -381,7 +381,7 @@ extern crate rand;
#[cfg(test)]
extern crate regex;
// unicode tables for character classes are defined in libunicode
// Unicode tables for character classes are defined in libunicode
extern crate unicode;
pub use parse::Error;

View file

@ -620,9 +620,9 @@ impl<'a> Parser<'a> {
}
}
// Parses a unicode character class name, either of the form \pF where
// F is a one letter unicode class name or of the form \p{name} where
// name is the unicode class name.
// Parses a Unicode character class name, either of the form \pF where
// F is a one letter Unicode class name or of the form \p{name} where
// name is the Unicode class name.
// Assumes that \p or \P has been read (and 'p' or 'P' is the current
// character).
fn parse_unicode_name(&mut self) -> Result<Ast, Error> {

View file

@ -364,7 +364,7 @@ impl<'t> CharReader<'t> {
}
/// Sets the previous and current character given any arbitrary byte
/// index (at a unicode codepoint boundary).
/// index (at a Unicode codepoint boundary).
#[inline]
pub fn set(&mut self, ic: uint) -> uint {
self.prev = None;

View file

@ -1748,7 +1748,7 @@ fn add_upstream_rust_crates(cmd: &mut Command, sess: &Session,
//
// We must continue to link to the upstream archives to be sure
// to pull in native static dependencies. As the final caveat,
// on linux it is apparently illegal to link to a blank archive,
// on Linux it is apparently illegal to link to a blank archive,
// so if an archive no longer has any object files in it after
// we remove `lib.o`, then don't link against it at all.
//

View file

@ -162,7 +162,7 @@ pub fn run(sess: &session::Session, llmod: ModuleRef,
"verify".with_c_str(|s| llvm::LLVMRustAddPass(pm, s));
time(sess.time_passes(), "LTO pases", (), |()|
time(sess.time_passes(), "LTO passes", (), |()|
llvm::LLVMRunPassManager(pm, llmod));
llvm::LLVMDisposePassManager(pm);

View file

@ -56,7 +56,7 @@ use std::gc::{Gc, GC};
// copies of general constants
//
// (in theory, probably not at first: if/match on integer-const
// conditions / descriminants)
// conditions / discriminants)
//
// - Non-constants: everything else.
//

View file

@ -1068,7 +1068,7 @@ pub fn load_ty(cx: &Block, ptr: ValueRef, t: ty::t) -> ValueRef {
} else if ty::type_is_bool(t) {
Trunc(cx, LoadRangeAssert(cx, ptr, 0, 2, llvm::False), Type::i1(cx.ccx()))
} else if ty::type_is_char(t) {
// a char is a unicode codepoint, and so takes values from 0
// a char is a Unicode codepoint, and so takes values from 0
// to 0x10FFFF inclusive only.
LoadRangeAssert(cx, ptr, 0, 0x10FFFF + 1, llvm::False)
} else {

View file

@ -740,7 +740,7 @@ pub fn finalize(cx: &CrateContext) {
"Dwarf Version".with_c_str(
|s| llvm::LLVMRustAddModuleFlag(cx.llmod, s, 2));
} else {
// FIXME(#13611) this is a kludge fix because the linux bots have
// FIXME(#13611) this is a kludge fix because the Linux bots have
// gdb 7.4 which doesn't understand dwarf4, we should
// do something more graceful here.
"Dwarf Version".with_c_str(

View file

@ -1386,7 +1386,7 @@ pub fn trans_adt<'a>(mut bcx: &'a Block<'a>,
}
}
// Now, we just overwrite the fields we've explicity specified
// Now, we just overwrite the fields we've explicitly specified
for &(i, ref e) in fields.iter() {
let dest = adt::trans_field_ptr(bcx, &*repr, addr, discr, i);
let e_ty = expr_ty_adjusted(bcx, &**e);

View file

@ -903,7 +903,7 @@ pub enum sty {
/// Substs here, possibly against intuition, *may* contain `ty_param`s.
/// That is, even after substitution it is possible that there are type
/// variables. This happens when the `ty_enum` corresponds to an enum
/// definition and not a concerete use of it. To get the correct `ty_enum`
/// definition and not a concrete use of it. To get the correct `ty_enum`
/// from the tcx, use the `NodeId` from the `ast::Ty` and look it up in
/// the `ast_ty_to_ty_cache`. This is probably true for `ty_struct` as
/// well.`

View file

@ -148,12 +148,12 @@ impl<T,U,D:SnapshotVecDelegate<T,U>> SnapshotVec<T,U,D> {
match self.undo_log.pop().unwrap() {
OpenSnapshot => {
// This indicates a failure to obey the stack discipline.
fail!("Cannot rollback an uncommited snapshot");
fail!("Cannot rollback an uncommitted snapshot");
}
CommittedSnapshot => {
// This occurs when there are nested snapshots and
// the inner is commited but outer is rolled back.
// the inner is committed but outer is rolled back.
}
NewElem(i) => {

View file

@ -30,7 +30,7 @@ pub fn get_target_strs(target_triple: String, target_os: abi::Os) -> target_strs
}
abi::OsWindows => {
// FIXME: Test this. Copied from linux (#2398)
// FIXME: Test this. Copied from Linux (#2398)
"e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-\
f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-\
s0:64:64-f80:128:128-n8:16:32:64-S128".to_string()

View file

@ -1155,7 +1155,7 @@ impl Context {
// We have a huge number of calls to write, so try to alleviate some
// of the pain by using a buffered writer instead of invoking the
// write sycall all the time.
// write syscall all the time.
let mut writer = BufferedWriter::new(w);
if !cx.render_redirect_pages {
try!(layout::render(&mut writer, &cx.layout, &page,

View file

@ -11,7 +11,7 @@
//! This module crawls a `clean::Crate` and produces a summarization of the
//! stability levels within the crate. The summary contains the module
//! hierarchy, with item counts for every stability level per module. A parent
//! module's count includes its childrens's.
//! module's count includes its children's.
use std::ops::Add;
use std::num::Zero;

View file

@ -14,7 +14,7 @@
//! the processes `argc` and `argv` arguments to be stored
//! in a globally-accessible location for use by the `os` module.
//!
//! Only valid to call on linux. Mac and Windows use syscalls to
//! Only valid to call on Linux. Mac and Windows use syscalls to
//! discover the command line arguments.
//!
//! FIXME #7756: Would be nice for this to not exist.

View file

@ -19,7 +19,7 @@ string types are *not* null terminated.
The other problem with translating Rust strings to C strings is that Rust
strings can validly contain a null-byte in the middle of the string (0 is a
valid unicode codepoint). This means that not all Rust strings can actually be
valid Unicode codepoint). This means that not all Rust strings can actually be
translated to C strings.
# Creation of a C string

View file

@ -107,10 +107,10 @@ pub mod compiled {
// efficient sequence of instructions. This also involves dealing with fun
// stuff in object files and whatnot. Regardless, it turns out this causes
// trouble with green threads and lots of optimizations turned on. The
// following case study was done on linux x86_64, but I would imagine that
// following case study was done on Linux x86_64, but I would imagine that
// other platforms are similar.
//
// On linux, the instruction sequence for loading the tls pointer global
// On Linux, the instruction sequence for loading the tls pointer global
// looks like:
//
// mov %fs:0x0, %rax

View file

@ -278,7 +278,7 @@ pub fn error_str(error: ErrorCode) -> &'static str {
UnrecognizedHex => "invalid \\u escape (unrecognized hex)",
NotFourDigit => "invalid \\u escape (not four digits)",
NotUtf8 => "contents not utf-8",
InvalidUnicodeCodePoint => "invalid unicode code point",
InvalidUnicodeCodePoint => "invalid Unicode code point",
LoneLeadingSurrogateInHexEscape => "lone leading surrogate in hex escape",
UnexpectedEndOfHexEscape => "unexpected end of hex escape",
}

View file

@ -1418,7 +1418,7 @@ pub trait Buffer: Reader {
fn consume(&mut self, amt: uint);
/// Reads the next line of input, interpreted as a sequence of UTF-8
/// encoded unicode codepoints. If a newline is encountered, then the
/// encoded Unicode codepoints. If a newline is encountered, then the
/// newline is contained in the returned string.
///
/// # Example

View file

@ -841,7 +841,7 @@ impl<'a, P: GenericPath> Display<'a, P> {
/// Returns the path as a possibly-owned string.
///
/// If the path is not UTF-8, invalid sequences will be replaced with the
/// unicode replacement char. This involves allocation.
/// Unicode replacement char. This involves allocation.
#[inline]
pub fn as_maybe_owned(&self) -> MaybeOwned<'a> {
String::from_utf8_lossy(if self.filename {

View file

@ -138,7 +138,7 @@ fn demangle(writer: &mut Writer, s: &str) -> IoResult<()> {
"$RP$" => ")",
"$C$" => ",",
// in theory we can demangle any unicode code point, but
// in theory we can demangle any Unicode code point, but
// for simplicity we just catch the common ones.
"$x20" => " ",
"$x27" => "'",
@ -461,7 +461,7 @@ mod imp {
//
// An additionally oddity in this function is that we initialize the
// filename via self_exe_name() to pass to libbacktrace. It turns out
// that on linux libbacktrace seamlessly gets the filename of the
// that on Linux libbacktrace seamlessly gets the filename of the
// current executable, but this fails on freebsd. by always providing
// it, we make sure that libbacktrace never has a reason to not look up
// the symbols. The libbacktrace API also states that the filename must
@ -631,7 +631,7 @@ mod imp {
(val & !1) as libc::uintptr_t
}
// This function also doesn't exist on android or arm/linux, so make it
// This function also doesn't exist on Android or ARM/Linux, so make it
// a no-op
#[cfg(target_os = "android")]
#[cfg(target_os = "linux", target_arch = "arm")]

View file

@ -22,7 +22,7 @@ extern {}
// LLVM implements the `frem` instruction as a call to `fmod`, which lives in
// libm. Hence, we must explicitly link to it.
//
// On linux librt and libdl are indirect dependencies via rustrt,
// On Linux, librt and libdl are indirect dependencies via rustrt,
// and binutils 2.22+ won't add them automatically
#[cfg(target_os = "linux")]
#[link(name = "dl")]

View file

@ -21,7 +21,7 @@ use result::{Result, Ok, Err};
/// The number of nanoseconds in a microsecond.
static NANOS_PER_MICRO: i32 = 1000;
/// The number of nanosecdons in a millisecond.
/// The number of nanoseconds in a millisecond.
static NANOS_PER_MILLI: i32 = 1000_000;
/// The number of nanoseconds in seconds.
static NANOS_PER_SEC: i32 = 1_000_000_000;

View file

@ -501,7 +501,7 @@ impl<'a, 'b> Context<'a, 'b> {
// Right now there is a bug such that for the expression:
// foo(bar(&1))
// the lifetime of `1` doesn't outlast the call to `bar`, so it's not
// vald for the call to `foo`. To work around this all arguments to the
// valid for the call to `foo`. To work around this all arguments to the
// format! string are shoved into locals. Furthermore, we shove the address
// of each variable because we don't want to move out of the arguments
// passed to this function.

View file

@ -1114,7 +1114,7 @@ impl<'a> StringReader<'a> {
self.bump();
valid &= self.scan_char_or_byte(ch_start, ch, /* ascii_only = */ false, '"');
}
// adjust for the ACSII " at the start of the literal
// adjust for the ASCII " at the start of the literal
let id = if valid { self.name_from(start_bpos + BytePos(1)) }
else { token::intern("??") };
self.bump();

View file

@ -180,7 +180,7 @@ pub fn to_string(f: |&mut State| -> IoResult<()>) -> String {
// FIXME (Issue #16472): the thing_to_string_impls macro should go away
// after we revise the syntax::ext::quote::ToToken impls to go directly
// to token-trees instea of thing -> string -> token-trees.
// to token-trees instead of thing -> string -> token-trees.
macro_rules! thing_to_string_impls {
($to_string:ident) => {

View file

@ -81,9 +81,9 @@ pub fn strs_to_idents(ids: Vec<&str> ) -> Vec<ast::Ident> {
/// Does the given string match the pattern? whitespace in the first string
/// may be deleted or replaced with other whitespace to match the pattern.
/// this function is unicode-ignorant; fortunately, the careful design of
/// this function is Unicode-ignorant; fortunately, the careful design of
/// UTF-8 mitigates this ignorance. In particular, this function only collapses
/// sequences of \n, \r, ' ', and \t, but it should otherwise tolerate unicode
/// sequences of \n, \r, ' ', and \t, but it should otherwise tolerate Unicode
/// chars. Unsurprisingly, it doesn't do NKF-normalization(?).
pub fn matches_codepattern(a : &str, b : &str) -> bool {
let mut idx_a = 0;

View file

@ -120,7 +120,7 @@ pub fn is_digit(c: char) -> bool {
/// Convert a char to its uppercase equivalent
///
/// The case-folding performed is the common or simple mapping:
/// it maps one unicode codepoint (one char in Rust) to its uppercase equivalent according
/// it maps one Unicode codepoint (one char in Rust) to its uppercase equivalent according
/// to the Unicode database at ftp://ftp.unicode.org/Public/UNIDATA/UnicodeData.txt
/// The additional SpecialCasing.txt is not considered here, as it expands to multiple
/// codepoints in some cases.
@ -233,7 +233,7 @@ pub trait UnicodeChar {
/// Converts a character to its uppercase equivalent.
///
/// The case-folding performed is the common or simple mapping: it maps
/// one unicode codepoint (one character in Rust) to its uppercase
/// one Unicode codepoint (one character in Rust) to its uppercase
/// equivalent according to the Unicode database [1]. The additional
/// `SpecialCasing.txt` is not considered here, as it expands to multiple
/// codepoints in some cases.

View file

@ -20,7 +20,7 @@ use std::rand::{task_rng, Rng};
fn random_char() -> char {
let mut rng = task_rng();
// a subset of the XID_start unicode table (ensuring that the
// a subset of the XID_start Unicode table (ensuring that the
// compiler doesn't fail with an "unrecognised token" error)
let (lo, hi): (u32, u32) = match rng.gen_range(1u32, 4u32 + 1) {
1 => (0x41, 0x5a),

View file

@ -19,7 +19,7 @@ use std::rand::{task_rng, Rng};
fn random_char() -> char {
let mut rng = task_rng();
// a subset of the XID_start unicode table (ensuring that the
// a subset of the XID_start Unicode table (ensuring that the
// compiler doesn't fail with an "unrecognised token" error)
let (lo, hi): (u32, u32) = match rng.gen_range(1u32, 4u32 + 1) {
1 => (0x41, 0x5a),

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-test: this has weird linking problems on linux, and it probably needs a
// ignore-test: this has weird linking problems on Linux, and it probably needs a
// solution along the lines of disabling segmented stacks and/or the
// stack checks.
// aux-build:no_std_crate.rs
@ -20,7 +20,7 @@
extern crate no_std_crate;
// This is an unfortunate thing to have to do on linux :(
// This is an unfortunate thing to have to do on Linux :(
#[cfg(target_os = "linux")]
#[doc(hidden)]
pub mod linkhack {

View file

@ -9,7 +9,7 @@
// except according to those terms.
// #11303, #11040:
// This would previously crash on i686 linux due to abi differences
// This would previously crash on i686 Linux due to abi differences
// between returning an Option<T> and T, where T is a non nullable
// pointer.
// If we have an enum with two variants such that one is zero sized

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-linux #7340 fails on 32-bit linux
// ignore-linux #7340 fails on 32-bit Linux
// ignore-macos #7340 fails on 32-bit macos
use std::mem;

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-linux #7340 fails on 32-bit linux
// ignore-linux #7340 fails on 32-bit Linux
// ignore-macos #7340 fails on 32-bit macos
use std::mem;

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-linux #7340 fails on 32-bit linux
// ignore-linux #7340 fails on 32-bit Linux
// ignore-macos #7340 fails on 32-bit macos
use std::mem;