From ad06dfe496e4e1abbc65268a58275ca2b483def5 Mon Sep 17 00:00:00 2001 From: Joseph Crail Date: Fri, 1 Aug 2014 19:40:21 -0400 Subject: [PATCH] Fix misspelled comments. --- src/compiletest/common.rs | 2 +- src/compiletest/runtest.rs | 4 ++-- src/libcollections/bitv.rs | 2 +- src/libcollections/priority_queue.rs | 2 +- src/libcollections/string.rs | 2 +- src/libcore/cell.rs | 2 +- src/libgreen/task.rs | 2 +- src/libnative/io/net.rs | 2 +- src/libnative/io/pipe_win32.rs | 2 +- src/librustc/metadata/loader.rs | 8 ++++---- src/librustc/middle/ty.rs | 2 +- src/librustdoc/html/render.rs | 2 +- src/librustdoc/stability_summary.rs | 2 +- src/librustuv/stream.rs | 2 +- src/libstd/collections/hashmap.rs | 2 +- src/libstd/io/net/addrinfo.rs | 2 +- src/libstd/os.rs | 2 +- src/libsync/lock.rs | 4 ++-- src/libsyntax/attr.rs | 2 +- src/libsyntax/ext/deriving/encodable.rs | 2 +- src/libsyntax/parse/parser.rs | 2 +- src/libsyntax/print/pp.rs | 6 +++--- 22 files changed, 29 insertions(+), 29 deletions(-) diff --git a/src/compiletest/common.rs b/src/compiletest/common.rs index 3df46fde59ae8..ba201a4a633c6 100644 --- a/src/compiletest/common.rs +++ b/src/compiletest/common.rs @@ -136,7 +136,7 @@ pub struct Config { // Extra parameter to run adb on arm-linux-androideabi pub adb_path: String, - // Extra parameter to run test sute on arm-linux-androideabi + // Extra parameter to run test suite on arm-linux-androideabi pub adb_test_dir: String, // status whether android device available or not diff --git a/src/compiletest/runtest.rs b/src/compiletest/runtest.rs index 851d12f814b56..a9c7673d4ddfb 100644 --- a/src/compiletest/runtest.rs +++ b/src/compiletest/runtest.rs @@ -325,7 +325,7 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) { let DebuggerCommands { commands, check_lines, .. } = parse_debugger_commands(testfile, "gdb"); let mut cmds = commands.connect("\n"); - // compile test file (it shoud have 'compile-flags:-g' in the header) + // compile test file (it should have 'compile-flags:-g' in the header) let compiler_run_result = compile_test(config, props, testfile); if !compiler_run_result.status.success() { fatal_proc_rec("compilation failed!", &compiler_run_result); @@ -520,7 +520,7 @@ fn run_debuginfo_lldb_test(config: &Config, props: &TestProps, testfile: &Path) let config = &mut config; - // compile test file (it shoud have 'compile-flags:-g' in the header) + // compile test file (it should have 'compile-flags:-g' in the header) let compile_result = compile_test(config, props, testfile); if !compile_result.status.success() { fatal_proc_rec("compilation failed!", &compile_result); diff --git a/src/libcollections/bitv.rs b/src/libcollections/bitv.rs index 3e1160b45eee4..d709fa49e35e2 100644 --- a/src/libcollections/bitv.rs +++ b/src/libcollections/bitv.rs @@ -1517,7 +1517,7 @@ pub struct BitPositions<'a> { next_idx: uint } -/// An iterator combining wo `BitvSet` iterators. +/// An iterator combining two `BitvSet` iterators. pub struct TwoBitPositions<'a> { set: &'a BitvSet, other: &'a BitvSet, diff --git a/src/libcollections/priority_queue.rs b/src/libcollections/priority_queue.rs index f76fae39f3426..bf2c8c83d87b6 100644 --- a/src/libcollections/priority_queue.rs +++ b/src/libcollections/priority_queue.rs @@ -119,7 +119,7 @@ //! // 10 | | //! // +---------------+ //! // -//! // The graph is represented as an adjecency list where each index, +//! // The graph is represented as an adjacency list where each index, //! // corresponding to a node value, has a list of outgoing edges. //! // Chosen for it's efficiency. //! let graph = vec![ diff --git a/src/libcollections/string.rs b/src/libcollections/string.rs index d9aea8b0a28a3..684a15f9aae50 100644 --- a/src/libcollections/string.rs +++ b/src/libcollections/string.rs @@ -842,7 +842,7 @@ pub mod raw { /// Create a `String` from a null-terminated *u8 buffer /// /// This function is unsafe because we dereference memory until we find the NUL character, - /// which is not guaranteed to be present. Additionaly, the slice is not checked to see + /// which is not guaranteed to be present. Additionally, the slice is not checked to see /// whether it contains valid UTF-8 pub unsafe fn from_buf(buf: *const u8) -> String { let mut len = 0; diff --git a/src/libcore/cell.rs b/src/libcore/cell.rs index 24ea3480c4397..becd2d3f9628c 100644 --- a/src/libcore/cell.rs +++ b/src/libcore/cell.rs @@ -449,7 +449,7 @@ pub struct UnsafeCell { } impl UnsafeCell { - /// Construct a new instance of `UnsafeCell` which will wrapp the specified + /// Construct a new instance of `UnsafeCell` which will wrap the specified /// value. /// /// All access to the inner value through methods is `unsafe`, and it is diff --git a/src/libgreen/task.rs b/src/libgreen/task.rs index 12d7b75569782..73fe8f6a93f82 100644 --- a/src/libgreen/task.rs +++ b/src/libgreen/task.rs @@ -118,7 +118,7 @@ extern fn bootstrap_green_task(task: uint, code: *mut (), env: *mut ()) -> ! { // preserving a handle to the GreenTask down to this point, this // unfortunately must call `GreenTask::convert`. In order to avoid // this we could add a `terminate` function to the `Runtime` trait - // in libstd, but that seems less appropriate since the coversion + // in libstd, but that seems less appropriate since the conversion // method exists. GreenTask::convert(task).terminate(); } diff --git a/src/libnative/io/net.rs b/src/libnative/io/net.rs index 7a90ede8ca863..cf2d6e7fb45ae 100644 --- a/src/libnative/io/net.rs +++ b/src/libnative/io/net.rs @@ -769,7 +769,7 @@ impl rtio::RtioUdpSocket for UdpSocket { // It turns out that there's this nifty MSG_DONTWAIT flag which can be passed to // send/recv, but the niftiness wears off once you realize it only works well on // linux [1] [2]. This means that it's pretty easy to get a nonblocking -// operation on linux (no flag fidding, no affecting other objects), but not on +// operation on linux (no flag fiddling, no affecting other objects), but not on // other platforms. // // To work around this constraint on other platforms, we end up using the diff --git a/src/libnative/io/pipe_win32.rs b/src/libnative/io/pipe_win32.rs index 79ca23abed25c..d5b22b4b018c9 100644 --- a/src/libnative/io/pipe_win32.rs +++ b/src/libnative/io/pipe_win32.rs @@ -311,7 +311,7 @@ impl UnixStream { } } - // An example I found on microsoft's website used 20 + // An example I found on Microsoft's website used 20 // seconds, libuv uses 30 seconds, hence we make the // obvious choice of waiting for 25 seconds. None => { diff --git a/src/librustc/metadata/loader.rs b/src/librustc/metadata/loader.rs index 4b9dd1003ec60..d2e1fca0da75d 100644 --- a/src/librustc/metadata/loader.rs +++ b/src/librustc/metadata/loader.rs @@ -11,7 +11,7 @@ //! Finds crate binaries and loads their metadata //! //! Might I be the first to welcome you to a world of platform differences, -//! version requirements, dependency graphs, conficting desires, and fun! This +//! version requirements, dependency graphs, conflicting desires, and fun! This //! is the major guts (along with metadata::creader) of the compiler for loading //! crates and resolving dependencies. Let's take a tour! //! @@ -83,7 +83,7 @@ //! 5. Does the target in the metadata agree with the current target? //! 6. Does the SVH match? (more on this later) //! -//! If the file answeres `yes` to all these questions, then the file is +//! If the file answers `yes` to all these questions, then the file is //! considered as being *candidate* for being accepted. It is illegal to have //! more than two candidates as the compiler has no method by which to resolve //! this conflict. Additionally, rlib/dylib candidates are considered @@ -173,7 +173,7 @@ //! ## Loading transitive dependencies //! //! Dealing with same-named-but-distinct crates is not just a local problem, but -//! one that also needs to be dealt with for transitive dependences. Note that +//! one that also needs to be dealt with for transitive dependencies. Note that //! in the letter above `--extern` flags only apply to the *local* set of //! dependencies, not the upstream transitive dependencies. Consider this //! dependency graph: @@ -660,7 +660,7 @@ impl<'a> Context<'a> { false }); - // Now that we have an itertor of good candidates, make sure there's at + // Now that we have an iterator of good candidates, make sure there's at // most one rlib and at most one dylib. let mut rlibs = HashSet::new(); let mut dylibs = HashSet::new(); diff --git a/src/librustc/middle/ty.rs b/src/librustc/middle/ty.rs index 0f5af4421a5e8..ce8f37514a4cd 100644 --- a/src/librustc/middle/ty.rs +++ b/src/librustc/middle/ty.rs @@ -269,7 +269,7 @@ pub struct ctxt { /// Stores the type parameters which were substituted to obtain the type /// of this node. This only applies to nodes that refer to entities - /// param>, diff --git a/src/librustdoc/html/render.rs b/src/librustdoc/html/render.rs index 084ba46797ef9..0b82f470cdb35 100644 --- a/src/librustdoc/html/render.rs +++ b/src/librustdoc/html/render.rs @@ -1098,7 +1098,7 @@ impl Context { Ok(()) } - /// Non-parellelized version of rendering an item. This will take the input + /// Non-parallelized version of rendering an item. This will take the input /// item, render its contents, and then invoke the specified closure with /// all sub-items which need to be rendered. /// diff --git a/src/librustdoc/stability_summary.rs b/src/librustdoc/stability_summary.rs index 18e90d5d62109..60db4fda05190 100644 --- a/src/librustdoc/stability_summary.rs +++ b/src/librustdoc/stability_summary.rs @@ -60,7 +60,7 @@ impl Counts { } #[deriving(Encodable, Decodable, PartialEq, Eq)] -/// A summarized module, which includes total counts and summarized chilcren +/// A summarized module, which includes total counts and summarized children /// modules. pub struct ModuleSummary { pub name: String, diff --git a/src/librustuv/stream.rs b/src/librustuv/stream.rs index 875c2dee46b4f..c49e557a3237d 100644 --- a/src/librustuv/stream.rs +++ b/src/librustuv/stream.rs @@ -28,7 +28,7 @@ pub struct StreamWatcher { // Cache the last used uv_write_t so we don't have to allocate a new one on // every call to uv_write(). Ideally this would be a stack-allocated // structure, but currently we don't have mappings for all the structures - // defined in libuv, so we're foced to malloc this. + // defined in libuv, so we're forced to malloc this. last_write_req: Option, blocked_writer: Option, diff --git a/src/libstd/collections/hashmap.rs b/src/libstd/collections/hashmap.rs index a569ee4a32a18..e95a5305bc770 100644 --- a/src/libstd/collections/hashmap.rs +++ b/src/libstd/collections/hashmap.rs @@ -1937,7 +1937,7 @@ impl, S, H: Hasher> HashSet { /// # Example /// /// This is a slightly silly example where we define the number's - /// parity as the equivilance class. It is important that the + /// parity as the equivalence class. It is important that the /// values hash the same, which is why we implement `Hash`. /// /// ```rust diff --git a/src/libstd/io/net/addrinfo.rs b/src/libstd/io/net/addrinfo.rs index 8d5fd2b99fd7b..771eb9e13e836 100644 --- a/src/libstd/io/net/addrinfo.rs +++ b/src/libstd/io/net/addrinfo.rs @@ -79,7 +79,7 @@ pub fn get_host_addresses(host: &str) -> IoResult> { lookup(Some(host), None, None).map(|a| a.move_iter().map(|i| i.address.ip).collect()) } -/// Full-fleged resolution. This function will perform a synchronous call to +/// Full-fledged resolution. This function will perform a synchronous call to /// getaddrinfo, controlled by the parameters /// /// # Arguments diff --git a/src/libstd/os.rs b/src/libstd/os.rs index 7fff510a60a4b..dfa691d182342 100644 --- a/src/libstd/os.rs +++ b/src/libstd/os.rs @@ -873,7 +873,7 @@ pub fn make_absolute(p: &Path) -> Path { /// /// let root = Path::new("/"); /// assert!(os::change_dir(&root)); -/// println!("Succesfully changed working directory to {}!", root.display()); +/// println!("Successfully changed working directory to {}!", root.display()); /// ``` pub fn change_dir(p: &Path) -> bool { return chdir(p); diff --git a/src/libsync/lock.rs b/src/libsync/lock.rs index e8418f9668f2a..665cd48a278df 100644 --- a/src/libsync/lock.rs +++ b/src/libsync/lock.rs @@ -223,7 +223,7 @@ impl Mutex { pub fn lock<'a>(&'a self) -> MutexGuard<'a, T> { let guard = self.lock.lock(); - // These two accesses are safe because we're guranteed at this point + // These two accesses are safe because we're guaranteed at this point // that we have exclusive access to this mutex. We are indeed able to // promote ourselves from &Mutex to `&mut T` let poison = unsafe { &mut *self.failed.get() }; @@ -326,7 +326,7 @@ impl RWLock { pub fn write<'a>(&'a self) -> RWLockWriteGuard<'a, T> { let guard = self.lock.write(); - // These two accesses are safe because we're guranteed at this point + // These two accesses are safe because we're guaranteed at this point // that we have exclusive access to this rwlock. We are indeed able to // promote ourselves from &RWLock to `&mut T` let poison = unsafe { &mut *self.failed.get() }; diff --git a/src/libsyntax/attr.rs b/src/libsyntax/attr.rs index e8b9ec9628f7d..21252619d11ae 100644 --- a/src/libsyntax/attr.rs +++ b/src/libsyntax/attr.rs @@ -426,7 +426,7 @@ pub fn require_unique_names(diagnostic: &SpanHandler, metas: &[Gc]) { /// not allowed on univariant or zero-variant enums, which have no discriminant. /// /// If a discriminant type is so specified, then the discriminant will be -/// present (before fields, if any) with that type; reprensentation +/// present (before fields, if any) with that type; representation /// optimizations which would remove it will not be done. pub fn find_repr_attr(diagnostic: &SpanHandler, attr: &Attribute, acc: ReprAttr) -> ReprAttr { diff --git a/src/libsyntax/ext/deriving/encodable.rs b/src/libsyntax/ext/deriving/encodable.rs index 7e289e7676aa9..02a748eed8e47 100644 --- a/src/libsyntax/ext/deriving/encodable.rs +++ b/src/libsyntax/ext/deriving/encodable.rs @@ -41,7 +41,7 @@ //! } //! ``` //! -//! Other interesting scenarios are whe the item has type parameters or +//! Other interesting scenarios are when the item has type parameters or //! references other non-built-in types. A type definition like: //! //! ```ignore diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 945a643d2b478..de3be4f8f3855 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -4356,7 +4356,7 @@ impl<'a> Parser<'a> { return self.parse_single_struct_field(Inherited, attrs); } - /// Parse visiility: PUB, PRIV, or nothing + /// Parse visibility: PUB, PRIV, or nothing fn parse_visibility(&mut self) -> Visibility { if self.eat_keyword(keywords::Pub) { Public } else { Inherited } diff --git a/src/libsyntax/print/pp.rs b/src/libsyntax/print/pp.rs index fe84eeff4f87f..f28e6829b00d8 100644 --- a/src/libsyntax/print/pp.rs +++ b/src/libsyntax/print/pp.rs @@ -225,12 +225,12 @@ pub fn mk_printer(out: Box, linewidth: uint) -> Printer { /// 'right' indices denote the active portion of the ring buffer as well as /// describing hypothetical points-in-the-infinite-stream at most 3N tokens /// apart (i.e. "not wrapped to ring-buffer boundaries"). The paper will switch -/// between using 'left' and 'right' terms to denote the wrapepd-to-ring-buffer +/// between using 'left' and 'right' terms to denote the wrapped-to-ring-buffer /// and point-in-infinite-stream senses freely. /// /// There is a parallel ring buffer, 'size', that holds the calculated size of /// each token. Why calculated? Because for Begin/End pairs, the "size" -/// includes everything betwen the pair. That is, the "size" of Begin is +/// includes everything between the pair. That is, the "size" of Begin is /// actually the sum of the sizes of everything between Begin and the paired /// End that follows. Since that is arbitrarily far in the future, 'size' is /// being rewritten regularly while the printer runs; in fact most of the @@ -270,7 +270,7 @@ pub struct Printer { left: uint, /// Index of right side of input stream right: uint, - /// Ring-buffr stream goes through + /// Ring-buffer stream goes through token: Vec , /// Ring-buffer of calculated sizes size: Vec ,