Skip to content

Commit

Permalink
Deduplicate words in code comments
Browse files Browse the repository at this point in the history
  • Loading branch information
alco committed Jun 6, 2013
1 parent c7b19b0 commit e75572c
Show file tree
Hide file tree
Showing 18 changed files with 23 additions and 24 deletions.
2 changes: 1 addition & 1 deletion src/libextra/arc.rs
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion src/libextra/treemap.rs
Expand Up @@ -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.

Expand Down
4 changes: 2 additions & 2 deletions src/librustc/middle/borrowck/check_loans.rs
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/middle/borrowck/gather_loans/mod.rs
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/middle/liveness.rs
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/middle/resolve.rs
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/middle/trans/closure.rs
Expand Up @@ -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`.
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/middle/ty.rs
Expand Up @@ -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]>;

Expand Down
3 changes: 1 addition & 2 deletions src/librustc/middle/typeck/infer/coercion.rs
Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/core.rc
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion src/libstd/vec.rs
Expand Up @@ -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)] {
Expand Down
2 changes: 1 addition & 1 deletion src/libsyntax/parse/parser.rs
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions src/libsyntax/print/pprust.rs
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
8 changes: 4 additions & 4 deletions src/rt/arch/i386/morestack.S
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/rt/rust_kernel.cpp
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/rt/rust_task.h
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/rt/rust_upcall.cpp
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/test/run-pass/item-attributes.rs
Expand Up @@ -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 {}
Expand Down

5 comments on commit e75572c

@bors
Copy link
Contributor

@bors bors commented on e75572c Jun 6, 2013

Choose a reason for hiding this comment

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

@bors
Copy link
Contributor

@bors bors commented on e75572c Jun 6, 2013

Choose a reason for hiding this comment

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

merging alco/rust/fix-typo = e75572c into auto

@bors
Copy link
Contributor

@bors bors commented on e75572c Jun 6, 2013

Choose a reason for hiding this comment

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

alco/rust/fix-typo = e75572c merged ok, testing candidate = 7ce700a

@bors
Copy link
Contributor

@bors bors commented on e75572c Jun 6, 2013

Choose a reason for hiding this comment

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

@bors
Copy link
Contributor

@bors bors commented on e75572c Jun 6, 2013

Choose a reason for hiding this comment

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

fast-forwarding incoming to auto = 7ce700a

Please sign in to comment.