Fix spelling errors and capitalization.
This commit is contained in:
parent
d59d97cbec
commit
b7bfe04b2d
48 changed files with 64 additions and 64 deletions
|
@ -289,7 +289,7 @@ pub trait Set<T>: Collection {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A mutable collection of values which are distinct from one another that
|
/// 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 {
|
pub trait MutableSet<T>: Set<T> + Mutable {
|
||||||
/// Adds a value to the set. Returns `true` if the value was not already
|
/// Adds a value to the set. Returns `true` if the value was not already
|
||||||
/// present in the set.
|
/// present in the set.
|
||||||
|
|
|
@ -132,7 +132,7 @@ impl<T> RingBuf<T> {
|
||||||
elts: Vec::from_fn(cmp::max(MINIMUM_CAPACITY, n), |_| None)}
|
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.
|
/// Fails if there is no element with the given index.
|
||||||
///
|
///
|
||||||
|
|
|
@ -324,7 +324,7 @@ impl<V:Clone> SmallIntMap<V> {
|
||||||
/// Updates a value in the map. If the key already exists in the map,
|
/// Updates a value in the map. If the key already exists in the map,
|
||||||
/// modifies the value with `ff` taking `oldval, newval`.
|
/// modifies the value with `ff` taking `oldval, newval`.
|
||||||
/// Otherwise, sets the value to `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
|
/// # Example
|
||||||
///
|
///
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
//!
|
//!
|
||||||
//! # Representation
|
//! # 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
|
//! 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
|
//! sequences. Additionally, strings are not null-terminated and can contain null
|
||||||
//! bytes.
|
//! bytes.
|
||||||
|
|
|
@ -201,7 +201,7 @@ pub fn escape_unicode(c: char, f: |char|) {
|
||||||
/// - Tab, CR and LF are escaped as '\t', '\r' and '\n' respectively.
|
/// - Tab, CR and LF are escaped as '\t', '\r' and '\n' respectively.
|
||||||
/// - Single-quote, double-quote and backslash chars are backslash-escaped.
|
/// - Single-quote, double-quote and backslash chars are backslash-escaped.
|
||||||
/// - Any other chars in the range [0x20,0x7e] are not 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|) {
|
pub fn escape_default(c: char, f: |char|) {
|
||||||
match c {
|
match c {
|
||||||
|
@ -290,7 +290,7 @@ pub trait Char {
|
||||||
/// * Single-quote, double-quote and backslash chars are backslash-
|
/// * Single-quote, double-quote and backslash chars are backslash-
|
||||||
/// escaped.
|
/// escaped.
|
||||||
/// * Any other chars in the range [0x20,0x7e] are not 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|);
|
fn escape_default(&self, f: |char|);
|
||||||
|
|
||||||
/// Returns the amount of bytes this character would need if encoded in
|
/// Returns the amount of bytes this character would need if encoded in
|
||||||
|
|
|
@ -311,7 +311,7 @@ extern "rust-intrinsic" {
|
||||||
|
|
||||||
/// Gives the address for the return value of the enclosing function.
|
/// 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.
|
/// will trigger a compiler error.
|
||||||
pub fn return_address() -> *const u8;
|
pub fn return_address() -> *const u8;
|
||||||
|
|
||||||
|
|
|
@ -1128,7 +1128,7 @@ pub trait StrSlice<'a> {
|
||||||
fn contains_char(&self, needle: char) -> bool;
|
fn contains_char(&self, needle: char) -> bool;
|
||||||
|
|
||||||
/// An iterator over the characters of `self`. Note, this iterates
|
/// 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
|
/// # Example
|
||||||
///
|
///
|
||||||
|
@ -1505,7 +1505,7 @@ pub trait StrSlice<'a> {
|
||||||
/// Pluck a character out of a string and return the index of the next
|
/// Pluck a character out of a string and return the index of the next
|
||||||
/// character.
|
/// 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.
|
/// string.
|
||||||
///
|
///
|
||||||
/// # Example
|
/// # Example
|
||||||
|
@ -1549,7 +1549,7 @@ pub trait StrSlice<'a> {
|
||||||
/// # Return value
|
/// # Return value
|
||||||
///
|
///
|
||||||
/// A record {ch: char, next: uint} containing the char value and the byte
|
/// 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
|
/// # Failure
|
||||||
///
|
///
|
||||||
|
@ -1559,7 +1559,7 @@ pub trait StrSlice<'a> {
|
||||||
|
|
||||||
/// Given a byte position and a str, return the previous char and its position.
|
/// 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.
|
/// Returns 0 for next index if called on start index 0.
|
||||||
///
|
///
|
||||||
|
|
|
@ -65,7 +65,7 @@
|
||||||
* definitions common-to-all (held in modules named c95, c99, posix88, posix01
|
* definitions common-to-all (held in modules named c95, c99, posix88, posix01
|
||||||
* and posix08) and definitions that appear only on *some* platforms (named
|
* and posix08) and definitions that appear only on *some* platforms (named
|
||||||
* 'extra'). This would be things like significant OSX foundation kit, or Windows
|
* '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
|
* 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
|
* 'common BSD' libc routines that never quite made it into POSIX but show 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
|
// 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
|
// 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
|
// 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
|
// operation on Linux (no flag fiddling, no affecting other objects), but not on
|
||||||
// other platforms.
|
// other platforms.
|
||||||
//
|
//
|
||||||
// To work around this constraint on other platforms, we end up using the
|
// 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
|
// operations performed in the lock are *nonblocking* to avoid holding the mutex
|
||||||
// forever.
|
// 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
|
// else uses O_NONBLOCK and mutexes with some trickery to make sure blocking
|
||||||
// reads/writes are still blocking.
|
// reads/writes are still blocking.
|
||||||
//
|
//
|
||||||
|
|
|
@ -655,7 +655,7 @@ impl UnixAcceptor {
|
||||||
// using the original server pipe.
|
// using the original server pipe.
|
||||||
let handle = self.listener.handle;
|
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
|
// proceed in accepting new clients in the future
|
||||||
if self.inner.closed.load(atomic::SeqCst) { return Err(util::eof()) }
|
if self.inner.closed.load(atomic::SeqCst) { return Err(util::eof()) }
|
||||||
|
|
||||||
|
|
|
@ -151,7 +151,7 @@ impl rtio::RtioProcess for Process {
|
||||||
#[cfg(unix)] use libc::EINVAL as ERROR;
|
#[cfg(unix)] use libc::EINVAL as ERROR;
|
||||||
#[cfg(windows)] use libc::ERROR_NOTHING_TO_TERMINATE 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
|
// continue to accept signals because it is "defunct". The delivery of
|
||||||
// signals will only fail once the child has been reaped. For this
|
// 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
|
// reason, if the process hasn't exited yet, then we attempt to collect
|
||||||
|
|
|
@ -8,12 +8,12 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// 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
|
//! This module implements timers with a worker thread, select(), and a lot of
|
||||||
//! witchcraft that turns out to be horribly inaccurate timers. The unfortunate
|
//! 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
|
//! 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).
|
//! implementation (they're more accurate than this one).
|
||||||
//!
|
//!
|
||||||
//! The basic idea is that there is a worker thread that's communicated to via a
|
//! The basic idea is that there is a worker thread that's communicated to via a
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
//! This module contains the implementation of a Windows specific console TTY.
|
//! 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
|
//! 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
|
//! 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.
|
//! entered.
|
||||||
//!
|
//!
|
||||||
//! FIXME
|
//! FIXME
|
||||||
|
|
|
@ -381,7 +381,7 @@ extern crate rand;
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
extern crate regex;
|
extern crate regex;
|
||||||
|
|
||||||
// unicode tables for character classes are defined in libunicode
|
// Unicode tables for character classes are defined in libunicode
|
||||||
extern crate unicode;
|
extern crate unicode;
|
||||||
|
|
||||||
pub use parse::Error;
|
pub use parse::Error;
|
||||||
|
|
|
@ -620,9 +620,9 @@ impl<'a> Parser<'a> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Parses a unicode character class name, either of the form \pF where
|
// 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
|
// F is a one letter Unicode class name or of the form \p{name} where
|
||||||
// name is the unicode class name.
|
// name is the Unicode class name.
|
||||||
// Assumes that \p or \P has been read (and 'p' or 'P' is the current
|
// Assumes that \p or \P has been read (and 'p' or 'P' is the current
|
||||||
// character).
|
// character).
|
||||||
fn parse_unicode_name(&mut self) -> Result<Ast, Error> {
|
fn parse_unicode_name(&mut self) -> Result<Ast, Error> {
|
||||||
|
|
|
@ -364,7 +364,7 @@ impl<'t> CharReader<'t> {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Sets the previous and current character given any arbitrary byte
|
/// Sets the previous and current character given any arbitrary byte
|
||||||
/// index (at a unicode codepoint boundary).
|
/// index (at a Unicode codepoint boundary).
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn set(&mut self, ic: uint) -> uint {
|
pub fn set(&mut self, ic: uint) -> uint {
|
||||||
self.prev = None;
|
self.prev = None;
|
||||||
|
|
|
@ -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
|
// We must continue to link to the upstream archives to be sure
|
||||||
// to pull in native static dependencies. As the final caveat,
|
// 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
|
// 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.
|
// we remove `lib.o`, then don't link against it at all.
|
||||||
//
|
//
|
||||||
|
|
|
@ -162,7 +162,7 @@ pub fn run(sess: &session::Session, llmod: ModuleRef,
|
||||||
|
|
||||||
"verify".with_c_str(|s| llvm::LLVMRustAddPass(pm, s));
|
"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::LLVMRunPassManager(pm, llmod));
|
||||||
|
|
||||||
llvm::LLVMDisposePassManager(pm);
|
llvm::LLVMDisposePassManager(pm);
|
||||||
|
|
|
@ -56,7 +56,7 @@ use std::gc::{Gc, GC};
|
||||||
// copies of general constants
|
// copies of general constants
|
||||||
//
|
//
|
||||||
// (in theory, probably not at first: if/match on integer-const
|
// (in theory, probably not at first: if/match on integer-const
|
||||||
// conditions / descriminants)
|
// conditions / discriminants)
|
||||||
//
|
//
|
||||||
// - Non-constants: everything else.
|
// - Non-constants: everything else.
|
||||||
//
|
//
|
||||||
|
|
|
@ -1068,7 +1068,7 @@ pub fn load_ty(cx: &Block, ptr: ValueRef, t: ty::t) -> ValueRef {
|
||||||
} else if ty::type_is_bool(t) {
|
} else if ty::type_is_bool(t) {
|
||||||
Trunc(cx, LoadRangeAssert(cx, ptr, 0, 2, llvm::False), Type::i1(cx.ccx()))
|
Trunc(cx, LoadRangeAssert(cx, ptr, 0, 2, llvm::False), Type::i1(cx.ccx()))
|
||||||
} else if ty::type_is_char(t) {
|
} 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.
|
// to 0x10FFFF inclusive only.
|
||||||
LoadRangeAssert(cx, ptr, 0, 0x10FFFF + 1, llvm::False)
|
LoadRangeAssert(cx, ptr, 0, 0x10FFFF + 1, llvm::False)
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -740,7 +740,7 @@ pub fn finalize(cx: &CrateContext) {
|
||||||
"Dwarf Version".with_c_str(
|
"Dwarf Version".with_c_str(
|
||||||
|s| llvm::LLVMRustAddModuleFlag(cx.llmod, s, 2));
|
|s| llvm::LLVMRustAddModuleFlag(cx.llmod, s, 2));
|
||||||
} else {
|
} 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
|
// gdb 7.4 which doesn't understand dwarf4, we should
|
||||||
// do something more graceful here.
|
// do something more graceful here.
|
||||||
"Dwarf Version".with_c_str(
|
"Dwarf Version".with_c_str(
|
||||||
|
|
|
@ -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() {
|
for &(i, ref e) in fields.iter() {
|
||||||
let dest = adt::trans_field_ptr(bcx, &*repr, addr, discr, i);
|
let dest = adt::trans_field_ptr(bcx, &*repr, addr, discr, i);
|
||||||
let e_ty = expr_ty_adjusted(bcx, &**e);
|
let e_ty = expr_ty_adjusted(bcx, &**e);
|
||||||
|
|
|
@ -903,7 +903,7 @@ pub enum sty {
|
||||||
/// Substs here, possibly against intuition, *may* contain `ty_param`s.
|
/// Substs here, possibly against intuition, *may* contain `ty_param`s.
|
||||||
/// That is, even after substitution it is possible that there are type
|
/// That is, even after substitution it is possible that there are type
|
||||||
/// variables. This happens when the `ty_enum` corresponds to an enum
|
/// 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
|
/// 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
|
/// the `ast_ty_to_ty_cache`. This is probably true for `ty_struct` as
|
||||||
/// well.`
|
/// well.`
|
||||||
|
|
|
@ -148,12 +148,12 @@ impl<T,U,D:SnapshotVecDelegate<T,U>> SnapshotVec<T,U,D> {
|
||||||
match self.undo_log.pop().unwrap() {
|
match self.undo_log.pop().unwrap() {
|
||||||
OpenSnapshot => {
|
OpenSnapshot => {
|
||||||
// This indicates a failure to obey the stack discipline.
|
// This indicates a failure to obey the stack discipline.
|
||||||
fail!("Cannot rollback an uncommited snapshot");
|
fail!("Cannot rollback an uncommitted snapshot");
|
||||||
}
|
}
|
||||||
|
|
||||||
CommittedSnapshot => {
|
CommittedSnapshot => {
|
||||||
// This occurs when there are nested snapshots and
|
// 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) => {
|
NewElem(i) => {
|
||||||
|
|
|
@ -30,7 +30,7 @@ pub fn get_target_strs(target_triple: String, target_os: abi::Os) -> target_strs
|
||||||
}
|
}
|
||||||
|
|
||||||
abi::OsWindows => {
|
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-\
|
"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-\
|
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()
|
s0:64:64-f80:128:128-n8:16:32:64-S128".to_string()
|
||||||
|
|
|
@ -1155,7 +1155,7 @@ impl Context {
|
||||||
|
|
||||||
// We have a huge number of calls to write, so try to alleviate some
|
// 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
|
// 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);
|
let mut writer = BufferedWriter::new(w);
|
||||||
if !cx.render_redirect_pages {
|
if !cx.render_redirect_pages {
|
||||||
try!(layout::render(&mut writer, &cx.layout, &page,
|
try!(layout::render(&mut writer, &cx.layout, &page,
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
//! This module crawls a `clean::Crate` and produces a summarization of the
|
//! This module crawls a `clean::Crate` and produces a summarization of the
|
||||||
//! stability levels within the crate. The summary contains the module
|
//! stability levels within the crate. The summary contains the module
|
||||||
//! hierarchy, with item counts for every stability level per module. A parent
|
//! 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::ops::Add;
|
||||||
use std::num::Zero;
|
use std::num::Zero;
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
//! the processes `argc` and `argv` arguments to be stored
|
//! the processes `argc` and `argv` arguments to be stored
|
||||||
//! in a globally-accessible location for use by the `os` module.
|
//! 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.
|
//! discover the command line arguments.
|
||||||
//!
|
//!
|
||||||
//! FIXME #7756: Would be nice for this to not exist.
|
//! FIXME #7756: Would be nice for this to not exist.
|
||||||
|
|
|
@ -19,7 +19,7 @@ string types are *not* null terminated.
|
||||||
|
|
||||||
The other problem with translating Rust strings to C strings is that Rust
|
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
|
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.
|
translated to C strings.
|
||||||
|
|
||||||
# Creation of a C string
|
# Creation of a C string
|
||||||
|
|
|
@ -107,10 +107,10 @@ pub mod compiled {
|
||||||
// efficient sequence of instructions. This also involves dealing with fun
|
// efficient sequence of instructions. This also involves dealing with fun
|
||||||
// stuff in object files and whatnot. Regardless, it turns out this causes
|
// stuff in object files and whatnot. Regardless, it turns out this causes
|
||||||
// trouble with green threads and lots of optimizations turned on. The
|
// 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.
|
// 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:
|
// looks like:
|
||||||
//
|
//
|
||||||
// mov %fs:0x0, %rax
|
// mov %fs:0x0, %rax
|
||||||
|
|
|
@ -278,7 +278,7 @@ pub fn error_str(error: ErrorCode) -> &'static str {
|
||||||
UnrecognizedHex => "invalid \\u escape (unrecognized hex)",
|
UnrecognizedHex => "invalid \\u escape (unrecognized hex)",
|
||||||
NotFourDigit => "invalid \\u escape (not four digits)",
|
NotFourDigit => "invalid \\u escape (not four digits)",
|
||||||
NotUtf8 => "contents not utf-8",
|
NotUtf8 => "contents not utf-8",
|
||||||
InvalidUnicodeCodePoint => "invalid unicode code point",
|
InvalidUnicodeCodePoint => "invalid Unicode code point",
|
||||||
LoneLeadingSurrogateInHexEscape => "lone leading surrogate in hex escape",
|
LoneLeadingSurrogateInHexEscape => "lone leading surrogate in hex escape",
|
||||||
UnexpectedEndOfHexEscape => "unexpected end of hex escape",
|
UnexpectedEndOfHexEscape => "unexpected end of hex escape",
|
||||||
}
|
}
|
||||||
|
|
|
@ -1418,7 +1418,7 @@ pub trait Buffer: Reader {
|
||||||
fn consume(&mut self, amt: uint);
|
fn consume(&mut self, amt: uint);
|
||||||
|
|
||||||
/// Reads the next line of input, interpreted as a sequence of UTF-8
|
/// 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.
|
/// newline is contained in the returned string.
|
||||||
///
|
///
|
||||||
/// # Example
|
/// # Example
|
||||||
|
|
|
@ -841,7 +841,7 @@ impl<'a, P: GenericPath> Display<'a, P> {
|
||||||
/// Returns the path as a possibly-owned string.
|
/// Returns the path as a possibly-owned string.
|
||||||
///
|
///
|
||||||
/// If the path is not UTF-8, invalid sequences will be replaced with the
|
/// 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]
|
#[inline]
|
||||||
pub fn as_maybe_owned(&self) -> MaybeOwned<'a> {
|
pub fn as_maybe_owned(&self) -> MaybeOwned<'a> {
|
||||||
String::from_utf8_lossy(if self.filename {
|
String::from_utf8_lossy(if self.filename {
|
||||||
|
|
|
@ -138,7 +138,7 @@ fn demangle(writer: &mut Writer, s: &str) -> IoResult<()> {
|
||||||
"$RP$" => ")",
|
"$RP$" => ")",
|
||||||
"$C$" => ",",
|
"$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.
|
// for simplicity we just catch the common ones.
|
||||||
"$x20" => " ",
|
"$x20" => " ",
|
||||||
"$x27" => "'",
|
"$x27" => "'",
|
||||||
|
@ -461,7 +461,7 @@ mod imp {
|
||||||
//
|
//
|
||||||
// An additionally oddity in this function is that we initialize the
|
// An additionally oddity in this function is that we initialize the
|
||||||
// filename via self_exe_name() to pass to libbacktrace. It turns out
|
// 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
|
// current executable, but this fails on freebsd. by always providing
|
||||||
// it, we make sure that libbacktrace never has a reason to not look up
|
// 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
|
// the symbols. The libbacktrace API also states that the filename must
|
||||||
|
@ -631,7 +631,7 @@ mod imp {
|
||||||
(val & !1) as libc::uintptr_t
|
(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
|
// a no-op
|
||||||
#[cfg(target_os = "android")]
|
#[cfg(target_os = "android")]
|
||||||
#[cfg(target_os = "linux", target_arch = "arm")]
|
#[cfg(target_os = "linux", target_arch = "arm")]
|
||||||
|
|
|
@ -22,7 +22,7 @@ extern {}
|
||||||
// LLVM implements the `frem` instruction as a call to `fmod`, which lives in
|
// LLVM implements the `frem` instruction as a call to `fmod`, which lives in
|
||||||
// libm. Hence, we must explicitly link to it.
|
// 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
|
// and binutils 2.22+ won't add them automatically
|
||||||
#[cfg(target_os = "linux")]
|
#[cfg(target_os = "linux")]
|
||||||
#[link(name = "dl")]
|
#[link(name = "dl")]
|
||||||
|
|
|
@ -21,7 +21,7 @@ use result::{Result, Ok, Err};
|
||||||
|
|
||||||
/// The number of nanoseconds in a microsecond.
|
/// The number of nanoseconds in a microsecond.
|
||||||
static NANOS_PER_MICRO: i32 = 1000;
|
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;
|
static NANOS_PER_MILLI: i32 = 1000_000;
|
||||||
/// The number of nanoseconds in seconds.
|
/// The number of nanoseconds in seconds.
|
||||||
static NANOS_PER_SEC: i32 = 1_000_000_000;
|
static NANOS_PER_SEC: i32 = 1_000_000_000;
|
||||||
|
|
|
@ -501,7 +501,7 @@ impl<'a, 'b> Context<'a, 'b> {
|
||||||
// Right now there is a bug such that for the expression:
|
// Right now there is a bug such that for the expression:
|
||||||
// foo(bar(&1))
|
// foo(bar(&1))
|
||||||
// the lifetime of `1` doesn't outlast the call to `bar`, so it's not
|
// 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
|
// 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
|
// of each variable because we don't want to move out of the arguments
|
||||||
// passed to this function.
|
// passed to this function.
|
||||||
|
|
|
@ -1114,7 +1114,7 @@ impl<'a> StringReader<'a> {
|
||||||
self.bump();
|
self.bump();
|
||||||
valid &= self.scan_char_or_byte(ch_start, ch, /* ascii_only = */ false, '"');
|
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)) }
|
let id = if valid { self.name_from(start_bpos + BytePos(1)) }
|
||||||
else { token::intern("??") };
|
else { token::intern("??") };
|
||||||
self.bump();
|
self.bump();
|
||||||
|
|
|
@ -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
|
// FIXME (Issue #16472): the thing_to_string_impls macro should go away
|
||||||
// after we revise the syntax::ext::quote::ToToken impls to go directly
|
// 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 {
|
macro_rules! thing_to_string_impls {
|
||||||
($to_string:ident) => {
|
($to_string:ident) => {
|
||||||
|
|
|
@ -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
|
/// Does the given string match the pattern? whitespace in the first string
|
||||||
/// may be deleted or replaced with other whitespace to match the pattern.
|
/// 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
|
/// 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(?).
|
/// chars. Unsurprisingly, it doesn't do NKF-normalization(?).
|
||||||
pub fn matches_codepattern(a : &str, b : &str) -> bool {
|
pub fn matches_codepattern(a : &str, b : &str) -> bool {
|
||||||
let mut idx_a = 0;
|
let mut idx_a = 0;
|
||||||
|
|
|
@ -120,7 +120,7 @@ pub fn is_digit(c: char) -> bool {
|
||||||
/// Convert a char to its uppercase equivalent
|
/// Convert a char to its uppercase equivalent
|
||||||
///
|
///
|
||||||
/// The case-folding performed is the common or simple mapping:
|
/// 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
|
/// 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
|
/// The additional SpecialCasing.txt is not considered here, as it expands to multiple
|
||||||
/// codepoints in some cases.
|
/// codepoints in some cases.
|
||||||
|
@ -233,7 +233,7 @@ pub trait UnicodeChar {
|
||||||
/// Converts a character to its uppercase equivalent.
|
/// Converts a character to its uppercase equivalent.
|
||||||
///
|
///
|
||||||
/// The case-folding performed is the common or simple mapping: it maps
|
/// 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
|
/// equivalent according to the Unicode database [1]. The additional
|
||||||
/// `SpecialCasing.txt` is not considered here, as it expands to multiple
|
/// `SpecialCasing.txt` is not considered here, as it expands to multiple
|
||||||
/// codepoints in some cases.
|
/// codepoints in some cases.
|
||||||
|
|
|
@ -20,7 +20,7 @@ use std::rand::{task_rng, Rng};
|
||||||
|
|
||||||
fn random_char() -> char {
|
fn random_char() -> char {
|
||||||
let mut rng = task_rng();
|
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)
|
// compiler doesn't fail with an "unrecognised token" error)
|
||||||
let (lo, hi): (u32, u32) = match rng.gen_range(1u32, 4u32 + 1) {
|
let (lo, hi): (u32, u32) = match rng.gen_range(1u32, 4u32 + 1) {
|
||||||
1 => (0x41, 0x5a),
|
1 => (0x41, 0x5a),
|
||||||
|
|
|
@ -19,7 +19,7 @@ use std::rand::{task_rng, Rng};
|
||||||
|
|
||||||
fn random_char() -> char {
|
fn random_char() -> char {
|
||||||
let mut rng = task_rng();
|
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)
|
// compiler doesn't fail with an "unrecognised token" error)
|
||||||
let (lo, hi): (u32, u32) = match rng.gen_range(1u32, 4u32 + 1) {
|
let (lo, hi): (u32, u32) = match rng.gen_range(1u32, 4u32 + 1) {
|
||||||
1 => (0x41, 0x5a),
|
1 => (0x41, 0x5a),
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// 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
|
// solution along the lines of disabling segmented stacks and/or the
|
||||||
// stack checks.
|
// stack checks.
|
||||||
// aux-build:no_std_crate.rs
|
// aux-build:no_std_crate.rs
|
||||||
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
extern crate no_std_crate;
|
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")]
|
#[cfg(target_os = "linux")]
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
pub mod linkhack {
|
pub mod linkhack {
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
// #11303, #11040:
|
// #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
|
// between returning an Option<T> and T, where T is a non nullable
|
||||||
// pointer.
|
// pointer.
|
||||||
// If we have an enum with two variants such that one is zero sized
|
// If we have an enum with two variants such that one is zero sized
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// 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
|
// ignore-macos #7340 fails on 32-bit macos
|
||||||
|
|
||||||
use std::mem;
|
use std::mem;
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// 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
|
// ignore-macos #7340 fails on 32-bit macos
|
||||||
|
|
||||||
use std::mem;
|
use std::mem;
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// 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
|
// ignore-macos #7340 fails on 32-bit macos
|
||||||
|
|
||||||
use std::mem;
|
use std::mem;
|
||||||
|
|
Loading…
Reference in a new issue