Skip to content

Commit a62af85

Browse files
Fix typos.
1 parent b76ee83 commit a62af85

File tree

19 files changed

+22
-22
lines changed

19 files changed

+22
-22
lines changed

src/bootstrap/compile.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ impl Step for StdLink {
203203

204204
/// Link all libstd rlibs/dylibs into the sysroot location.
205205
///
206-
/// Links those artifacts generated by `compiler` to a the `stage` compiler's
206+
/// Links those artifacts generated by `compiler` to the `stage` compiler's
207207
/// sysroot for the specified `host` and `target`.
208208
///
209209
/// Note that this assumes that `compiler` has already generated the libstd

src/etc/lldb_batchmode.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# containing LLDB commands (one command per line), this script will execute the commands one after
1313
# the other.
1414
# LLDB also has the -s and -S commandline options which also execute a list of commands from a text
15-
# file. However, this command are execute `immediately`: a the command of a `run` or `continue`
15+
# file. However, this command are execute `immediately`: the command of a `run` or `continue`
1616
# command will be executed immediately after the `run` or `continue`, without waiting for the next
1717
# breakpoint to be hit. This a command sequence like the following will not yield reliable results:
1818
#

src/libcore/str/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1896,7 +1896,7 @@ mod traits {
18961896
#[inline]
18971897
fn index_mut(self, slice: &mut str) -> &mut Self::Output {
18981898
// is_char_boundary checks that the index is in [0, .len()]
1899-
// canot reuse `get` as above, because of NLL trouble
1899+
// cannot reuse `get` as above, because of NLL trouble
19001900
if self.start <= self.end &&
19011901
slice.is_char_boundary(self.start) &&
19021902
slice.is_char_boundary(self.end) {

src/librustc/infer/outlives/obligations.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ impl<'cx, 'gcx, 'tcx> InferCtxt<'cx, 'gcx, 'tcx> {
132132
///
133133
/// See the `region_obligations` field of `InferCtxt` for some
134134
/// comments about how this function fits into the overall expected
135-
/// flow of the the inferencer. The key point is that it is
135+
/// flow of the inferencer. The key point is that it is
136136
/// invoked after all type-inference variables have been bound --
137137
/// towards the end of regionck. This also ensures that the
138138
/// region-bound-pairs are available (see comments above regarding

src/librustc/mir/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2610,7 +2610,7 @@ pub fn fmt_const_val(f: &mut impl Write, const_val: &ty::Const<'_>) -> fmt::Resu
26102610
_ => {}
26112611
}
26122612
}
2613-
// print function definitons
2613+
// print function definitions
26142614
if let FnDef(did, _) = ty.sty {
26152615
return write!(f, "{}", item_path_str(did));
26162616
}

src/librustc/mir/traversal.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ impl<'a, 'tcx> Postorder<'a, 'tcx> {
142142
//
143143
// It does the actual traversal of the graph, while the `next` method on the iterator
144144
// just pops off of the stack. `visit_stack` is a stack containing pairs of nodes and
145-
// iterators over the sucessors of those nodes. Each iteration attempts to get the next
145+
// iterators over the successors of those nodes. Each iteration attempts to get the next
146146
// node from the top of the stack, then pushes that node and an iterator over the
147147
// successors to the top of the stack. This loop only grows `visit_stack`, stopping when
148148
// we reach a child that has no children that we haven't already visited.
@@ -163,7 +163,7 @@ impl<'a, 'tcx> Postorder<'a, 'tcx> {
163163
// The state of the stack starts out with just the root node (`A` in this case);
164164
// [(A, [B, C])]
165165
//
166-
// When the first call to `traverse_sucessor` happens, the following happens:
166+
// When the first call to `traverse_successor` happens, the following happens:
167167
//
168168
// [(B, [D]), // `B` taken from the successors of `A`, pushed to the
169169
// // top of the stack along with the successors of `B`

src/librustc/ty/query/plumbing.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ pub(super) struct JobOwner<'a, 'tcx: 'a, Q: QueryDescription<'tcx> + 'a> {
100100
}
101101

102102
impl<'a, 'tcx, Q: QueryDescription<'tcx>> JobOwner<'a, 'tcx, Q> {
103-
/// Either gets a JobOwner corresponding the the query, allowing us to
103+
/// Either gets a JobOwner corresponding the query, allowing us to
104104
/// start executing the query, or it returns with the result of the query.
105105
/// If the query is executing elsewhere, this will wait for it.
106106
/// If the query panicked, this will silently panic.
@@ -314,7 +314,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
314314
/// Try to read a node index for the node dep_node.
315315
/// A node will have an index, when it's already been marked green, or when we can mark it
316316
/// green. This function will mark the current task as a reader of the specified node, when
317-
/// the a node index can be found for that node.
317+
/// a node index can be found for that node.
318318
pub(super) fn try_mark_green_and_read(self, dep_node: &DepNode) -> Option<DepNodeIndex> {
319319
match self.dep_graph.node_color(dep_node) {
320320
Some(DepNodeColor::Green(dep_node_index)) => {

src/librustc_apfloat/ieee.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -895,7 +895,7 @@ impl<S: Semantics> Float for IeeeFloat<S> {
895895
}
896896

897897
// The intermediate result of the multiplication has "2 * S::PRECISION"
898-
// signicant bit; adjust the addend to be consistent with mul result.
898+
// significant bit; adjust the addend to be consistent with mul result.
899899
let mut ext_addend_sig = [addend.sig[0], 0];
900900

901901
// Extend the addend significand to ext_precision - 1. This guarantees
@@ -920,7 +920,7 @@ impl<S: Semantics> Float for IeeeFloat<S> {
920920

921921
// Convert the result having "2 * S::PRECISION" significant-bits back to the one
922922
// having "S::PRECISION" significant-bits. First, move the radix point from
923-
// poision "2*S::PRECISION - 1" to "S::PRECISION - 1". The exponent need to be
923+
// position "2*S::PRECISION - 1" to "S::PRECISION - 1". The exponent need to be
924924
// adjusted by "2*S::PRECISION - 1" - "S::PRECISION - 1" = "S::PRECISION".
925925
self.exp -= S::PRECISION as ExpInt + 1;
926926

src/librustc_codegen_llvm/llvm_util.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ const WASM_WHITELIST: &[(&str, Option<&str>)] = &[
184184
];
185185

186186
/// When rustdoc is running, provide a list of all known features so that all their respective
187-
/// primtives may be documented.
187+
/// primitives may be documented.
188188
///
189189
/// IMPORTANT: If you're adding another whitelist to the above lists, make sure to add it to this
190190
/// iterator!

src/librustc_codegen_utils/linker.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,7 @@ impl<'a> Linker for MsvcLinker<'a> {
613613
// from the CodeView line tables in the object files.
614614
self.cmd.arg("/DEBUG");
615615

616-
// This will cause the Microsoft linker to embed .natvis info into the the PDB file
616+
// This will cause the Microsoft linker to embed .natvis info into the PDB file
617617
let sysroot = self.sess.sysroot();
618618
let natvis_dir_path = sysroot.join("lib\\rustlib\\etc");
619619
if let Ok(natvis_dir) = fs::read_dir(&natvis_dir_path) {

src/librustc_incremental/persist/fs.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ fn create_dir(sess: &Session, path: &Path, dir_tag: &str) -> Result<(),()> {
490490
}
491491
}
492492

493-
/// Allocate a the lock-file and lock it.
493+
/// Allocate the lock-file and lock it.
494494
fn lock_directory(sess: &Session,
495495
session_dir: &Path)
496496
-> Result<(flock::Lock, PathBuf), ()> {

src/librustc_mir/borrow_check/location.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
use rustc::mir::{BasicBlock, Location, Mir};
1212
use rustc_data_structures::indexed_vec::{Idx, IndexVec};
1313

14-
/// Maps between a MIR Location, which identifies the a particular
14+
/// Maps between a MIR Location, which identifies a particular
1515
/// statement within a basic block, to a "rich location", which
1616
/// identifies at a finer granularity. In particular, we distinguish
1717
/// the *start* of a statement and the *mid-point*. The mid-point is

src/librustc_mir/borrow_check/nll/region_infer/values.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ impl RegionValueElements {
112112
} = self.to_location(index);
113113
if statement_index == 0 {
114114
// If this is a basic block head, then the predecessors are
115-
// the the terminators of other basic blocks
115+
// the terminators of other basic blocks
116116
stack.extend(
117117
mir.predecessors_for(block)
118118
.iter()

src/librustc_typeck/check/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ pub struct FnCtxt<'a, 'gcx: 'a+'tcx, 'tcx: 'a> {
548548
/// current expression. As each subpart is processed, they may set
549549
/// the flag to `Always` etc. Finally, at the end, we take the
550550
/// result and "union" it with the original value, so that when we
551-
/// return the flag indicates if any subpart of the the parent
551+
/// return the flag indicates if any subpart of the parent
552552
/// expression (up to and including this part) has diverged. So,
553553
/// if you read it after evaluating a subexpression `X`, the value
554554
/// you get indicates whether any subexpression that was

src/libsyntax/ext/tt/macro_parser.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ impl<'a> TokenTreeOrTokenTreeSlice<'a> {
122122
}
123123
}
124124

125-
/// The the `index`-th token tree of `self`.
125+
/// The `index`-th token tree of `self`.
126126
fn get_tt(&self, index: usize) -> TokenTree {
127127
match *self {
128128
TtSeq(ref v) => v[index].clone(),

src/libsyntax/ext/tt/quoted.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ where
496496
return (None, KleeneOp::ZeroOrMore);
497497
}
498498

499-
// #2 is a Kleene op, which is the the only valid option
499+
// #2 is a Kleene op, which is the only valid option
500500
Ok(Ok((op, _))) => {
501501
// Warn that `?` as a separator will be deprecated
502502
sess.buffer_lint(

src/test/run-pass-fulldeps/dropck_tarena_sound_drop.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ struct CheckId<T:HasId> { v: T }
3131
// In the code below, the impl of HasId for `&'a usize` does not
3232
// actually access the borrowed data, but the point is that the
3333
// interface to CheckId does not (and cannot) know that, and therefore
34-
// when encountering the a value V of type CheckId<S>, we must
34+
// when encountering a value V of type CheckId<S>, we must
3535
// conservatively force the type S to strictly outlive V.
3636
impl<T:HasId> Drop for CheckId<T> {
3737
fn drop(&mut self) {

src/test/ui/feature-gate/issue-43106-gating-of-proc_macro_derive.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// not descend further into the mod for other occurrences of the same
1414
// error.
1515
//
16-
// This file sits on its own because the the "weird" occurrences here
16+
// This file sits on its own because the "weird" occurrences here
1717
// signal errors, making it incompatible with the "warnings only"
1818
// nature of issue-43106-gating-of-builtin-attrs.rs
1919

src/tools/compiletest/src/header.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ impl TestProps {
490490
}
491491

492492
if !self.compile_pass {
493-
// run-pass implies must_compile_sucessfully
493+
// run-pass implies must_compile_successfully
494494
self.compile_pass = config.parse_compile_pass(ln) || self.run_pass;
495495
}
496496

0 commit comments

Comments
 (0)