diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs index cef0849937bf0..c8689f7814086 100644 --- a/src/bootstrap/compile.rs +++ b/src/bootstrap/compile.rs @@ -203,7 +203,7 @@ impl Step for StdLink { /// Link all libstd rlibs/dylibs into the sysroot location. /// - /// Links those artifacts generated by `compiler` to a the `stage` compiler's + /// Links those artifacts generated by `compiler` to the `stage` compiler's /// sysroot for the specified `host` and `target`. /// /// Note that this assumes that `compiler` has already generated the libstd diff --git a/src/etc/lldb_batchmode.py b/src/etc/lldb_batchmode.py index 24a0ce0ac3611..b0220c84ef2fa 100644 --- a/src/etc/lldb_batchmode.py +++ b/src/etc/lldb_batchmode.py @@ -12,7 +12,7 @@ # containing LLDB commands (one command per line), this script will execute the commands one after # the other. # LLDB also has the -s and -S commandline options which also execute a list of commands from a text -# file. However, this command are execute `immediately`: a the command of a `run` or `continue` +# file. However, this command are execute `immediately`: the command of a `run` or `continue` # command will be executed immediately after the `run` or `continue`, without waiting for the next # breakpoint to be hit. This a command sequence like the following will not yield reliable results: # diff --git a/src/libcore/str/mod.rs b/src/libcore/str/mod.rs index a2782dd8e2e43..fe383712f64c4 100644 --- a/src/libcore/str/mod.rs +++ b/src/libcore/str/mod.rs @@ -1896,7 +1896,7 @@ mod traits { #[inline] fn index_mut(self, slice: &mut str) -> &mut Self::Output { // is_char_boundary checks that the index is in [0, .len()] - // canot reuse `get` as above, because of NLL trouble + // cannot reuse `get` as above, because of NLL trouble if self.start <= self.end && slice.is_char_boundary(self.start) && slice.is_char_boundary(self.end) { diff --git a/src/librustc/infer/outlives/obligations.rs b/src/librustc/infer/outlives/obligations.rs index f2825887f36e2..0114f9e9321e1 100644 --- a/src/librustc/infer/outlives/obligations.rs +++ b/src/librustc/infer/outlives/obligations.rs @@ -132,7 +132,7 @@ impl<'cx, 'gcx, 'tcx> InferCtxt<'cx, 'gcx, 'tcx> { /// /// See the `region_obligations` field of `InferCtxt` for some /// comments about how this function fits into the overall expected - /// flow of the the inferencer. The key point is that it is + /// flow of the inferencer. The key point is that it is /// invoked after all type-inference variables have been bound -- /// towards the end of regionck. This also ensures that the /// region-bound-pairs are available (see comments above regarding diff --git a/src/librustc/mir/mod.rs b/src/librustc/mir/mod.rs index a84226bf665d0..a6fa7b1de7946 100644 --- a/src/librustc/mir/mod.rs +++ b/src/librustc/mir/mod.rs @@ -2610,7 +2610,7 @@ pub fn fmt_const_val(f: &mut impl Write, const_val: &ty::Const<'_>) -> fmt::Resu _ => {} } } - // print function definitons + // print function definitions if let FnDef(did, _) = ty.sty { return write!(f, "{}", item_path_str(did)); } diff --git a/src/librustc/mir/traversal.rs b/src/librustc/mir/traversal.rs index a1e2b7a06468d..f3a0b7de90374 100644 --- a/src/librustc/mir/traversal.rs +++ b/src/librustc/mir/traversal.rs @@ -142,7 +142,7 @@ impl<'a, 'tcx> Postorder<'a, 'tcx> { // // It does the actual traversal of the graph, while the `next` method on the iterator // just pops off of the stack. `visit_stack` is a stack containing pairs of nodes and - // iterators over the sucessors of those nodes. Each iteration attempts to get the next + // iterators over the successors of those nodes. Each iteration attempts to get the next // node from the top of the stack, then pushes that node and an iterator over the // successors to the top of the stack. This loop only grows `visit_stack`, stopping when // we reach a child that has no children that we haven't already visited. @@ -163,7 +163,7 @@ impl<'a, 'tcx> Postorder<'a, 'tcx> { // The state of the stack starts out with just the root node (`A` in this case); // [(A, [B, C])] // - // When the first call to `traverse_sucessor` happens, the following happens: + // When the first call to `traverse_successor` happens, the following happens: // // [(B, [D]), // `B` taken from the successors of `A`, pushed to the // // top of the stack along with the successors of `B` diff --git a/src/librustc/ty/query/plumbing.rs b/src/librustc/ty/query/plumbing.rs index 8bbfd92d688ed..efee39a1d63f9 100644 --- a/src/librustc/ty/query/plumbing.rs +++ b/src/librustc/ty/query/plumbing.rs @@ -100,7 +100,7 @@ pub(super) struct JobOwner<'a, 'tcx: 'a, Q: QueryDescription<'tcx> + 'a> { } impl<'a, 'tcx, Q: QueryDescription<'tcx>> JobOwner<'a, 'tcx, Q> { - /// Either gets a JobOwner corresponding the the query, allowing us to + /// Either gets a JobOwner corresponding the query, allowing us to /// start executing the query, or it returns with the result of the query. /// If the query is executing elsewhere, this will wait for it. /// If the query panicked, this will silently panic. @@ -314,7 +314,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> { /// Try to read a node index for the node dep_node. /// A node will have an index, when it's already been marked green, or when we can mark it /// green. This function will mark the current task as a reader of the specified node, when - /// the a node index can be found for that node. + /// a node index can be found for that node. pub(super) fn try_mark_green_and_read(self, dep_node: &DepNode) -> Option { match self.dep_graph.node_color(dep_node) { Some(DepNodeColor::Green(dep_node_index)) => { diff --git a/src/librustc_apfloat/ieee.rs b/src/librustc_apfloat/ieee.rs index 4f405858e350c..adcb9857ee3c2 100644 --- a/src/librustc_apfloat/ieee.rs +++ b/src/librustc_apfloat/ieee.rs @@ -895,7 +895,7 @@ impl Float for IeeeFloat { } // The intermediate result of the multiplication has "2 * S::PRECISION" - // signicant bit; adjust the addend to be consistent with mul result. + // significant bit; adjust the addend to be consistent with mul result. let mut ext_addend_sig = [addend.sig[0], 0]; // Extend the addend significand to ext_precision - 1. This guarantees @@ -920,7 +920,7 @@ impl Float for IeeeFloat { // Convert the result having "2 * S::PRECISION" significant-bits back to the one // having "S::PRECISION" significant-bits. First, move the radix point from - // poision "2*S::PRECISION - 1" to "S::PRECISION - 1". The exponent need to be + // position "2*S::PRECISION - 1" to "S::PRECISION - 1". The exponent need to be // adjusted by "2*S::PRECISION - 1" - "S::PRECISION - 1" = "S::PRECISION". self.exp -= S::PRECISION as ExpInt + 1; diff --git a/src/librustc_codegen_llvm/llvm_util.rs b/src/librustc_codegen_llvm/llvm_util.rs index eaa599e0cd0fa..267d7e0d54b63 100644 --- a/src/librustc_codegen_llvm/llvm_util.rs +++ b/src/librustc_codegen_llvm/llvm_util.rs @@ -184,7 +184,7 @@ const WASM_WHITELIST: &[(&str, Option<&str>)] = &[ ]; /// When rustdoc is running, provide a list of all known features so that all their respective -/// primtives may be documented. +/// primitives may be documented. /// /// IMPORTANT: If you're adding another whitelist to the above lists, make sure to add it to this /// iterator! diff --git a/src/librustc_codegen_utils/linker.rs b/src/librustc_codegen_utils/linker.rs index ae1d77f152189..e9ac92da68435 100644 --- a/src/librustc_codegen_utils/linker.rs +++ b/src/librustc_codegen_utils/linker.rs @@ -613,7 +613,7 @@ impl<'a> Linker for MsvcLinker<'a> { // from the CodeView line tables in the object files. self.cmd.arg("/DEBUG"); - // This will cause the Microsoft linker to embed .natvis info into the the PDB file + // This will cause the Microsoft linker to embed .natvis info into the PDB file let sysroot = self.sess.sysroot(); let natvis_dir_path = sysroot.join("lib\\rustlib\\etc"); if let Ok(natvis_dir) = fs::read_dir(&natvis_dir_path) { diff --git a/src/librustc_incremental/persist/fs.rs b/src/librustc_incremental/persist/fs.rs index dee50f5ab2679..2a8a0baf571b0 100644 --- a/src/librustc_incremental/persist/fs.rs +++ b/src/librustc_incremental/persist/fs.rs @@ -490,7 +490,7 @@ fn create_dir(sess: &Session, path: &Path, dir_tag: &str) -> Result<(),()> { } } -/// Allocate a the lock-file and lock it. +/// Allocate the lock-file and lock it. fn lock_directory(sess: &Session, session_dir: &Path) -> Result<(flock::Lock, PathBuf), ()> { diff --git a/src/librustc_mir/borrow_check/location.rs b/src/librustc_mir/borrow_check/location.rs index 91008e8f9690e..b3e159dd84457 100644 --- a/src/librustc_mir/borrow_check/location.rs +++ b/src/librustc_mir/borrow_check/location.rs @@ -11,7 +11,7 @@ use rustc::mir::{BasicBlock, Location, Mir}; use rustc_data_structures::indexed_vec::{Idx, IndexVec}; -/// Maps between a MIR Location, which identifies the a particular +/// Maps between a MIR Location, which identifies a particular /// statement within a basic block, to a "rich location", which /// identifies at a finer granularity. In particular, we distinguish /// the *start* of a statement and the *mid-point*. The mid-point is diff --git a/src/librustc_mir/borrow_check/nll/region_infer/values.rs b/src/librustc_mir/borrow_check/nll/region_infer/values.rs index 3607ae4f5088d..2b7ef38d3edf9 100644 --- a/src/librustc_mir/borrow_check/nll/region_infer/values.rs +++ b/src/librustc_mir/borrow_check/nll/region_infer/values.rs @@ -112,7 +112,7 @@ impl RegionValueElements { } = self.to_location(index); if statement_index == 0 { // If this is a basic block head, then the predecessors are - // the the terminators of other basic blocks + // the terminators of other basic blocks stack.extend( mir.predecessors_for(block) .iter() diff --git a/src/librustc_typeck/check/mod.rs b/src/librustc_typeck/check/mod.rs index 7dfdb926c60ef..091af449095aa 100644 --- a/src/librustc_typeck/check/mod.rs +++ b/src/librustc_typeck/check/mod.rs @@ -548,7 +548,7 @@ pub struct FnCtxt<'a, 'gcx: 'a+'tcx, 'tcx: 'a> { /// current expression. As each subpart is processed, they may set /// the flag to `Always` etc. Finally, at the end, we take the /// result and "union" it with the original value, so that when we - /// return the flag indicates if any subpart of the the parent + /// return the flag indicates if any subpart of the parent /// expression (up to and including this part) has diverged. So, /// if you read it after evaluating a subexpression `X`, the value /// you get indicates whether any subexpression that was diff --git a/src/libsyntax/ext/tt/macro_parser.rs b/src/libsyntax/ext/tt/macro_parser.rs index 06c1d58070e21..f2b1c359c0ea8 100644 --- a/src/libsyntax/ext/tt/macro_parser.rs +++ b/src/libsyntax/ext/tt/macro_parser.rs @@ -122,7 +122,7 @@ impl<'a> TokenTreeOrTokenTreeSlice<'a> { } } - /// The the `index`-th token tree of `self`. + /// The `index`-th token tree of `self`. fn get_tt(&self, index: usize) -> TokenTree { match *self { TtSeq(ref v) => v[index].clone(), diff --git a/src/libsyntax/ext/tt/quoted.rs b/src/libsyntax/ext/tt/quoted.rs index 74363f3e5f7d9..218486748315d 100644 --- a/src/libsyntax/ext/tt/quoted.rs +++ b/src/libsyntax/ext/tt/quoted.rs @@ -496,7 +496,7 @@ where return (None, KleeneOp::ZeroOrMore); } - // #2 is a Kleene op, which is the the only valid option + // #2 is a Kleene op, which is the only valid option Ok(Ok((op, _))) => { // Warn that `?` as a separator will be deprecated sess.buffer_lint( diff --git a/src/test/run-pass-fulldeps/dropck_tarena_sound_drop.rs b/src/test/run-pass-fulldeps/dropck_tarena_sound_drop.rs index 9fa0b40d49c20..e519d48ac1d4d 100644 --- a/src/test/run-pass-fulldeps/dropck_tarena_sound_drop.rs +++ b/src/test/run-pass-fulldeps/dropck_tarena_sound_drop.rs @@ -31,7 +31,7 @@ struct CheckId { v: T } // In the code below, the impl of HasId for `&'a usize` does not // actually access the borrowed data, but the point is that the // interface to CheckId does not (and cannot) know that, and therefore -// when encountering the a value V of type CheckId, we must +// when encountering a value V of type CheckId, we must // conservatively force the type S to strictly outlive V. impl Drop for CheckId { fn drop(&mut self) { diff --git a/src/test/ui/feature-gate/issue-43106-gating-of-proc_macro_derive.rs b/src/test/ui/feature-gate/issue-43106-gating-of-proc_macro_derive.rs index 5bb8bb024ed51..c23b43dfff706 100644 --- a/src/test/ui/feature-gate/issue-43106-gating-of-proc_macro_derive.rs +++ b/src/test/ui/feature-gate/issue-43106-gating-of-proc_macro_derive.rs @@ -13,7 +13,7 @@ // not descend further into the mod for other occurrences of the same // error. // -// This file sits on its own because the the "weird" occurrences here +// This file sits on its own because the "weird" occurrences here // signal errors, making it incompatible with the "warnings only" // nature of issue-43106-gating-of-builtin-attrs.rs diff --git a/src/tools/compiletest/src/header.rs b/src/tools/compiletest/src/header.rs index f12dd31c402d9..ed2114b653015 100644 --- a/src/tools/compiletest/src/header.rs +++ b/src/tools/compiletest/src/header.rs @@ -490,7 +490,7 @@ impl TestProps { } if !self.compile_pass { - // run-pass implies must_compile_sucessfully + // run-pass implies must_compile_successfully self.compile_pass = config.parse_compile_pass(ln) || self.run_pass; }