mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-20 11:43:04 +00:00
auto merge of #6966 : alco/rust/fix-typo, r=sanxiyn
This commit is contained in:
commit
7ce700aa65
@ -1297,7 +1297,7 @@ with matching types and type parameter counts.
|
||||
|
||||
An implementation can take type parameters,
|
||||
which can be different from the type parameters taken by the trait it implements.
|
||||
Implementation parameters are written after after the `impl` keyword.
|
||||
Implementation parameters are written after the `impl` keyword.
|
||||
|
||||
~~~~
|
||||
# trait Seq<T> { }
|
||||
|
@ -96,7 +96,7 @@ impl<'self> Condvar<'self> {
|
||||
|
||||
/**
|
||||
* Wake up all blocked tasks on a specified condvar (as
|
||||
* sync::cond.broadcast_on). Returns Returns the number of tasks woken.
|
||||
* sync::cond.broadcast_on). Returns the number of tasks woken.
|
||||
*/
|
||||
#[inline(always)]
|
||||
pub fn broadcast_on(&self, condvar_id: uint) -> uint {
|
||||
|
@ -19,7 +19,7 @@ use core::uint;
|
||||
use core::util::{swap, replace};
|
||||
|
||||
// This is implemented as an AA tree, which is a simplified variation of
|
||||
// a red-black tree where where red (horizontal) nodes can only be added
|
||||
// a red-black tree where red (horizontal) nodes can only be added
|
||||
// as a right child. The time complexity is the same, and re-balancing
|
||||
// operations are more frequent but also cheaper.
|
||||
|
||||
|
@ -76,7 +76,7 @@ impl<'self> CheckLoanCtxt<'self> {
|
||||
scope_id: ast::node_id,
|
||||
op: &fn(&Loan) -> bool)
|
||||
-> bool {
|
||||
//! Iterates over each loan that that has been issued
|
||||
//! Iterates over each loan that has been issued
|
||||
//! on entrance to `scope_id`, regardless of whether it is
|
||||
//! actually *in scope* at that point. Sometimes loans
|
||||
//! are issued for future scopes and thus they may have been
|
||||
@ -219,7 +219,7 @@ impl<'self> CheckLoanCtxt<'self> {
|
||||
self.bccx.span_err(
|
||||
new_loan.span,
|
||||
fmt!("cannot borrow `%s` as mutable \
|
||||
more than once at at a time",
|
||||
more than once at a time",
|
||||
self.bccx.loan_path_to_str(new_loan.loan_path)));
|
||||
self.bccx.span_note(
|
||||
old_loan.span,
|
||||
|
@ -40,7 +40,7 @@ mod gather_moves;
|
||||
|
||||
/// Context used while gathering loans:
|
||||
///
|
||||
/// - `bccx`: the the borrow check context
|
||||
/// - `bccx`: the borrow check context
|
||||
/// - `item_ub`: the id of the block for the enclosing fn/method item
|
||||
/// - `root_ub`: the id of the outermost block for which we can root
|
||||
/// an `@T`. This is the id of the innermost enclosing
|
||||
|
@ -1113,7 +1113,7 @@ impl Liveness {
|
||||
}
|
||||
|
||||
expr_again(opt_label) => {
|
||||
// Find which label this expr continues to to
|
||||
// Find which label this expr continues to
|
||||
let sc = self.find_loop_scope(opt_label, expr.id, expr.span);
|
||||
|
||||
// Now that we know the label we're going to,
|
||||
|
@ -206,7 +206,7 @@ pub enum RibKind {
|
||||
FunctionRibKind(node_id /* func id */, node_id /* body id */),
|
||||
|
||||
// We passed through an impl or trait and are now in one of its
|
||||
// methods. Allow references to ty params that that impl or trait
|
||||
// methods. Allow references to ty params that impl or trait
|
||||
// binds. Disallow any other upvars (including other ty params that are
|
||||
// upvars).
|
||||
// parent; method itself
|
||||
|
@ -374,7 +374,7 @@ pub fn trans_expr_fn(bcx: block,
|
||||
* - `decl`
|
||||
* - `body`
|
||||
* - `outer_id`: The id of the closure expression with the correct
|
||||
* type. This is usually the same as as `user_id`, but in the
|
||||
* type. This is usually the same as `user_id`, but in the
|
||||
* case of a `for` loop, the `outer_id` will have the return
|
||||
* type of boolean, and the `user_id` will have the return type
|
||||
* of `nil`.
|
||||
|
@ -221,7 +221,7 @@ pub enum AutoRef {
|
||||
// implementations.
|
||||
//
|
||||
// This is a map from ID of each implementation to the method info and trait
|
||||
// method ID of each of the default methods belonging to the trait that that
|
||||
// method ID of each of the default methods belonging to the trait that
|
||||
// implementation implements.
|
||||
pub type ProvidedMethodsMap = @mut HashMap<def_id,@mut ~[@ProvidedMethodInfo]>;
|
||||
|
||||
|
@ -369,8 +369,7 @@ impl Coerce {
|
||||
|
||||
// although borrowed ptrs and unsafe ptrs have the same
|
||||
// representation, we still register an AutoDerefRef so that
|
||||
// regionck knows that that the region for `a` must be valid
|
||||
// here
|
||||
// regionck knows that the region for `a` must be valid here
|
||||
Ok(Some(@AutoDerefRef(AutoDerefRef {
|
||||
autoderefs: 1,
|
||||
autoref: Some(ty::AutoUnsafe(mt_b.mutbl))
|
||||
|
@ -33,7 +33,7 @@ if the first line of each crate was
|
||||
|
||||
extern mod core;
|
||||
|
||||
This means that the contents of core can be accessed from from any context
|
||||
This means that the contents of core can be accessed from any context
|
||||
with the `core::` path prefix, as in `use core::vec`, `use core::task::spawn`,
|
||||
etc.
|
||||
|
||||
|
@ -1411,7 +1411,7 @@ pub fn zip_slice<T:Copy,U:Copy>(v: &const [T], u: &const [U])
|
||||
/**
|
||||
* Convert two vectors to a vector of pairs.
|
||||
*
|
||||
* Returns a vector of tuples, where the i-th tuple contains contains the
|
||||
* Returns a vector of tuples, where the i-th tuple contains the
|
||||
* i-th elements from each of the input vectors.
|
||||
*/
|
||||
pub fn zip<T, U>(mut v: ~[T], mut u: ~[U]) -> ~[(T, U)] {
|
||||
|
@ -3093,7 +3093,7 @@ impl Parser {
|
||||
|
||||
self.expect(&token::LPAREN);
|
||||
|
||||
// A bit of complexity and lookahead is needed here in order to to be
|
||||
// A bit of complexity and lookahead is needed here in order to be
|
||||
// backwards compatible.
|
||||
let lo = self.span.lo;
|
||||
let explicit_self = match *self.token {
|
||||
|
@ -1672,7 +1672,7 @@ pub fn print_fn(s: @ps,
|
||||
|
||||
pub fn print_fn_args(s: @ps, decl: &ast::fn_decl,
|
||||
opt_explicit_self: Option<ast::explicit_self_>) {
|
||||
// It is unfortunate to duplicate the commasep logic, but we we want the
|
||||
// It is unfortunate to duplicate the commasep logic, but we want the
|
||||
// self type and the args all in the same box.
|
||||
box(s, 0u, inconsistent);
|
||||
let mut first = true;
|
||||
@ -1919,7 +1919,7 @@ pub fn print_ty_fn(s: @ps,
|
||||
zerobreak(s.s);
|
||||
|
||||
popen(s);
|
||||
// It is unfortunate to duplicate the commasep logic, but we we want the
|
||||
// It is unfortunate to duplicate the commasep logic, but we want the
|
||||
// self type and the args all in the same box.
|
||||
box(s, 0u, inconsistent);
|
||||
let mut first = true;
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
Each Rust function contains an LLVM-generated prologue that
|
||||
compares the stack space required for the current function to
|
||||
the space space remaining in the current stack segment,
|
||||
the space remaining in the current stack segment,
|
||||
maintained in a platform-specific TLS slot. The stack limit
|
||||
is strategically maintained by the Rust runtime so that it is
|
||||
always in place whenever a Rust function is running.
|
||||
@ -55,7 +55,7 @@
|
||||
tiny fraction of a frame (containing just a return pointer
|
||||
and, on 32-bit, the arguments to __morestack).
|
||||
|
||||
We deal with this by claiming that that little bit of stack
|
||||
We deal with this by claiming that little bit of stack
|
||||
is actually part of the __morestack frame, encoded as
|
||||
DWARF call frame instructions (CFI) by .cfi assembler
|
||||
pseudo-ops.
|
||||
@ -119,7 +119,7 @@ MORESTACK:
|
||||
// telling the unwinder to consider the Canonical Frame
|
||||
// Address (CFA) for this frame to be the value of the stack
|
||||
// pointer prior to entry to the original function, whereas
|
||||
// the CFA would typically be the the value of the stack
|
||||
// the CFA would typically be the value of the stack
|
||||
// pointer prior to entry to this function. This will allow
|
||||
// the unwinder to understand how to skip the tiny partial
|
||||
// frame that the original function created by calling
|
||||
@ -167,7 +167,7 @@ MORESTACK:
|
||||
// The arguments to upcall_new_stack
|
||||
|
||||
// The size of the stack arguments to copy to the new stack,
|
||||
// ane of the the arguments to __morestack
|
||||
// and of the arguments to __morestack
|
||||
movl 40(%esp),%eax
|
||||
movl %eax,8(%esp)
|
||||
// The address of the stack arguments to the original function
|
||||
|
@ -162,7 +162,7 @@ rust_kernel::release_scheduler_id(rust_sched_id id) {
|
||||
}
|
||||
|
||||
/*
|
||||
Called by rust_sched_reaper to join every every terminating scheduler thread,
|
||||
Called by rust_sched_reaper to join every terminating scheduler thread,
|
||||
so that we can be sure they have completely exited before the process exits.
|
||||
If we don't join them then we can see valgrind errors due to un-freed pthread
|
||||
memory.
|
||||
|
@ -614,7 +614,7 @@ rust_task::prev_stack() {
|
||||
// The LLVM-generated segmented-stack function prolog compares the amount of
|
||||
// stack needed for each frame to the end-of-stack pointer stored in the
|
||||
// TCB. As an optimization, when the frame size is less than 256 bytes, it
|
||||
// will simply compare %esp to to the stack limit instead of subtracting the
|
||||
// will simply compare %esp to the stack limit instead of subtracting the
|
||||
// frame size. As a result we need our stack limit to account for those 256
|
||||
// bytes.
|
||||
const unsigned LIMIT_OFFSET = 256;
|
||||
|
@ -191,7 +191,7 @@ upcall_malloc(type_desc *td, uintptr_t size) {
|
||||
|
||||
// FIXME (#2861): Alias used by libcore/rt.rs to avoid naming conflicts with
|
||||
// autogenerated wrappers for upcall_malloc. Remove this when we fully move
|
||||
// away away from the C upcall path.
|
||||
// away from the C upcall path.
|
||||
extern "C" CDECL uintptr_t
|
||||
rust_upcall_malloc(type_desc *td, uintptr_t size) {
|
||||
return upcall_malloc(td, size);
|
||||
|
@ -22,7 +22,7 @@
|
||||
uuid = "122bed0b-c19b-4b82-b0b7-7ae8aead7297",
|
||||
url = "http://rust-lang.org/src/extra")];
|
||||
|
||||
// These are are attributes of the following mod
|
||||
// These are attributes of the following mod
|
||||
#[attr1 = "val"]
|
||||
#[attr2 = "val"]
|
||||
mod test_first_item_in_file_mod {}
|
||||
|
Loading…
Reference in New Issue
Block a user