Skip to content

Commit

Permalink
Fix for misspelled comments.
Browse files Browse the repository at this point in the history
The spelling corrections were made in both documentation comments and
regular comments.
  • Loading branch information
jbcrail committed Feb 5, 2015
1 parent ba2f13e commit dc2e444
Show file tree
Hide file tree
Showing 27 changed files with 36 additions and 36 deletions.
2 changes: 1 addition & 1 deletion src/doc/trpl/ownership.md
Expand Up @@ -523,7 +523,7 @@ fn print<'a>(s: &'a str); // expanded
fn debug(lvl: u32, s: &str); // elided
fn debug<'a>(lvl: u32, s: &'a str); // expanded
// In the preceeding example, `lvl` doesn't need a lifetime because it's not a
// In the preceding example, `lvl` doesn't need a lifetime because it's not a
// reference (`&`). Only things relating to references (such as a `struct`
// which contains a reference) need lifetimes.
Expand Down
2 changes: 1 addition & 1 deletion src/grammar/parser-lalr.y
Expand Up @@ -1195,7 +1195,7 @@ maybe_stmts
//
// There are also two other expr subtypes: first, nonparen_expr
// disallows exprs surrounded by parens (including tuple expressions),
// this is neccesary for BOX (place) expressions, so a parens expr
// this is necessary for BOX (place) expressions, so a parens expr
// following the BOX is always parsed as the place. There is also
// expr_norange used in index_expr, which disallows '..' in
// expressions as that has special meaning inside of brackets.
Expand Down
4 changes: 2 additions & 2 deletions src/liballoc/arc.rs
Expand Up @@ -311,7 +311,7 @@ impl<T: Sync + Send> Drop for Arc<T> {
///
/// // stuff
///
/// drop(five); // explict drop
/// drop(five); // explicit drop
/// }
/// {
/// let five = Arc::new(5);
Expand Down Expand Up @@ -441,7 +441,7 @@ impl<T: Sync + Send> Drop for Weak<T> {
///
/// // stuff
///
/// drop(weak_five); // explict drop
/// drop(weak_five); // explicit drop
/// }
/// {
/// let five = Arc::new(5);
Expand Down
4 changes: 2 additions & 2 deletions src/liballoc/rc.rs
Expand Up @@ -382,7 +382,7 @@ impl<T> Drop for Rc<T> {
///
/// // stuff
///
/// drop(five); // explict drop
/// drop(five); // explicit drop
/// }
/// {
/// let five = Rc::new(5);
Expand Down Expand Up @@ -687,7 +687,7 @@ impl<T> Drop for Weak<T> {
///
/// // stuff
///
/// drop(weak_five); // explict drop
/// drop(weak_five); // explicit drop
/// }
/// {
/// let five = Rc::new(5);
Expand Down
2 changes: 1 addition & 1 deletion src/libcollections/btree/node.rs
Expand Up @@ -669,7 +669,7 @@ impl<'a, K: 'a, V: 'a> Handle<&'a mut Node<K, V>, handle::Edge, handle::Internal

impl<K, V, NodeRef: Deref<Target=Node<K, V>>> Handle<NodeRef, handle::Edge, handle::Internal> {
// This doesn't exist because there are no uses for it,
// but is fine to add, analagous to edge_mut.
// but is fine to add, analogous to edge_mut.
//
// /// Returns a reference to the edge pointed-to by this handle. This should not be
// /// confused with `node`, which references the parent node of what is returned here.
Expand Down
2 changes: 1 addition & 1 deletion src/libcore/iter.rs
Expand Up @@ -260,7 +260,7 @@ pub trait IteratorExt: Iterator + Sized {
}

/// Creates an iterator that applies the predicate to each element returned
/// by this iterator. The only elements that will be yieled are those that
/// by this iterator. The only elements that will be yielded are those that
/// make the predicate evaluate to `true`.
///
/// # Examples
Expand Down
4 changes: 2 additions & 2 deletions src/librustc/diagnostics.rs
Expand Up @@ -14,9 +14,9 @@ register_long_diagnostics! {
E0001: r##"
This error suggests that the expression arm corresponding to the noted pattern
will never be reached as for all possible values of the expression being matched,
one of the preceeding patterns will match.
one of the preceding patterns will match.
This means that perhaps some of the preceeding patterns are too general, this
This means that perhaps some of the preceding patterns are too general, this
one is too specific or the ordering is incorrect.
"##,

Expand Down
4 changes: 2 additions & 2 deletions src/librustc/middle/traits/select.rs
Expand Up @@ -775,7 +775,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
-> bool
{
// In general, it's a good idea to cache results, even
// ambigious ones, to save us some trouble later. But we have
// ambiguous ones, to save us some trouble later. But we have
// to be careful not to cache results that could be
// invalidated later by advances in inference. Normally, this
// is not an issue, because any inference variables whose
Expand Down Expand Up @@ -1273,7 +1273,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
///
/// - The impl is conditional, in which case we may not have winnowed it out
/// because we don't know if the conditions apply, but the where clause is basically
/// telling us taht there is some impl, though not necessarily the one we see.
/// telling us that there is some impl, though not necessarily the one we see.
///
/// In both cases we prefer to take the where clause, which is
/// essentially harmless. See issue #18453 for more details of
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/middle/ty.rs
Expand Up @@ -2520,7 +2520,7 @@ impl FlagComputation {
fn add_bound_computation(&mut self, computation: &FlagComputation) {
self.add_flags(computation.flags);

// The types that contributed to `computation` occured within
// The types that contributed to `computation` occurred within
// a region binder, so subtract one from the region depth
// within when adding the depth to `self`.
let depth = computation.depth;
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_borrowck/borrowck/doc.rs
Expand Up @@ -142,7 +142,7 @@
//! which contains an empty set of actions, still has a purpose---it
//! prevents moves from `LV`. I chose not to make `MOVE` a fourth kind of
//! action because that would imply that sometimes moves are permitted
//! from restrictived values, which is not the case.
//! from restricted values, which is not the case.
//!
//! #### Example
//!
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_driver/driver.rs
Expand Up @@ -171,7 +171,7 @@ pub fn source_name(input: &Input) -> String {
/// CompileController is used to customise compilation, it allows compilation to
/// be stopped and/or to call arbitrary code at various points in compilation.
/// It also allows for various flags to be set to influence what information gets
/// colelcted during compilation.
/// collected during compilation.
///
/// This is a somewhat higher level controller than a Session - the Session
/// controls what happens in each phase, whereas the CompileController controls
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_resolve/diagnostics.rs
Expand Up @@ -20,7 +20,7 @@ register_diagnostics! {
E0254, // import conflicts with imported crate in this module
E0255, // import conflicts with value in this module
E0256, // import conflicts with type in this module
E0257, // inherent implementations are only allowen on types defined in the current module
E0257, // inherent implementations are only allowed on types defined in the current module
E0258, // import conflicts with existing submodule
E0259, // an extern crate has already been imported into this module
E0260 // name conflicts with an external crate that has been imported into this module
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_trans/trans/intrinsic.rs
Expand Up @@ -365,7 +365,7 @@ pub fn trans_intrinsic_call<'a, 'blk, 'tcx>(mut bcx: Block<'blk, 'tcx>,
(_, "init") => {
let tp_ty = *substs.types.get(FnSpace, 0);
if !return_type_is_void(ccx, tp_ty) {
// Just zero out the stack slot. (See comment on base::memzero for explaination)
// Just zero out the stack slot. (See comment on base::memzero for explanation)
zero_mem(bcx, llresult, tp_ty);
}
C_nil(ccx)
Expand Down
4 changes: 2 additions & 2 deletions src/librustc_typeck/check/compare_method.rs
Expand Up @@ -159,11 +159,11 @@ pub fn compare_impl_method<'tcx>(tcx: &ty::ctxt<'tcx>,
// vs 'b). However, the normal subtyping rules on fn types handle
// this kind of equivalency just fine.
//
// We now use these subsititions to ensure that all declared bounds are
// We now use these substitutions to ensure that all declared bounds are
// satisfied by the implementation's method.
//
// We do this by creating a parameter environment which contains a
// substition corresponding to impl_to_skol_substs. We then build
// substitution corresponding to impl_to_skol_substs. We then build
// trait_to_skol_substs and use it to convert the predicates contained
// in the trait_m.generics to the skolemized form.
//
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_typeck/check/vtable.rs
Expand Up @@ -288,7 +288,7 @@ pub fn select_all_fcx_obligations_and_apply_defaults(fcx: &FnCtxt) {
pub fn select_all_fcx_obligations_or_error(fcx: &FnCtxt) {
debug!("select_all_fcx_obligations_or_error");

// upvar inference should have ensured that all deferrred call
// upvar inference should have ensured that all deferred call
// resolutions are handled by now.
assert!(fcx.inh.deferred_call_resolutions.borrow().is_empty());

Expand Down
4 changes: 2 additions & 2 deletions src/librustc_typeck/diagnostics.rs
Expand Up @@ -108,7 +108,7 @@ register_diagnostics! {
E0189, // can only cast a boxed pointer to a boxed object
E0190, // can only cast a &-pointer to an &-object
E0191, // value of the associated type must be specified
E0192, // negative imples are allowed just fo `Send` and `Sync`
E0192, // negative imples are allowed just for `Send` and `Sync`
E0193, // cannot bound type where clause bounds may only be attached to types
// involving type parameters
E0194,
Expand All @@ -119,7 +119,7 @@ register_diagnostics! {
E0199, // implementing trait is not unsafe
E0200, // trait requires an `unsafe impl` declaration
E0201, // duplicate method in trait impl
E0202, // associated items are not allowed in inherint impls
E0202, // associated items are not allowed in inherent impls
E0203, // type parameter has more than one relaxed default bound,
// and only one is supported
E0204, // trait `Copy` may not be implemented for this type; field
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/collections/mod.rs
Expand Up @@ -313,7 +313,7 @@
//!
//! assert_eq!(count.get(&'s'), Some(&8));
//!
//! println!("Number of occurences of each character");
//! println!("Number of occurrences of each character");
//! for (char, count) in count.iter() {
//! println!("{}: {}", char, count);
//! }
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/env.rs
Expand Up @@ -337,7 +337,7 @@ pub fn temp_dir() -> Path {
///
/// # Errors
///
/// Acquring the path to the current executable is a platform-specific operation
/// Acquiring the path to the current executable is a platform-specific operation
/// that can fail for a good number of reasons. Some errors can include, but not
/// be limited to filesystem operations failing or general syscall failures.
///
Expand Down
4 changes: 2 additions & 2 deletions src/libstd/io/mod.rs
Expand Up @@ -97,7 +97,7 @@ fn with_end_to_cap<F>(v: &mut Vec<u8>, f: F) -> Result<usize>
//
// To this end, we use an RAII guard (to protect against panics) which updates
// the length of the string when it is dropped. This guard initially truncates
// the string to the prior length and only afer we've validated that the
// the string to the prior length and only after we've validated that the
// new contents are valid UTF-8 do we allow it to set a longer length.
//
// The unsafety in this function is twofold:
Expand Down Expand Up @@ -664,7 +664,7 @@ impl<T> Take<T> {
///
/// # Note
///
/// This instance may reach EOF after reading fewer bytes than indiccated by
/// This instance may reach EOF after reading fewer bytes than indicated by
/// this method if the underlying `Read` instance reaches EOF.
pub fn limit(&self) -> u64 { self.limit }
}
Expand Down
4 changes: 2 additions & 2 deletions src/libstd/path.rs
Expand Up @@ -922,7 +922,7 @@ impl PathBuf {
///
/// If `self.file_name()` is `None`, does nothing and returns `false`.
///
/// Otherwise, returns `tru`; if `self.exension()` is `None`, the extension
/// Otherwise, returns `true`; if `self.extension()` is `None`, the extension
/// is added; otherwise it is replaced.
pub fn set_extension<S: ?Sized + AsOsStr>(&mut self, extension: &S) -> bool {
if self.file_name().is_none() { return false; }
Expand Down Expand Up @@ -1062,7 +1062,7 @@ impl Path {
PathBuf::new(self)
}

/// A path is *absolute* if it is indepedent of the current directory.
/// A path is *absolute* if it is independent of the current directory.
///
/// * On Unix, a path is absolute if it starts with the root, so
/// `is_absolute` and `has_root` are equivalent.
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/sync/mpsc/oneshot.rs
Expand Up @@ -45,7 +45,7 @@ use core::mem;
use sync::atomic::{AtomicUsize, Ordering};

// Various states you can find a port in.
const EMPTY: uint = 0; // initial state: no data, no blocked reciever
const EMPTY: uint = 0; // initial state: no data, no blocked receiver
const DATA: uint = 1; // data ready for receiver to take
const DISCONNECTED: uint = 2; // channel is disconnected OR upgraded
// Any other value represents a pointer to a SignalToken value. The
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/sys/common/wtf8.rs
Expand Up @@ -84,7 +84,7 @@ impl CodePoint {

/// Create a new `CodePoint` from a `char`.
///
/// Since all Unicode scalar values are code points, this always succeds.
/// Since all Unicode scalar values are code points, this always succeeds.
#[inline]
pub fn from_char(value: char) -> CodePoint {
CodePoint { value: value as u32 }
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/sys/windows/thread_local.rs
Expand Up @@ -191,7 +191,7 @@ unsafe fn unregister_dtor(key: Key) -> bool {
// # What's up with this callback?
//
// The callback specified receives a number of parameters from... someone!
// (the kernel? the runtime? I'm not qute sure!) There are a few events that
// (the kernel? the runtime? I'm not quite sure!) There are a few events that
// this gets invoked for, but we're currently only interested on when a
// thread or a process "detaches" (exits). The process part happens for the
// last thread and the thread part happens for any normal thread.
Expand Down
4 changes: 2 additions & 2 deletions src/libstd/time/duration.rs
Expand Up @@ -232,7 +232,7 @@ impl Duration {
secs_part.checked_add(nanos_part as i64)
}

/// Add two durations, returning `None` if overflow occured.
/// Add two durations, returning `None` if overflow occurred.
#[unstable(feature = "std_misc")]
pub fn checked_add(&self, rhs: &Duration) -> Option<Duration> {
let mut secs = try_opt!(self.secs.checked_add(rhs.secs));
Expand All @@ -247,7 +247,7 @@ impl Duration {
if d < MIN || d > MAX { None } else { Some(d) }
}

/// Subtract two durations, returning `None` if overflow occured.
/// Subtract two durations, returning `None` if overflow occurred.
#[unstable(feature = "std_misc")]
pub fn checked_sub(&self, rhs: &Duration) -> Option<Duration> {
let mut secs = try_opt!(self.secs.checked_sub(rhs.secs));
Expand Down
2 changes: 1 addition & 1 deletion src/libsyntax/feature_gate.rs
Expand Up @@ -109,7 +109,7 @@ static KNOWN_FEATURES: &'static [(&'static str, &'static str, Status)] = &[
// int and uint are now deprecated
("int_uint", "1.0.0", Active),

// macro reexport needs more discusion and stabilization
// macro reexport needs more discussion and stabilization
("macro_reexport", "1.0.0", Active),

// These are used to test this portion of the compiler, they don't actually
Expand Down
2 changes: 1 addition & 1 deletion src/libsyntax/parse/mod.rs
Expand Up @@ -560,7 +560,7 @@ fn filtered_float_lit(data: token::InternedString, suffix: Option<&str>,
}
pub fn float_lit(s: &str, suffix: Option<&str>, sd: &SpanHandler, sp: Span) -> ast::Lit_ {
debug!("float_lit: {:?}, {:?}", s, suffix);
// FIXME #2252: bounds checking float literals is defered until trans
// FIXME #2252: bounds checking float literals is deferred until trans
let s = s.chars().filter(|&c| c != '_').collect::<String>();
let data = token::intern_and_get_ident(&*s);
filtered_float_lit(data, suffix, sd, sp)
Expand Down
2 changes: 1 addition & 1 deletion src/rustbook/javascript.rs
Expand Up @@ -43,7 +43,7 @@ document.addEventListener("DOMContentLoaded", function(event) {
// of each of the sections.
// It works by extracting the current page based on the url and iterates over
// the menu links until it finds the menu item for the current page. We then
// create a copy of the preceeding and following menu links and add the
// create a copy of the preceding and following menu links and add the
// correct css class and insert them into the bottom of the page.
var toc = document.getElementById('toc').getElementsByTagName('a');
var href = document.location.pathname.split('/').pop();
Expand Down

0 comments on commit dc2e444

Please sign in to comment.