Skip to content

Commit 999fd56

Browse files
authored
Rollup merge of #66798 - bwignall:typo, r=varkor
Fix spelling typos Should be non-semantic. Uses https://en.wikipedia.org/wiki/Wikipedia:Lists_of_common_misspellings/For_machines to find likely typos.
2 parents d1cc4c3 + 16fabd8 commit 999fd56

File tree

32 files changed

+37
-37
lines changed

32 files changed

+37
-37
lines changed

src/bootstrap/compile.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ impl Step for Std {
113113
}
114114
}
115115

116-
/// Copies third pary objects needed by various targets.
116+
/// Copies third party objects needed by various targets.
117117
fn copy_third_party_objects(builder: &Builder<'_>, compiler: &Compiler, target: Interned<String>)
118118
-> Vec<PathBuf>
119119
{

src/liballoc/collections/btree/node.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,7 @@ impl<'a, K: 'a, V: 'a, Type> NodeRef<marker::Immut<'a>, K, V, Type> {
596596
// (We might be one-past-the-end, but that is allowed by LLVM.)
597597
// Getting the pointer is tricky though. `NodeHeader` does not have a `keys`
598598
// field because we want its size to not depend on the alignment of `K`
599-
// (needed becuase `as_header` should be safe). We cannot call `as_leaf`
599+
// (needed because `as_header` should be safe). We cannot call `as_leaf`
600600
// because we might be the shared root.
601601
// For this reason, `NodeHeader` has this `K2` parameter (that's usually `()`
602602
// and hence just adds a size-0-align-1 field, not affecting layout).

src/liballoc/tests/vec.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -985,7 +985,7 @@ fn drain_filter_consumed_panic() {
985985
};
986986
let drain = data.drain_filter(filter);
987987

988-
// NOTE: The DrainFilter is explictly consumed
988+
// NOTE: The DrainFilter is explicitly consumed
989989
drain.for_each(drop);
990990
});
991991

src/liballoc/vec.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2839,7 +2839,7 @@ pub struct DrainFilter<'a, T, F>
28392839
old_len: usize,
28402840
/// The filter test predicate.
28412841
pred: F,
2842-
/// A flag that indicates a panic has occured in the filter test prodicate.
2842+
/// A flag that indicates a panic has occurred in the filter test prodicate.
28432843
/// This is used as a hint in the drop implmentation to prevent consumption
28442844
/// of the remainder of the `DrainFilter`. Any unprocessed items will be
28452845
/// backshifted in the `vec`, but no further items will be dropped or

src/libcore/hint.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ pub fn spin_loop() {
113113
pub fn black_box<T>(dummy: T) -> T {
114114
// We need to "use" the argument in some way LLVM can't introspect, and on
115115
// targets that support it we can typically leverage inline assembly to do
116-
// this. LLVM's intepretation of inline assembly is that it's, well, a black
116+
// this. LLVM's interpretation of inline assembly is that it's, well, a black
117117
// box. This isn't the greatest implementation since it probably deoptimizes
118118
// more than we want, but it's so far good enough.
119119
unsafe {

src/libcore/intrinsics.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1279,7 +1279,7 @@ extern "rust-intrinsic" {
12791279
/// undefined behavior when `x + y > T::max_value()` or `x + y < T::min_value()`.
12801280
pub fn unchecked_add<T>(x: T, y: T) -> T;
12811281

1282-
/// Returns the result of an unchecked substraction, resulting in
1282+
/// Returns the result of an unchecked subtraction, resulting in
12831283
/// undefined behavior when `x - y > T::max_value()` or `x - y < T::min_value()`.
12841284
pub fn unchecked_sub<T>(x: T, y: T) -> T;
12851285

src/libpanic_unwind/dwarf/eh.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ pub unsafe fn find_eh_action(lsda: *const u8, context: &EHContext<'_>, foreign_e
130130
fn interpret_cs_action(cs_action: u64, lpad: usize, foreign_exception: bool) -> EHAction {
131131
if cs_action == 0 {
132132
// If cs_action is 0 then this is a cleanup (Drop::drop). We run these
133-
// for both Rust panics and foriegn exceptions.
133+
// for both Rust panics and foreign exceptions.
134134
EHAction::Cleanup(lpad)
135135
} else if foreign_exception {
136136
// catch_unwind should not catch foreign exceptions, only Rust panics.

src/librustc/mir/interpret/error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ pub fn struct_error<'tcx>(tcx: TyCtxtAt<'tcx>, msg: &str) -> DiagnosticBuilder<'
185185
}
186186

187187
/// Packages the kind of error we got from the const code interpreter
188-
/// up with a Rust-level backtrace of where the error occured.
188+
/// up with a Rust-level backtrace of where the error occurred.
189189
/// Thsese should always be constructed by calling `.into()` on
190190
/// a `InterpError`. In `librustc_mir::interpret`, we have `throw_err_*`
191191
/// macros for this.

src/librustc/mir/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ impl<T: Decodable> rustc_serialize::UseSpecializedDecodable for ClearCrossCrate<
443443
/// Grouped information about the source code origin of a MIR entity.
444444
/// Intended to be inspected by diagnostics and debuginfo.
445445
/// Most passes can work with it as a whole, within a single function.
446-
// The unoffical Cranelift backend, at least as of #65828, needs `SourceInfo` to implement `Eq` and
446+
// The unofficial Cranelift backend, at least as of #65828, needs `SourceInfo` to implement `Eq` and
447447
// `Hash`. Please ping @bjorn3 if removing them.
448448
#[derive(Copy, Clone, Debug, Eq, PartialEq, RustcEncodable, RustcDecodable, Hash, HashStable)]
449449
pub struct SourceInfo {

src/librustc/traits/auto_trait.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ impl AutoTraitFinder<'tcx> {
461461
// The old predicate has a region variable where the new
462462
// predicate has some other kind of region. An region
463463
// variable isn't something we can actually display to a user,
464-
// so we choose ther new predicate (which doesn't have a region
464+
// so we choose their new predicate (which doesn't have a region
465465
// varaible).
466466
//
467467
// In both cases, we want to remove the old predicate,
@@ -703,7 +703,7 @@ impl AutoTraitFinder<'tcx> {
703703
// that we could add to our ParamEnv that would 'fix' this kind
704704
// of error, as it's not caused by an unimplemented type.
705705
//
706-
// 2. We succesfully project the predicate (Ok(Some(_))), generating
706+
// 2. We successfully project the predicate (Ok(Some(_))), generating
707707
// some subobligations. We then process these subobligations
708708
// like any other generated sub-obligations.
709709
//
@@ -770,7 +770,7 @@ impl AutoTraitFinder<'tcx> {
770770
Ok(None) => {
771771
// It's ok not to make progress when hvave no inference variables -
772772
// in that case, we were only performing unifcation to check if an
773-
// error occured (which would indicate that it's impossible for our
773+
// error occurred (which would indicate that it's impossible for our
774774
// type to implement the auto trait).
775775
// However, we should always make progress (either by generating
776776
// subobligations or getting an error) when we started off with

0 commit comments

Comments
 (0)