Skip to content

Fix spelling errors and capitalization. #16982

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

Closed
Closed
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion src/libcollections/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/libcollections/ringbuf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
///
Expand Down
2 changes: 1 addition & 1 deletion src/libcollections/smallintmap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
///
Expand Down
2 changes: 1 addition & 1 deletion src/libcollections/str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions src/libcore/char.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/libcore/intrinsics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
8 changes: 4 additions & 4 deletions src/libcore/str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
///
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
///
Expand All @@ -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.
///
Expand Down
2 changes: 1 addition & 1 deletion src/liblibc/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions src/libnative/io/net.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
//
Expand Down
2 changes: 1 addition & 1 deletion src/libnative/io/pipe_windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()) }

Expand Down
2 changes: 1 addition & 1 deletion src/libnative/io/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/libnative/io/timer_unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/libnative/io/tty_windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/libregex/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions src/libregex/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down
2 changes: 1 addition & 1 deletion src/libregex/vm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/back/link.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
//
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/back/lto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/middle/const_eval.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
//
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/middle/trans/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/middle/trans/debuginfo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/middle/trans/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/middle/ty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.`
Expand Down
4 changes: 2 additions & 2 deletions src/librustc/util/snapshot_vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_back/x86_64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion src/librustdoc/html/render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/librustdoc/stability_summary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/librustrt/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/librustrt/c_str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/librustrt/local_ptr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/libserialize/json.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
}
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/io/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/path/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
6 changes: 3 additions & 3 deletions src/libstd/rt/backtrace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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" => "'",
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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")]
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/rtdeps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand Down
Loading