Skip to content

Commit d5bef41

Browse files
authored
Rollup merge of #124948 - blyxyas:remove-repeated-words, r=compiler-errors
chore: Remove repeated words (extension of #124924) When I saw #124924 I thought "Hey, I'm sure that there are far more than just two typos of this nature in the codebase". So here's some more typo-fixing. Some found with regex, some found with a spellchecker. Every single one manually reviewed by me (along with hundreds of false negatives by the tools)
2 parents 959a67a + c5c820e commit d5bef41

File tree

29 files changed

+36
-36
lines changed

29 files changed

+36
-36
lines changed

compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
652652
}
653653

654654
// FIXME: We make sure that this is a normal top-level binding,
655-
// but we could suggest `todo!()` for all uninitialized bindings in the pattern pattern
655+
// but we could suggest `todo!()` for all uninitialized bindings in the pattern
656656
if let hir::StmtKind::Let(hir::LetStmt { span, ty, init: None, pat, .. }) =
657657
&ex.kind
658658
&& let hir::PatKind::Binding(..) = pat.kind

compiler/rustc_hir_typeck/src/expr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3112,7 +3112,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
31123112

31133113
let true_errors = ocx.select_where_possible();
31143114

3115-
// Do a leak check -- we can't really report report a useful error here,
3115+
// Do a leak check -- we can't really report a useful error here,
31163116
// but it at least avoids an ICE when the error has to do with higher-ranked
31173117
// lifetimes.
31183118
self.leak_check(outer_universe, Some(snapshot))?;

compiler/rustc_lint/src/non_local_def.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ declare_lint! {
3838
///
3939
/// Creating non-local definitions go against expectation and can create discrepancies
4040
/// in tooling. It should be avoided. It may become deny-by-default in edition 2024
41-
/// and higher, see see the tracking issue <https://github.com/rust-lang/rust/issues/120363>.
41+
/// and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>.
4242
///
4343
/// An `impl` definition is non-local if it is nested inside an item and neither
4444
/// the type nor the trait are at the same nesting level as the `impl` block.

compiler/rustc_sanitizers/src/cfi/typeid/itanium_cxx_abi/transform.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ fn trait_object_ty<'tcx>(tcx: TyCtxt<'tcx>, poly_trait_ref: ty::PolyTraitRef<'tc
269269
/// if a function is member of the group derived from this type id. Therefore, in the first call to
270270
/// typeid_for_fnabi (when type ids are attached to functions and methods), it can only include at
271271
/// most as much information that would be available in the second call (i.e., during code
272-
/// generation at call sites); otherwise, the type ids would not not match.
272+
/// generation at call sites); otherwise, the type ids would not match.
273273
///
274274
/// For this, it:
275275
///

library/portable-simd/crates/core_simd/src/ops.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ macro_rules! for_base_types {
122122
#[inline]
123123
#[must_use = "operator returns a new vector without mutating the inputs"]
124124
// TODO: only useful for int Div::div, but we hope that this
125-
// will essentially always always get inlined anyway.
125+
// will essentially always get inlined anyway.
126126
#[track_caller]
127127
fn $call(self, rhs: Self) -> Self::Output {
128128
$macro_impl!(self, rhs, $inner, $scalar)

src/tools/clippy/clippy_lints/src/methods/needless_collect.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ pub(super) fn check<'tcx>(
127127
}
128128
}
129129

130-
/// checks for for collecting into a (generic) method or function argument
130+
/// checks for collecting into a (generic) method or function argument
131131
/// taking an `IntoIterator`
132132
fn check_collect_into_intoiterator<'tcx>(
133133
cx: &LateContext<'tcx>,

src/tools/clippy/tests/ui/ptr_arg.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ mod issue_9218 {
282282
todo!()
283283
}
284284

285-
// These two's return types don't use use 'a so it's not okay
285+
// These two's return types don't use 'a so it's not okay
286286
fn cow_bad_ret_ty_1<'a>(input: &'a Cow<'a, str>) -> &'static str {
287287
//~^ ERROR: using a reference to `Cow` is not recommended
288288
todo!()

src/tools/compiletest/src/common.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ pub struct Config {
250250
/// Only run tests that match these filters
251251
pub filters: Vec<String>,
252252

253-
/// Skip tests tests matching these substrings. Corresponds to
253+
/// Skip tests matching these substrings. Corresponds to
254254
/// `test::TestOpts::skip`. `filter_exact` does not apply to these flags.
255255
pub skip: Vec<String>,
256256

@@ -381,7 +381,7 @@ pub struct Config {
381381
/// Whether to rerun tests even if the inputs are unchanged.
382382
pub force_rerun: bool,
383383

384-
/// Only rerun the tests that result has been modified accoring to Git status
384+
/// Only rerun the tests that result has been modified according to Git status
385385
pub only_modified: bool,
386386

387387
pub target_cfgs: OnceLock<TargetCfgs>,

src/tools/compiletest/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -950,7 +950,7 @@ fn is_android_gdb_target(target: &str) -> bool {
950950
)
951951
}
952952

953-
/// Returns `true` if the given target is a MSVC target for the purpouses of CDB testing.
953+
/// Returns `true` if the given target is a MSVC target for the purposes of CDB testing.
954954
fn is_pc_windows_msvc_target(target: &str) -> bool {
955955
target.ends_with("-pc-windows-msvc")
956956
}

src/tools/jsondoclint/src/validator.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const LOCAL_CRATE_ID: u32 = 0;
2121
/// it is well formed. This involves calling `check_*` functions on
2222
/// fields of that item, and `add_*` functions on [`Id`]s.
2323
/// - `add_*`: These add an [`Id`] to the worklist, after validating it to check if
24-
/// the `Id` is a kind expected in this suituation.
24+
/// the `Id` is a kind expected in this situation.
2525
#[derive(Debug)]
2626
pub struct Validator<'a> {
2727
pub(crate) errs: Vec<Error>,

0 commit comments

Comments
 (0)