Skip to content

Commit

Permalink
Fix more misspelled comments and strings.
Browse files Browse the repository at this point in the history
  • Loading branch information
jbcrail committed Jun 10, 2014
1 parent 0ee6a8e commit c2c9946
Show file tree
Hide file tree
Showing 48 changed files with 64 additions and 64 deletions.
2 changes: 1 addition & 1 deletion src/liballoc/arc.rs
Expand Up @@ -184,7 +184,7 @@ impl<T: Share + Send> Drop for Arc<T> {

// This fence is needed to prevent reordering of use of the data and
// deletion of the data. Because it is marked `Release`, the
// decreasing of the reference count sychronizes with this `Acquire`
// decreasing of the reference count synchronizes with this `Acquire`
// fence. This means that use of the data happens before decreasing
// the refernce count, which happens before this fence, which
// happens before the deletion of the data.
Expand Down
2 changes: 1 addition & 1 deletion src/libcore/fmt/mod.rs
Expand Up @@ -539,7 +539,7 @@ impl<'a> Formatter<'a> {
}

/// Runs a callback, emitting the correct padding either before or
/// afterwards depending on whether right or left alingment is requested.
/// afterwards depending on whether right or left alignment is requested.
fn with_padding(&mut self,
padding: uint,
default: rt::Alignment,
Expand Down
2 changes: 1 addition & 1 deletion src/libcore/result.rs
Expand Up @@ -105,7 +105,7 @@
//! *Note: The actual definition of `Writer` uses `IoResult`, which
//! is just a synonym for `Result<T, IoError>`.*
//!
//! This method doesn`t produce a value, but the write may
//! This method doesn't produce a value, but the write may
//! fail. It's crucial to handle the error case, and *not* write
//! something like this:
//!
Expand Down
2 changes: 1 addition & 1 deletion src/libgetopts/lib.rs
Expand Up @@ -163,7 +163,7 @@ pub struct OptGroup {
pub occur: Occur
}

/// Describes wether an option is given at all or has a value.
/// Describes whether an option is given at all or has a value.
#[deriving(Clone, PartialEq)]
enum Optval {
Val(String),
Expand Down
2 changes: 1 addition & 1 deletion src/libgreen/context.rs
Expand Up @@ -226,7 +226,7 @@ fn initialize_call_frame(regs: &mut Registers, fptr: InitFn, arg: uint,
regs[RUSTRT_R14] = procedure.env as uint;
regs[RUSTRT_R15] = fptr as uint;

// These registers are picked up by the regulard context switch paths. These
// These registers are picked up by the regular context switch paths. These
// will put us in "mostly the right context" except for frobbing all the
// arguments to the right place. We have the small trampoline code inside of
// rust_bootstrap_green_task to do that.
Expand Down
4 changes: 2 additions & 2 deletions src/libgreen/sched.rs
Expand Up @@ -82,7 +82,7 @@ pub struct Scheduler {
run_anything: bool,
/// A fast XorShift rng for scheduler use
rng: XorShiftRng,
/// A togglable idle callback
/// A toggleable idle callback
idle_callback: Option<Box<PausableIdleCallback:Send>>,
/// A countdown that starts at a random value and is decremented
/// every time a yield check is performed. When it hits 0 a task
Expand Down Expand Up @@ -287,7 +287,7 @@ impl Scheduler {

// After processing a message, we consider doing some more work on the
// event loop. The "keep going" condition changes after the first
// iteration becase we don't want to spin here infinitely.
// iteration because we don't want to spin here infinitely.
//
// Once we start doing work we can keep doing work so long as the
// iteration does something. Note that we don't want to starve the
Expand Down
4 changes: 2 additions & 2 deletions src/liblibc/lib.rs
Expand Up @@ -291,7 +291,7 @@ pub use types::os::arch::extra::{mach_timebase_info};
extern {}

/// A wrapper for a nullable pointer. Don't use this except for interacting
/// with libc. Basically Option, but without the dependance on libstd.
/// with libc. Basically Option, but without the dependence on libstd.
// If/when libprim happens, this can be removed in favor of that
pub enum Nullable<T> {
Null,
Expand Down Expand Up @@ -3497,7 +3497,7 @@ pub mod consts {


pub mod funcs {
// Thankfull most of c95 is universally available and does not vary by OS
// Thankfully most of c95 is universally available and does not vary by OS
// or anything. The same is not true of POSIX.

pub mod c95 {
Expand Down
2 changes: 1 addition & 1 deletion src/libnative/io/pipe_win32.rs
Expand Up @@ -50,7 +50,7 @@
//! it sounded like named pipes just weren't built for this kind of interaction,
//! and the suggested solution was to use overlapped I/O.
//!
//! I don't realy know what overlapped I/O is, but my basic understanding after
//! I don't really know what overlapped I/O is, but my basic understanding after
//! reading about it is that you have an external Event which is used to signal
//! I/O completion, passed around in some OVERLAPPED structures. As to what this
//! is, I'm not exactly sure.
Expand Down
2 changes: 1 addition & 1 deletion src/libnative/io/process.rs
Expand Up @@ -923,7 +923,7 @@ fn waitpid(pid: pid_t, deadline: u64) -> IoResult<rtio::ProcessExit> {
// Register a new SIGCHLD handler, returning the reading half of the
// self-pipe plus the old handler registered (return value of sigaction).
//
// Be sure to set up the self-pipe first because as soon as we reigster a
// Be sure to set up the self-pipe first because as soon as we register a
// handler we're going to start receiving signals.
fn register_sigchld() -> (libc::c_int, c::sigaction) {
unsafe {
Expand Down
2 changes: 1 addition & 1 deletion src/libnative/task.rs
Expand Up @@ -166,7 +166,7 @@ impl rt::Runtime for Ops {
//
// On a mildly unrelated note, it should also be pointed out that OS
// condition variables are susceptible to spurious wakeups, which we need to
// be ready for. In order to accomodate for this fact, we have an extra
// be ready for. In order to accommodate for this fact, we have an extra
// `awoken` field which indicates whether we were actually woken up via some
// invocation of `reawaken`. This flag is only ever accessed inside the
// lock, so there's no need to make it atomic.
Expand Down
4 changes: 2 additions & 2 deletions src/libregex/compile.rs
Expand Up @@ -34,7 +34,7 @@ pub enum Inst {

// The CharClass instruction tries to match one input character against
// the range of characters given.
// The flags indicate whether to do a case insentivie match and whether
// The flags indicate whether to do a case insensitive match and whether
// the character class is negated or not.
CharClass(Vec<(char, char)>, Flags),

Expand All @@ -48,7 +48,7 @@ pub enum Inst {
EmptyBegin(Flags),

// Matches the end of the string, consumes no characters.
// The flags indicate whether it matches if the proceding character
// The flags indicate whether it matches if the proceeding character
// is a new line.
EmptyEnd(Flags),

Expand Down
2 changes: 1 addition & 1 deletion src/librustc/driver/mod.rs
Expand Up @@ -189,7 +189,7 @@ fn describe_codegen_flags() {
}
}

/// Process command line options. Emits messages as appropirate.If compilation
/// Process command line options. Emits messages as appropriate. If compilation
/// should continue, returns a getopts::Matches object parsed from args, otherwise
/// returns None.
pub fn handle_options(mut args: Vec<String>) -> Option<getopts::Matches> {
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/middle/borrowck/doc.rs
Expand Up @@ -551,7 +551,7 @@ are computed based on the kind of borrow:
The reasoning here is that a mutable borrow must be the only writer,
therefore it prevents other writes (`MUTATE`), mutable borrows
(`CLAIM`), and immutable borrows (`FREEZE`). An immutable borrow
permits other immutable borrows but forbids writes and mutable borows.
permits other immutable borrows but forbids writes and mutable borrows.
Finally, a const borrow just wants to be sure that the value is not
moved out from under it, so no actions are forbidden.
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/middle/expr_use_visitor.rs
Expand Up @@ -438,7 +438,7 @@ impl<'d,'t,TYPER:mc::Typer> ExprUseVisitor<'d,'t,TYPER> {
None => {
self.tcx().sess.span_bug(
callee.span,
format!("unxpected callee type {}",
format!("unexpected callee type {}",
callee_ty.repr(self.tcx())).as_slice());
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/middle/graph.rs
Expand Up @@ -257,7 +257,7 @@ impl<N,E> Graph<N,E> {
//
// A common use for graphs in our compiler is to perform
// fixed-point iteration. In this case, each edge represents a
// constaint, and the nodes themselves are associated with
// constraint, and the nodes themselves are associated with
// variables or other bitsets. This method facilitates such a
// computation.

Expand Down
4 changes: 2 additions & 2 deletions src/librustc/middle/mem_categorization.rs
Expand Up @@ -31,7 +31,7 @@
* is the address of the lvalue. If Expr is an rvalue, this is the address of
* some temporary spot in memory where the result is stored.
*
* Now, cat_expr() classies the expression Expr and the address A=ToAddr(Expr)
* Now, cat_expr() classifies the expression Expr and the address A=ToAddr(Expr)
* as follows:
*
* - cat: what kind of expression was this? This is a subset of the
Expand All @@ -42,7 +42,7 @@
*
* The resulting categorization tree differs somewhat from the expressions
* themselves. For example, auto-derefs are explicit. Also, an index a[b] is
* decomposed into two operations: a derefence to reach the array data and
* decomposed into two operations: a dereference to reach the array data and
* then an index to jump forward to the relevant item.
*
* ## By-reference upvars
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/middle/region.rs
Expand Up @@ -39,7 +39,7 @@ The region maps encode information about region relationships.
- `scope_map` maps from a scope id to the enclosing scope id; this is
usually corresponding to the lexical nesting, though in the case of
closures the parent scope is the innermost conditinal expression or repeating
closures the parent scope is the innermost conditional expression or repeating
block
- `var_map` maps from a variable or binding id to the block in which
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/middle/trans/adt.rs
Expand Up @@ -717,7 +717,7 @@ pub fn trans_field_ptr(bcx: &Block, r: &Repr, val: ValueRef, discr: Disr,
let ty = type_of::type_of(bcx.ccx(), *nullfields.get(ix));
assert_eq!(machine::llsize_of_alloc(bcx.ccx(), ty), 0);
// The contents of memory at this pointer can't matter, but use
// the value that's "reasonable" in case of pointer comparision.
// the value that's "reasonable" in case of pointer comparison.
PointerCast(bcx, val, ty.ptr_to())
}
RawNullablePointer { nndiscr, nnty, .. } => {
Expand Down
4 changes: 2 additions & 2 deletions src/librustc/middle/trans/base.rs
Expand Up @@ -1571,7 +1571,7 @@ fn enum_variant_size_lint(ccx: &CrateContext, enum_def: &ast::EnumDef, sp: Span,
for var in variants.iter() {
let mut size = 0;
for field in var.fields.iter().skip(1) {
// skip the dicriminant
// skip the discriminant
size += llsize_of_real(ccx, sizing_type_of(ccx, *field));
}
sizes.push(size);
Expand Down Expand Up @@ -2318,7 +2318,7 @@ pub fn trans_crate(krate: ast::Crate,
// LLVM code generator emits a ".file filename" directive
// for ELF backends. Value of the "filename" is set as the
// LLVM module identifier. Due to a LLVM MC bug[1], LLVM
// crashes if the module identifer is same as other symbols
// crashes if the module identifier is same as other symbols
// such as a function name in the module.
// 1. http://llvm.org/bugs/show_bug.cgi?id=11479
let mut llmod_id = link_meta.crateid.name.clone();
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/middle/trans/debuginfo.rs
Expand Up @@ -1527,7 +1527,7 @@ impl EnumMemberDescriptionFactory {
// As far as debuginfo is concerned, the pointer this enum represents is still
// wrapped in a struct. This is to make the DWARF representation of enums uniform.

// First create a description of the artifical wrapper struct:
// First create a description of the artificial wrapper struct:
let non_null_variant = self.variants.get(non_null_variant_index as uint);
let non_null_variant_ident = non_null_variant.name;
let non_null_variant_name = token::get_ident(non_null_variant_ident);
Expand Down
6 changes: 3 additions & 3 deletions src/librustc/middle/typeck/check/mod.rs
Expand Up @@ -204,7 +204,7 @@ impl FnStyleState {
}

/// Whether `check_binop` is part of an assignment or not.
/// Used to know wether we allow user overloads and to print
/// Used to know whether we allow user overloads and to print
/// better messages on error.
#[deriving(PartialEq)]
enum IsBinopAssignment{
Expand Down Expand Up @@ -3702,7 +3702,7 @@ pub fn check_const_with_ty(fcx: &FnCtxt,
e: &ast::Expr,
declty: ty::t) {
// Gather locals in statics (because of block expressions).
// This is technically uneccessary because locals in static items are forbidden,
// This is technically unnecessary because locals in static items are forbidden,
// but prevents type checking from blowing up before const checking can properly
// emit a error.
GatherLocalsVisitor { fcx: fcx }.visit_expr(e, ());
Expand Down Expand Up @@ -4174,7 +4174,7 @@ pub fn instantiate_path(fcx: &FnCtxt,
}
None => {
fcx.tcx().sess.span_bug(span,
"missing default for a not explicitely provided type param")
"missing default for a not explicitly provided type param")
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/middle/typeck/infer/coercion.rs
Expand Up @@ -180,7 +180,7 @@ impl<'f> Coerce<'f> {
self.unpack_actual_value(a, |sty_a| {
match *sty_a {
ty::ty_bare_fn(ref a_f) => {
// Bare functions are coercable to any closure type.
// Bare functions are coercible to any closure type.
//
// FIXME(#3320) this should go away and be
// replaced with proper inference, got a patch
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/middle/typeck/infer/combine.rs
Expand Up @@ -372,7 +372,7 @@ pub fn super_fn_sigs<C:Combine>(this: &C, a: &ty::FnSig, b: &ty::FnSig) -> cres<

pub fn super_tys<C:Combine>(this: &C, a: ty::t, b: ty::t) -> cres<ty::t> {

// This is a horible hack - historically, [T] was not treated as a type,
// This is a horrible hack - historically, [T] was not treated as a type,
// so, for example, &T and &[U] should not unify. In fact the only thing
// &[U] should unify with is &[T]. We preserve that behaviour with this
// check.
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/middle/typeck/infer/error_reporting.rs
Expand Up @@ -17,7 +17,7 @@ works, it often happens that errors are not detected until far after
the relevant line of code has been type-checked. Therefore, there is
an elaborate system to track why a particular constraint in the
inference graph arose so that we can explain to the user what gave
rise to a patricular error.
rise to a particular error.
The basis of the system are the "origin" types. An "origin" is the
reason that a constraint or inference variable arose. There are
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/middle/typeck/infer/lattice.rs
Expand Up @@ -19,7 +19,7 @@
* The code in here is defined quite generically so that it can be
* applied both to type variables, which represent types being inferred,
* and fn variables, which represent function types being inferred.
* It may eventually be applied to ther types as well, who knows.
* It may eventually be applied to their types as well, who knows.
* In some cases, the functions are also generic with respect to the
* operation on the lattice (GLB vs LUB).
*
Expand Down
4 changes: 2 additions & 2 deletions src/librustc/middle/typeck/infer/region_inference/doc.rs
Expand Up @@ -362,7 +362,7 @@ identify and remove strongly connected components (SCC) in the graph.
Note that such components must consist solely of region variables; all
of these variables can effectively be unified into a single variable.
Once SCCs are removed, we are left with a DAG. At this point, we
could walk the DAG in toplogical order once to compute the expanding
could walk the DAG in topological order once to compute the expanding
nodes, and again in reverse topological order to compute the
contracting nodes. However, as I said, this does not work given the
current treatment of closure bounds, but perhaps in the future we can
Expand Down Expand Up @@ -617,7 +617,7 @@ created to replace the bound regions in the input types, but it also
contains 'intermediate' variables created to represent the LUB/GLB of
individual regions. Basically, when asked to compute the LUB/GLB of a
region variable with another region, the inferencer cannot oblige
immediately since the valuese of that variables are not known.
immediately since the values of that variables are not known.
Therefore, it creates a new variable that is related to the two
regions. For example, the LUB of two variables `$x` and `$y` is a
fresh variable `$z` that is constrained such that `$x <= $z` and `$y
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/middle/typeck/variance.rs
Expand Up @@ -485,7 +485,7 @@ impl<'a> Visitor<()> for ConstraintContext<'a> {
let variant =
ty::VariantInfo::from_ast_variant(tcx,
ast_variant,
/*discrimant*/ 0);
/*discriminant*/ 0);
for &arg_ty in variant.args.iter() {
self.add_constraints_from_ty(arg_ty, self.covariant);
}
Expand Down
4 changes: 2 additions & 2 deletions src/librustc/util/sha2.rs
Expand Up @@ -61,12 +61,12 @@ fn add_bytes_to_bits<T: Int + CheckedAdd + ToBits>(bits: T, bytes: T) -> T {
let (new_high_bits, new_low_bits) = bytes.to_bits();

if new_high_bits > Zero::zero() {
fail!("numeric overflow occured.")
fail!("numeric overflow occurred.")
}

match bits.checked_add(&new_low_bits) {
Some(x) => return x,
None => fail!("numeric overflow occured.")
None => fail!("numeric overflow occurred.")
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/librustdoc/html/markdown.rs
Expand Up @@ -390,7 +390,7 @@ fn parse_lang_string(string: &str) -> (bool,bool,bool,bool) {
}

/// By default this markdown renderer generates anchors for each header in the
/// rendered document. The anchor name is the contents of the header spearated
/// rendered document. The anchor name is the contents of the header separated
/// by hyphens, and a task-local map is used to disambiguate among duplicate
/// headers (numbers are appended).
///
Expand Down
8 changes: 4 additions & 4 deletions src/librustdoc/html/toc.rs
Expand Up @@ -49,11 +49,11 @@ pub struct TocEntry {
#[deriving(PartialEq)]
pub struct TocBuilder {
top_level: Toc,
/// The current heirachy of parent headings, the levels are
/// The current hierarchy of parent headings, the levels are
/// strictly increasing (i.e. chain[0].level < chain[1].level <
/// ...) with each entry being the most recent occurance of a
/// ...) with each entry being the most recent occurrence of a
/// heading with that level (it doesn't include the most recent
/// occurences of every level, just, if *is* in `chain` then is is
/// occurrences of every level, just, if *is* in `chain` then is is
/// the most recent one).
///
/// We also have `chain[0].level <= top_level.entries[last]`.
Expand Down Expand Up @@ -123,7 +123,7 @@ impl TocBuilder {
}

/// Push a level `level` heading into the appropriate place in the
/// heirarchy, returning a string containing the section number in
/// hierarchy, returning a string containing the section number in
/// `<num>.<num>.<num>` format.
pub fn push<'a>(&'a mut self, level: u32, name: String, id: String) -> &'a str {
assert!(level >= 1);
Expand Down
2 changes: 1 addition & 1 deletion src/librustdoc/passes.rs
Expand Up @@ -383,7 +383,7 @@ mod unindent_tests {

#[test]
fn should_ignore_first_line_indent() {
// Thi first line of the first paragraph may not be indented as
// The first line of the first paragraph may not be indented as
// far due to the way the doc string was written:
//
// #[doc = "Start way over here
Expand Down
2 changes: 1 addition & 1 deletion src/librustrt/task.rs
Expand Up @@ -163,7 +163,7 @@ impl Task {

// Here we must unsafely borrow the task in order to not remove it from
// TLS. When collecting failure, we may attempt to send on a channel (or
// just run aribitrary code), so we must be sure to still have a local
// just run arbitrary code), so we must be sure to still have a local
// task in TLS.
unsafe {
let me: *mut Task = Local::unsafe_borrow();
Expand Down
4 changes: 2 additions & 2 deletions src/librustrt/unwind.rs
Expand Up @@ -395,7 +395,7 @@ pub fn begin_unwind<M: Any + Send>(msg: M, file: &'static str, line: uint) -> !
/// The core of the unwinding.
///
/// This is non-generic to avoid instantiation bloat in other crates
/// (which makes compilation of small crates noticably slower). (Note:
/// (which makes compilation of small crates noticeably slower). (Note:
/// we need the `Any` object anyway, we're not just creating it to
/// avoid being generic.)
///
Expand All @@ -408,7 +408,7 @@ fn begin_unwind_inner(msg: Box<Any:Send>,
// First, invoke call the user-defined callbacks triggered on task failure.
//
// By the time that we see a callback has been registered (by reading
// MAX_CALLBACKS), the actuall callback itself may have not been stored yet,
// MAX_CALLBACKS), the actual callback itself may have not been stored yet,
// so we just chalk it up to a race condition and move on to the next
// callback. Additionally, CALLBACK_CNT may briefly be higher than
// MAX_CALLBACKS, so we're sure to clamp it as necessary.
Expand Down

5 comments on commit c2c9946

@bors
Copy link
Contributor

@bors bors commented on c2c9946 Jun 10, 2014

Choose a reason for hiding this comment

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

saw approval from alexcrichton
at jbcrail@c2c9946

@bors
Copy link
Contributor

@bors bors commented on c2c9946 Jun 10, 2014

Choose a reason for hiding this comment

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

merging jbcrail/rust/fix-more-comments = c2c9946 into auto

@bors
Copy link
Contributor

@bors bors commented on c2c9946 Jun 10, 2014

Choose a reason for hiding this comment

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

jbcrail/rust/fix-more-comments = c2c9946 merged ok, testing candidate = b1302f9

@bors
Copy link
Contributor

@bors bors commented on c2c9946 Jun 10, 2014

Choose a reason for hiding this comment

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

fast-forwarding master to auto = b1302f9

Please sign in to comment.