Skip to content

Commit e3fa23b

Browse files
jbcrailalexcrichton
authored andcommitted
Fix spelling errors.
1 parent 8297edd commit e3fa23b

File tree

29 files changed

+36
-36
lines changed

29 files changed

+36
-36
lines changed

src/liballoc/arc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ impl<T: Share + Send> Drop for Arc<T> {
185185
// deletion of the data. Because it is marked `Release`, the
186186
// decreasing of the reference count synchronizes with this `Acquire`
187187
// fence. This means that use of the data happens before decreasing
188-
// the refernce count, which happens before this fence, which
188+
// the reference count, which happens before this fence, which
189189
// happens before the deletion of the data.
190190
//
191191
// As explained in the [Boost documentation][1],

src/libgreen/stack.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ impl Drop for Stack {
124124
}
125125

126126
pub struct StackPool {
127-
// Ideally this would be some datastructure that preserved ordering on
127+
// Ideally this would be some data structure that preserved ordering on
128128
// Stack.min_size.
129129
stacks: Vec<Stack>,
130130
}

src/liblog/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ pub fn mod_enabled(level: u32, module: &str) -> bool {
288288
unsafe { INIT.doit(init); }
289289

290290
// It's possible for many threads are in this function, only one of them
291-
// will peform the global initialization, but all of them will need to check
291+
// will perform the global initialization, but all of them will need to check
292292
// again to whether they should really be here or not. Hence, despite this
293293
// check being expanded manually in the logging macro, this function checks
294294
// the log level again.

src/libnative/io/net.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -877,7 +877,7 @@ pub fn write<T>(fd: sock_t,
877877
}
878878

879879
// Also as with read(), we use MSG_DONTWAIT to guard ourselves
880-
// against unforseen circumstances.
880+
// against unforeseen circumstances.
881881
let _guard = lock();
882882
let ptr = buf.slice_from(written).as_ptr();
883883
let len = buf.len() - written;

src/libnative/io/pipe_win32.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ impl rtio::RtioPipe for UnixStream {
376376
if ret != 0 { return Ok(bytes_read as uint) }
377377

378378
// If our errno doesn't say that the I/O is pending, then we hit some
379-
// legitimate error and reeturn immediately.
379+
// legitimate error and return immediately.
380380
if os::errno() != libc::ERROR_IO_PENDING as uint {
381381
return Err(super::last_error())
382382
}

src/librlibc/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
#![no_std]
3232
#![experimental]
3333

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

src/librustc/back/link.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ pub mod write {
119119
// get all hardware potential via VFP3 (hardware floating point)
120120
// and NEON (SIMD) instructions supported by LLVM.
121121
// Note that without those flags various linking errors might
122-
// arise as some of intrinsicts are converted into function calls
122+
// arise as some of intrinsics are converted into function calls
123123
// and nobody provides implementations those functions
124124
fn target_feature<'a>(sess: &'a Session) -> &'a str {
125125
match sess.targ_cfg.os {

src/librustc/lint/builtin.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -985,7 +985,7 @@ impl UnnecessaryParens {
985985
_ => {}
986986
}
987987

988-
/// Expressions that syntatically contain an "exterior" struct
988+
/// Expressions that syntactically contain an "exterior" struct
989989
/// literal i.e. not surrounded by any parens or other
990990
/// delimiters, e.g. `X { y: 1 }`, `X { y: 1 }.method()`, `foo
991991
/// == X { y: 1 }` and `X { y: 1 } == foo` all do, but `(X {

src/librustc/middle/mem_categorization.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ impl<'t,TYPER:Typer> MemCategorizationContext<'t,TYPER> {
383383
Some(adjustment) => {
384384
match *adjustment {
385385
ty::AutoObject(..) => {
386-
// Implicity cast a concrete object to trait object.
386+
// Implicitly cast a concrete object to trait object.
387387
// Result is an rvalue.
388388
let expr_ty = if_ok!(self.expr_ty_adjusted(expr));
389389
Ok(self.cat_rvalue_node(expr.id(), expr.span(), expr_ty))

src/librustc/middle/privacy.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1267,7 +1267,7 @@ impl<'a> Visitor<()> for VisiblePrivateTypesVisitor<'a> {
12671267
// error messages without (too many) false positives
12681268
// (i.e. we could just return here to not check them at
12691269
// all, or some worse estimation of whether an impl is
1270-
// publically visible.
1270+
// publicly visible.
12711271
ast::ItemImpl(ref g, ref trait_ref, self_, ref methods) => {
12721272
// `impl [... for] Private` is never visible.
12731273
let self_contains_private;

src/librustc/middle/save/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ impl <'l> DxrVisitor<'l> {
484484
{
485485
let qualname = self.analysis.ty_cx.map.path_to_str(item.id);
486486

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

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

1406-
// Create ouput file.
1406+
// Create output file.
14071407
let mut out_name = cratename.clone();
14081408
out_name.push_str(".csv");
14091409
root_path.push(out_name);

src/librustc/middle/typeck/infer/unify.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ pub struct UnificationTable<K,V> {
9393

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

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

194194
CommittedSnapshot => {
195195
// This occurs when there are nested snapshots and
196-
// the inner is commited but outer is rolled back.
196+
// the inner is committed but outer is rolled back.
197197
}
198198

199199
NewVar(i) => {

src/librustdoc/clean/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1737,7 +1737,7 @@ pub struct ViewItem {
17371737

17381738
impl Clean<Vec<Item>> for ast::ViewItem {
17391739
fn clean(&self) -> Vec<Item> {
1740-
// We consider inlining the documentation of `pub use` statments, but we
1740+
// We consider inlining the documentation of `pub use` statements, but we
17411741
// forcefully don't inline if this is not public or if the
17421742
// #[doc(no_inline)] attribute is present.
17431743
let denied = self.vis != ast::Public || self.attrs.iter().any(|a| {

src/librustrt/c_str.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ pub trait ToCStr {
376376
// (without forcing an additional & around &str). So we are instead
377377
// temporarily adding an instance for ~str and String, so that we can
378378
// take ToCStr as owned. When DST lands, the string instances should
379-
// be revisted, and arguments bound by ToCStr should be passed by
379+
// be revisited, and arguments bound by ToCStr should be passed by
380380
// reference.
381381

382382
impl<'a> ToCStr for &'a str {

src/librustrt/libunwind.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ extern {}
9797

9898
extern "C" {
9999
// iOS on armv7 uses SjLj exceptions and requires to link
100-
// agains corresponding routine (..._SjLj_...)
100+
// against corresponding routine (..._SjLj_...)
101101
#[cfg(not(target_os = "ios", target_arch = "arm"))]
102102
pub fn _Unwind_RaiseException(exception: *mut _Unwind_Exception)
103103
-> _Unwind_Reason_Code;

src/librustrt/task.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ impl Task {
170170
/// This function can be used as an emulated "try/catch" to interoperate
171171
/// with the rust runtime at the outermost boundary. It is not possible to
172172
/// use this function in a nested fashion (a try/catch inside of another
173-
/// try/catch). Invoking this funciton is quite cheap.
173+
/// try/catch). Invoking this function is quite cheap.
174174
///
175175
/// If the closure `f` succeeds, then the returned task can be used again
176176
/// for another invocation of `run`. If the closure `f` fails then `self`
@@ -276,7 +276,7 @@ impl Task {
276276
// 1. If TLD destruction fails, heap destruction will be attempted.
277277
// There is a test for this at fail-during-tld-destroy.rs. Sadly the
278278
// other way can't be tested due to point 2 above. Note that we must
279-
// immortalize the heap first becuase if any deallocations are
279+
// immortalize the heap first because if any deallocations are
280280
// attempted while TLD is being dropped it will attempt to free the
281281
// allocation from the wrong heap (because the current one has been
282282
// replaced).

src/librustrt/thread.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ mod imp {
243243
// EINVAL means |stack_size| is either too small or not a
244244
// multiple of the system page size. Because it's definitely
245245
// >= PTHREAD_STACK_MIN, it must be an alignment issue.
246-
// Round up to the neareast page and try again.
246+
// Round up to the nearest page and try again.
247247
let page_size = libc::sysconf(libc::_SC_PAGESIZE) as uint;
248248
let stack_size = (stack_size + page_size - 1) &
249249
(-(page_size as int - 1) as uint - 1);

src/librustuv/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ impl ForbidUnwind {
234234
impl Drop for ForbidUnwind {
235235
fn drop(&mut self) {
236236
assert!(self.failing_before == task::failing(),
237-
"didnt want an unwind during: {}", self.msg);
237+
"didn't want an unwind during: {}", self.msg);
238238
}
239239
}
240240

src/librustuv/stream.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ impl StreamWatcher {
8787
// immediately as part of the call to alloc_cb. What this means is that
8888
// we must be ready for this to happen (by setting the data in the uv
8989
// handle). In theory this otherwise doesn't need to happen until after
90-
// the read is succesfully started.
90+
// the read is successfully started.
9191
unsafe { uvll::set_data_for_uv_handle(self.handle, &mut rcx) }
9292

9393
// Send off the read request, but don't block until we're sure that the

src/librustuv/timer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ impl RtioTimer for TimerWatcher {
7777
fn sleep(&mut self, msecs: u64) {
7878
// As with all of the below functions, we must be extra careful when
7979
// destroying the previous action. If the previous action was a channel,
80-
// destroying it could invoke a context switch. For these situtations,
80+
// destroying it could invoke a context switch. For these situations,
8181
// we must temporarily un-home ourselves, then destroy the action, and
8282
// then re-home again.
8383
let missile = self.fire_homing_missile();

src/libstd/io/net/ip.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ mod test {
410410
// colon after v4
411411
let none: Option<IpAddr> = FromStr::from_str("::127.0.0.1:");
412412
assert_eq!(None, none);
413-
// not enought groups
413+
// not enough groups
414414
let none: Option<IpAddr> = FromStr::from_str("1.2.3.4.5:127.0.0.1");
415415
assert_eq!(None, none);
416416
// too many groups

src/libstd/os.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ pub fn unsetenv(n: &str) {
469469
/// println!("'{}'", path.display());
470470
/// }
471471
/// }
472-
/// None => println!("{} is not defined in the environnement.", key)
472+
/// None => println!("{} is not defined in the environment.", key)
473473
/// }
474474
/// ```
475475
pub fn split_paths<T: BytesContainer>(unparsed: T) -> Vec<Path> {

src/libstd/rt/backtrace.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ mod imp {
266266
}
267267

268268
// while it doesn't requires lock for work as everything is
269-
// local, it still displays much nicier backtraces when a
269+
// local, it still displays much nicer backtraces when a
270270
// couple of tasks fail simultaneously
271271
static mut LOCK: StaticNativeMutex = NATIVE_MUTEX_INIT;
272272
let _g = unsafe { LOCK.lock() };

src/libsync/comm/oneshot.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ impl<T: Send> Packet<T> {
354354
}
355355

356356
// We woke ourselves up from select. Assert that the task should be
357-
// trashed and returne that we don't have any data.
357+
// trashed and returned that we don't have any data.
358358
n => {
359359
let t = unsafe { BlockedTask::cast_from_uint(n) };
360360
t.trash();

src/libsync/comm/shared.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ impl<T: Send> Packet<T> {
8181

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

143-
// Note that the multiple sender case is a little tricker
143+
// Note that the multiple sender case is a little trickier
144144
// semantically than the single sender case. The logic for
145145
// incrementing is "add and if disconnected store disconnected".
146146
// This could end up leading some senders to believe that there

src/libsync/mutex.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ impl StaticMutex {
215215
None => {}
216216
}
217217

218-
// After we've failed the fast path, then we delegate to the differnet
218+
// After we've failed the fast path, then we delegate to the different
219219
// locking protocols for green/native tasks. This will select two tasks
220220
// to continue further (one native, one green).
221221
let t: Box<Task> = Local::take();

src/libsyntax/ext/base.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ impl<'a> ExtCtxt<'a> {
472472
}
473473
/// Emit `msg` attached to `sp`, and stop compilation immediately.
474474
///
475-
/// `span_err` should be strongly prefered where-ever possible:
475+
/// `span_err` should be strongly preferred where-ever possible:
476476
/// this should *only* be used when
477477
/// - continuing has a high risk of flow-on errors (e.g. errors in
478478
/// declaring a macro would cause all uses of that macro to

src/libsyntax/ext/deriving/generic/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -834,7 +834,7 @@ impl<'a> MethodDef<'a> {
834834
generic `deriving`");
835835
}
836836

837-
// `ref` inside let matches is buggy. Causes havoc wih rusc.
837+
// `ref` inside let matches is buggy. Causes havoc with rusc.
838838
// let (variant_index, ref self_vec) = matches_so_far[0];
839839
let (variant, self_vec) = match matches_so_far.get(0) {
840840
&(_, v, ref s) => (v, s)

src/libsyntax/ext/expand.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1295,7 +1295,7 @@ mod test {
12951295
}
12961296

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

13011301
// FIXME #9383 : lambda var hygiene

0 commit comments

Comments
 (0)