diff --git a/doc/rust.md b/doc/rust.md index 787d0191b0930..592bdcf3a3dc0 100644 --- a/doc/rust.md +++ b/doc/rust.md @@ -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 { } diff --git a/src/libextra/arc.rs b/src/libextra/arc.rs index 15c24052563b4..0618e7aaf65c9 100644 --- a/src/libextra/arc.rs +++ b/src/libextra/arc.rs @@ -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 { diff --git a/src/libextra/treemap.rs b/src/libextra/treemap.rs index c39984791689c..ebb0cdc120fbb 100644 --- a/src/libextra/treemap.rs +++ b/src/libextra/treemap.rs @@ -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. diff --git a/src/librustc/middle/borrowck/check_loans.rs b/src/librustc/middle/borrowck/check_loans.rs index 7890e1b9f35bb..30ddab0173072 100644 --- a/src/librustc/middle/borrowck/check_loans.rs +++ b/src/librustc/middle/borrowck/check_loans.rs @@ -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, diff --git a/src/librustc/middle/borrowck/gather_loans/mod.rs b/src/librustc/middle/borrowck/gather_loans/mod.rs index 448f35faa469a..805d68214c33c 100644 --- a/src/librustc/middle/borrowck/gather_loans/mod.rs +++ b/src/librustc/middle/borrowck/gather_loans/mod.rs @@ -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 diff --git a/src/librustc/middle/liveness.rs b/src/librustc/middle/liveness.rs index d3a563ca31204..3097be242a1ed 100644 --- a/src/librustc/middle/liveness.rs +++ b/src/librustc/middle/liveness.rs @@ -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, diff --git a/src/librustc/middle/resolve.rs b/src/librustc/middle/resolve.rs index c23932b14b51c..f1ebe88db0c6f 100644 --- a/src/librustc/middle/resolve.rs +++ b/src/librustc/middle/resolve.rs @@ -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 diff --git a/src/librustc/middle/trans/closure.rs b/src/librustc/middle/trans/closure.rs index c8405c929cb58..27d962d6cc7f6 100644 --- a/src/librustc/middle/trans/closure.rs +++ b/src/librustc/middle/trans/closure.rs @@ -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`. diff --git a/src/librustc/middle/ty.rs b/src/librustc/middle/ty.rs index 363af7c9e56ca..597063d8fc39d 100644 --- a/src/librustc/middle/ty.rs +++ b/src/librustc/middle/ty.rs @@ -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; diff --git a/src/librustc/middle/typeck/infer/coercion.rs b/src/librustc/middle/typeck/infer/coercion.rs index 47f49ade336d1..18940bb89e147 100644 --- a/src/librustc/middle/typeck/infer/coercion.rs +++ b/src/librustc/middle/typeck/infer/coercion.rs @@ -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)) diff --git a/src/libstd/core.rc b/src/libstd/core.rc index e629db9244dbd..a6334cc0c4964 100644 --- a/src/libstd/core.rc +++ b/src/libstd/core.rc @@ -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. diff --git a/src/libstd/vec.rs b/src/libstd/vec.rs index 58b0193d300d3..80905bdaeab7e 100644 --- a/src/libstd/vec.rs +++ b/src/libstd/vec.rs @@ -1411,7 +1411,7 @@ pub fn zip_slice(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(mut v: ~[T], mut u: ~[U]) -> ~[(T, U)] { diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 2fd0a7e33fff0..a6b67ccea9d2a 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -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 { diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs index 57e78d3ad8409..e871ee5c9bf88 100644 --- a/src/libsyntax/print/pprust.rs +++ b/src/libsyntax/print/pprust.rs @@ -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) { - // 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; diff --git a/src/rt/arch/i386/morestack.S b/src/rt/arch/i386/morestack.S index c1cd11fa432af..1b27682080567 100644 --- a/src/rt/arch/i386/morestack.S +++ b/src/rt/arch/i386/morestack.S @@ -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 diff --git a/src/rt/rust_kernel.cpp b/src/rt/rust_kernel.cpp index bf48554696ebd..c1c40222f1a3b 100644 --- a/src/rt/rust_kernel.cpp +++ b/src/rt/rust_kernel.cpp @@ -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. diff --git a/src/rt/rust_task.h b/src/rt/rust_task.h index 213aee6a9ebcc..982102cdde0cd 100644 --- a/src/rt/rust_task.h +++ b/src/rt/rust_task.h @@ -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; diff --git a/src/rt/rust_upcall.cpp b/src/rt/rust_upcall.cpp index 658fdec6df2c3..c011219ade8b4 100644 --- a/src/rt/rust_upcall.cpp +++ b/src/rt/rust_upcall.cpp @@ -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); diff --git a/src/test/run-pass/item-attributes.rs b/src/test/run-pass/item-attributes.rs index de11ce2bdf2cd..187f898f4ca0a 100644 --- a/src/test/run-pass/item-attributes.rs +++ b/src/test/run-pass/item-attributes.rs @@ -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 {}