Skip to content

Fix spelling errors. #15359

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/liballoc/arc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ impl<T: Share + Send> Drop for Arc<T> {
// deletion of the data. Because it is marked `Release`, the
// 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
// the reference count, which happens before this fence, which
// happens before the deletion of the data.
//
// As explained in the [Boost documentation][1],
Expand Down
2 changes: 1 addition & 1 deletion src/libgreen/stack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ impl Drop for Stack {
}

pub struct StackPool {
// Ideally this would be some datastructure that preserved ordering on
// Ideally this would be some data structure that preserved ordering on
// Stack.min_size.
stacks: Vec<Stack>,
}
Expand Down
2 changes: 1 addition & 1 deletion src/liblog/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ pub fn mod_enabled(level: u32, module: &str) -> bool {
unsafe { INIT.doit(init); }

// It's possible for many threads are in this function, only one of them
// will peform the global initialization, but all of them will need to check
// will perform the global initialization, but all of them will need to check
// again to whether they should really be here or not. Hence, despite this
// check being expanded manually in the logging macro, this function checks
// the log level again.
Expand Down
2 changes: 1 addition & 1 deletion src/libnative/io/net.rs
Original file line number Diff line number Diff line change
Expand Up @@ -877,7 +877,7 @@ pub fn write<T>(fd: sock_t,
}

// Also as with read(), we use MSG_DONTWAIT to guard ourselves
// against unforseen circumstances.
// against unforeseen circumstances.
let _guard = lock();
let ptr = buf.slice_from(written).as_ptr();
let len = buf.len() - written;
Expand Down
2 changes: 1 addition & 1 deletion src/libnative/io/pipe_win32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ impl rtio::RtioPipe for UnixStream {
if ret != 0 { return Ok(bytes_read as uint) }

// If our errno doesn't say that the I/O is pending, then we hit some
// legitimate error and reeturn immediately.
// legitimate error and return immediately.
if os::errno() != libc::ERROR_IO_PENDING as uint {
return Err(super::last_error())
}
Expand Down
2 changes: 1 addition & 1 deletion src/librlibc/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#![no_std]
#![experimental]

// This library is definining the builtin functions, so it would be a shame for
// This library defines the builtin functions, so it would be a shame for
// LLVM to optimize these function calls to themselves!
#![no_builtins]

Expand Down
2 changes: 1 addition & 1 deletion src/librustc/back/link.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ pub mod write {
// get all hardware potential via VFP3 (hardware floating point)
// and NEON (SIMD) instructions supported by LLVM.
// Note that without those flags various linking errors might
// arise as some of intrinsicts are converted into function calls
// arise as some of intrinsics are converted into function calls
// and nobody provides implementations those functions
fn target_feature<'a>(sess: &'a Session) -> &'a str {
match sess.targ_cfg.os {
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/lint/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -989,7 +989,7 @@ impl UnnecessaryParens {
_ => {}
}

/// Expressions that syntatically contain an "exterior" struct
/// Expressions that syntactically contain an "exterior" struct
/// literal i.e. not surrounded by any parens or other
/// delimiters, e.g. `X { y: 1 }`, `X { y: 1 }.method()`, `foo
/// == X { y: 1 }` and `X { y: 1 } == foo` all do, but `(X {
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/middle/mem_categorization.rs
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ impl<'t,TYPER:Typer> MemCategorizationContext<'t,TYPER> {
Some(adjustment) => {
match *adjustment {
ty::AutoObject(..) => {
// Implicity cast a concrete object to trait object.
// Implicitly cast a concrete object to trait object.
// Result is an rvalue.
let expr_ty = if_ok!(self.expr_ty_adjusted(expr));
Ok(self.cat_rvalue_node(expr.id(), expr.span(), expr_ty))
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/middle/privacy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1267,7 +1267,7 @@ impl<'a> Visitor<()> for VisiblePrivateTypesVisitor<'a> {
// error messages without (too many) false positives
// (i.e. we could just return here to not check them at
// all, or some worse estimation of whether an impl is
// publically visible.
// publicly visible.
ast::ItemImpl(ref g, ref trait_ref, self_, ref methods) => {
// `impl [... for] Private` is never visible.
let self_contains_private;
Expand Down
6 changes: 3 additions & 3 deletions src/librustc/middle/save/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ impl <'l> DxrVisitor<'l> {
{
let qualname = self.analysis.ty_cx.map.path_to_str(item.id);

// If the variable is immutable, save the initialising expresion.
// If the variable is immutable, save the initialising expression.
let value = match mt {
ast::MutMutable => String::from_str("<mutable>"),
ast::MutImmutable => self.span.snippet(expr.span),
Expand Down Expand Up @@ -845,7 +845,7 @@ impl <'l> DxrVisitor<'l> {
let decl_id = ty::trait_method_of_method(&self.analysis.ty_cx, def_id);

// This incantation is required if the method referenced is a trait's
// defailt implementation.
// default implementation.
let def_id = ty::method(&self.analysis.ty_cx, def_id).provided_source
.unwrap_or(def_id);
(Some(def_id), decl_id)
Expand Down Expand Up @@ -1402,7 +1402,7 @@ pub fn process_crate(sess: &Session,
info!("Writing output to {}", disp);
}

// Create ouput file.
// Create output file.
let mut out_name = cratename.clone();
out_name.push_str(".csv");
root_path.push(out_name);
Expand Down
8 changes: 4 additions & 4 deletions src/librustc/middle/typeck/infer/unify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ pub struct UnificationTable<K,V> {

/**
* At any time, users may snapshot a unification table. The changes
* made during the snapshot may either be *commited* or *rolled back*.
* made during the snapshot may either be *committed* or *rolled back*.
*/
pub struct Snapshot<K> {
// Ensure that this snapshot is keyed to the table type.
Expand Down Expand Up @@ -152,7 +152,7 @@ impl<V:PartialEq+Clone+Repr,K:UnifyKey<V>> UnificationTable<K,V> {

/**
* Starts a new snapshot. Each snapshot must be either
* rolled back or commited in a "LIFO" (stack) order.
* rolled back or committed in a "LIFO" (stack) order.
*/
pub fn snapshot(&mut self) -> Snapshot<K> {
let length = self.undo_log.len();
Expand Down Expand Up @@ -188,12 +188,12 @@ impl<V:PartialEq+Clone+Repr,K:UnifyKey<V>> UnificationTable<K,V> {
match self.undo_log.pop().unwrap() {
OpenSnapshot => {
// This indicates a failure to obey the stack discipline.
tcx.sess.bug("Cannot rollback an uncommited snapshot");
tcx.sess.bug("Cannot rollback an uncommitted snapshot");
}

CommittedSnapshot => {
// This occurs when there are nested snapshots and
// the inner is commited but outer is rolled back.
// the inner is committed but outer is rolled back.
}

NewVar(i) => {
Expand Down
2 changes: 1 addition & 1 deletion src/librustdoc/clean/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1739,7 +1739,7 @@ pub struct ViewItem {

impl Clean<Vec<Item>> for ast::ViewItem {
fn clean(&self) -> Vec<Item> {
// We consider inlining the documentation of `pub use` statments, but we
// We consider inlining the documentation of `pub use` statements, but we
// forcefully don't inline if this is not public or if the
// #[doc(no_inline)] attribute is present.
let denied = self.vis != ast::Public || self.attrs.iter().any(|a| {
Expand Down
2 changes: 1 addition & 1 deletion src/librustrt/c_str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ pub trait ToCStr {
// (without forcing an additional & around &str). So we are instead
// temporarily adding an instance for ~str and String, so that we can
// take ToCStr as owned. When DST lands, the string instances should
// be revisted, and arguments bound by ToCStr should be passed by
// be revisited, and arguments bound by ToCStr should be passed by
// reference.

impl<'a> ToCStr for &'a str {
Expand Down
2 changes: 1 addition & 1 deletion src/librustrt/libunwind.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ extern {}

extern "C" {
// iOS on armv7 uses SjLj exceptions and requires to link
// agains corresponding routine (..._SjLj_...)
// against corresponding routine (..._SjLj_...)
#[cfg(not(target_os = "ios", target_arch = "arm"))]
pub fn _Unwind_RaiseException(exception: *mut _Unwind_Exception)
-> _Unwind_Reason_Code;
Expand Down
4 changes: 2 additions & 2 deletions src/librustrt/task.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ impl Task {
/// This function can be used as an emulated "try/catch" to interoperate
/// with the rust runtime at the outermost boundary. It is not possible to
/// use this function in a nested fashion (a try/catch inside of another
/// try/catch). Invoking this funciton is quite cheap.
/// try/catch). Invoking this function is quite cheap.
///
/// If the closure `f` succeeds, then the returned task can be used again
/// for another invocation of `run`. If the closure `f` fails then `self`
Expand Down Expand Up @@ -276,7 +276,7 @@ impl Task {
// 1. If TLD destruction fails, heap destruction will be attempted.
// There is a test for this at fail-during-tld-destroy.rs. Sadly the
// other way can't be tested due to point 2 above. Note that we must
// immortalize the heap first becuase if any deallocations are
// immortalize the heap first because if any deallocations are
// attempted while TLD is being dropped it will attempt to free the
// allocation from the wrong heap (because the current one has been
// replaced).
Expand Down
2 changes: 1 addition & 1 deletion src/librustrt/thread.rs
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ mod imp {
// EINVAL means |stack_size| is either too small or not a
// multiple of the system page size. Because it's definitely
// >= PTHREAD_STACK_MIN, it must be an alignment issue.
// Round up to the neareast page and try again.
// Round up to the nearest page and try again.
let page_size = libc::sysconf(libc::_SC_PAGESIZE) as uint;
let stack_size = (stack_size + page_size - 1) &
(-(page_size as int - 1) as uint - 1);
Expand Down
2 changes: 1 addition & 1 deletion src/librustuv/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ impl ForbidUnwind {
impl Drop for ForbidUnwind {
fn drop(&mut self) {
assert!(self.failing_before == task::failing(),
"didnt want an unwind during: {}", self.msg);
"didn't want an unwind during: {}", self.msg);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/librustuv/stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ impl StreamWatcher {
// immediately as part of the call to alloc_cb. What this means is that
// we must be ready for this to happen (by setting the data in the uv
// handle). In theory this otherwise doesn't need to happen until after
// the read is succesfully started.
// the read is successfully started.
unsafe { uvll::set_data_for_uv_handle(self.handle, &mut rcx) }

// Send off the read request, but don't block until we're sure that the
Expand Down
2 changes: 1 addition & 1 deletion src/librustuv/timer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ impl RtioTimer for TimerWatcher {
fn sleep(&mut self, msecs: u64) {
// As with all of the below functions, we must be extra careful when
// destroying the previous action. If the previous action was a channel,
// destroying it could invoke a context switch. For these situtations,
// destroying it could invoke a context switch. For these situations,
// we must temporarily un-home ourselves, then destroy the action, and
// then re-home again.
let missile = self.fire_homing_missile();
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/io/net/ip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ mod test {
// colon after v4
let none: Option<IpAddr> = FromStr::from_str("::127.0.0.1:");
assert_eq!(None, none);
// not enought groups
// not enough groups
let none: Option<IpAddr> = FromStr::from_str("1.2.3.4.5:127.0.0.1");
assert_eq!(None, none);
// too many groups
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/os.rs
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ pub fn unsetenv(n: &str) {
/// println!("'{}'", path.display());
/// }
/// }
/// None => println!("{} is not defined in the environnement.", key)
/// None => println!("{} is not defined in the environment.", key)
/// }
/// ```
pub fn split_paths<T: BytesContainer>(unparsed: T) -> Vec<Path> {
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/rt/backtrace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ mod imp {
}

// while it doesn't requires lock for work as everything is
// local, it still displays much nicier backtraces when a
// local, it still displays much nicer backtraces when a
// couple of tasks fail simultaneously
static mut LOCK: StaticNativeMutex = NATIVE_MUTEX_INIT;
let _g = unsafe { LOCK.lock() };
Expand Down
2 changes: 1 addition & 1 deletion src/libsync/comm/oneshot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ impl<T: Send> Packet<T> {
}

// We woke ourselves up from select. Assert that the task should be
// trashed and returne that we don't have any data.
// trashed and returned that we don't have any data.
n => {
let t = unsafe { BlockedTask::cast_from_uint(n) };
t.trash();
Expand Down
4 changes: 2 additions & 2 deletions src/libsync/comm/shared.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ impl<T: Send> Packet<T> {

// This function should be used after newly created Packet
// was wrapped with an Arc
// In other case mutex data will be duplicated while clonning
// In other case mutex data will be duplicated while cloning
// and that could cause problems on platforms where it is
// represented by opaque data structure
pub fn postinit_lock(&mut self) {
Expand Down Expand Up @@ -140,7 +140,7 @@ impl<T: Send> Packet<T> {
// See Port::drop for what's going on
if self.port_dropped.load(atomics::SeqCst) { return Err(t) }

// Note that the multiple sender case is a little tricker
// Note that the multiple sender case is a little trickier
// semantically than the single sender case. The logic for
// incrementing is "add and if disconnected store disconnected".
// This could end up leading some senders to believe that there
Expand Down
2 changes: 1 addition & 1 deletion src/libsync/mutex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ impl StaticMutex {
None => {}
}

// After we've failed the fast path, then we delegate to the differnet
// After we've failed the fast path, then we delegate to the different
// locking protocols for green/native tasks. This will select two tasks
// to continue further (one native, one green).
let t: Box<Task> = Local::take();
Expand Down
2 changes: 1 addition & 1 deletion src/libsyntax/ext/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ impl<'a> ExtCtxt<'a> {
}
/// Emit `msg` attached to `sp`, and stop compilation immediately.
///
/// `span_err` should be strongly prefered where-ever possible:
/// `span_err` should be strongly preferred where-ever possible:
/// this should *only* be used when
/// - continuing has a high risk of flow-on errors (e.g. errors in
/// declaring a macro would cause all uses of that macro to
Expand Down
2 changes: 1 addition & 1 deletion src/libsyntax/ext/deriving/generic/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -834,7 +834,7 @@ impl<'a> MethodDef<'a> {
generic `deriving`");
}

// `ref` inside let matches is buggy. Causes havoc wih rusc.
// `ref` inside let matches is buggy. Causes havoc with rusc.
// let (variant_index, ref self_vec) = matches_so_far[0];
let (variant, self_vec) = match matches_so_far.get(0) {
&(_, v, ref s) => (v, s)
Expand Down
2 changes: 1 addition & 1 deletion src/libsyntax/ext/expand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1307,7 +1307,7 @@ mod test {
}

// create a really evil test case where a $x appears inside a binding of $x
// but *shouldnt* bind because it was inserted by a different macro....
// but *shouldn't* bind because it was inserted by a different macro....
// can't write this test case until we have macro-generating macros.

// FIXME #9383 : lambda var hygiene
Expand Down