Skip to content

Commit 94b4fcf

Browse files
committed
chore: Remove repeated words (extension of #124924)
1 parent e6e262f commit 94b4fcf

File tree

23 files changed

+23
-23
lines changed

23 files changed

+23
-23
lines changed

compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
651651
}
652652

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

compiler/rustc_hir_typeck/src/expr.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3109,7 +3109,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
31093109

31103110
let true_errors = ocx.select_where_possible();
31113111

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

compiler/rustc_lint/src/non_local_def.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ declare_lint! {
3939
///
4040
/// Creating non-local definitions go against expectation and can create discrepancies
4141
/// in tooling. It should be avoided. It may become deny-by-default in edition 2024
42-
/// and higher, see see the tracking issue <https://github.com/rust-lang/rust/issues/120363>.
42+
/// and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>.
4343
///
4444
/// An `impl` definition is non-local if it is nested inside an item and neither
4545
/// 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

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

library/core/src/ptr/mut_ptr.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ impl<T: ?Sized> *mut T {
187187
///
188188
/// This is similar to `self as usize`, which semantically discards *provenance* and
189189
/// *address-space* information. However, unlike `self as usize`, casting the returned address
190-
/// back to a pointer yields yields a [pointer without provenance][without_provenance_mut], which is undefined
190+
/// back to a pointer yields a [pointer without provenance][without_provenance_mut], which is undefined
191191
/// behavior to dereference. To properly restore the lost information and obtain a
192192
/// dereferenceable pointer, use [`with_addr`][pointer::with_addr] or
193193
/// [`map_addr`][pointer::map_addr].

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

+1-1
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

+1-1
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

+1-1
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

+1-1
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

src/tools/miri/miri-script/src/commands.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ impl Command {
251251
cmd!(sh, "git fetch http://localhost:{JOSH_PORT}/rust-lang/rust.git@{commit}{JOSH_FILTER}.git")
252252
.run()
253253
.map_err(|e| {
254-
// Try to un-do the previous `git commit`, to leave the repo in the state we found it it.
254+
// Try to un-do the previous `git commit`, to leave the repo in the state we found it.
255255
cmd!(sh, "git reset --hard HEAD^")
256256
.run()
257257
.expect("FAILED to clean up again after failed `git fetch`, sorry for that");

src/tools/miri/src/shims/unix/mem.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
7575
// * The implementation does not support the combination of accesses requested in the
7676
// prot argument.
7777
//
78-
// Miri doesn't support MAP_FIXED or any any protections other than PROT_READ|PROT_WRITE.
78+
// Miri doesn't support MAP_FIXED or any protections other than PROT_READ|PROT_WRITE.
7979
if flags & map_fixed != 0 || prot != prot_read | prot_write {
8080
this.set_last_error(this.eval_libc("ENOTSUP"))?;
8181
return Ok(this.eval_libc("MAP_FAILED"));

src/tools/rust-analyzer/crates/ide-assists/src/handlers/convert_named_struct_to_tuple_struct.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ fn edit_struct_def(
8585
strukt: &Either<ast::Struct, ast::Variant>,
8686
record_fields: ast::RecordFieldList,
8787
) {
88-
// Note that we don't need to consider macro files in this function because this this is
88+
// Note that we don't need to consider macro files in this function because this is
8989
// currently not triggered for struct definitions inside macro calls.
9090
let tuple_fields = record_fields
9191
.fields()

src/tools/rust-analyzer/crates/ide-db/src/search.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//! Implementation of find-usages functionality.
22
//!
33
//! It is based on the standard ide trick: first, we run a fast text search to
4-
//! get a super-set of matches. Then, we we confirm each match using precise
4+
//! get a super-set of matches. Then, we confirm each match using precise
55
//! name resolution.
66
77
use std::mem;

src/tools/rust-analyzer/crates/rust-analyzer/src/task_pool.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ impl<T> TaskPool<T> {
4545

4646
/// `TaskQueue`, like its name suggests, queues tasks.
4747
///
48-
/// This should only be used used if a task must run after [`GlobalState::process_changes`]
48+
/// This should only be used if a task must run after [`GlobalState::process_changes`]
4949
/// has been called.
5050
pub(crate) struct TaskQueue {
5151
pub(crate) sender: crossbeam_channel::Sender<QueuedTask>,

src/tools/rust-analyzer/crates/salsa/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ pub trait QueryDb<'d>: Sized {
443443
/// Trait implements by all of the "special types" associated with
444444
/// each of your queries.
445445
pub trait Query: Debug + Default + Sized + for<'d> QueryDb<'d> {
446-
/// Type that you you give as a parameter -- for queries with zero
446+
/// Type that you give as a parameter -- for queries with zero
447447
/// or more than one input, this will be a tuple.
448448
type Key: Clone + Debug + Hash + Eq;
449449

src/tools/rustfmt/src/comment.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ pub(crate) fn combine_strs_with_missing_comments(
208208

209209
// We have a missing comment between the first expression and the second expression.
210210

211-
// Peek the the original source code and find out whether there is a newline between the first
211+
// Peek the original source code and find out whether there is a newline between the first
212212
// expression and the second expression or the missing comment. We will preserve the original
213213
// layout whenever possible.
214214
let original_snippet = context.snippet(span);

src/tools/rustfmt/src/config/options.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ pub enum Color {
191191
pub enum Version {
192192
/// 1.x.y. When specified, rustfmt will format in the same style as 1.0.0.
193193
One,
194-
/// 2.x.y. When specified, rustfmt will format in the the latest style.
194+
/// 2.x.y. When specified, rustfmt will format in the latest style.
195195
Two,
196196
}
197197

tests/ui/associated-types/associated-types-eq-2.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
struct Bar;
55
struct Qux;
66

7-
// Tests for a a non generic trait
7+
// Tests for a non generic trait
88
pub trait Tr1 {
99
type A;
1010
fn boo(&self) -> <Self as Tr1>::A;

tests/ui/coherence/associated-type2.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! A regression test for #120343. The overlap error was previously
22
//! silenced in coherence because projecting `<() as ToUnit>::Unit`
3-
//! failed. Then then silenced the missing items error in the `ToUnit`
3+
//! failed. Then silenced the missing items error in the `ToUnit`
44
//! impl, causing us to not emit any errors and ICEing due to a
55
//! `span_delay_bug`.
66

tests/ui/higher-ranked/leak-check/candidate-from-env-universe-err-project.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ fn function3<T: Trait<'static, Assoc = usize>>() {
4949
// Trying to normalize the type `for<'a> fn(<T as Trait<'a>>::Assoc)`
5050
// only gets to `<T as Trait<'a>>::Assoc` once `'a` has been already
5151
// instantiated, causing us to prefer the where-bound over the impl
52-
// resulting in a placeholder error. Even if were were to also use the
52+
// resulting in a placeholder error. Even if we were to also use the
5353
// leak check during candidate selection for normalization, this
5454
// case would still not compile.
5555
let _higher_ranked_norm: for<'a> fn(<T as Trait<'a>>::Assoc) = |_| ();

tests/ui/parser/label-is-actually-char.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Note: it's ok to interpret 'a as 'a', but but not ok to interpret 'abc as
1+
// Note: it's ok to interpret 'a as 'a', but not ok to interpret 'abc as
22
// 'abc' because 'abc' is not a valid char literal.
33

44
fn main() {

tests/ui/type-alias-impl-trait/defined-by-user-annotation.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// User type annotation in fn bodies is a a valid defining site for opaque types.
1+
// User type annotation in fn bodies is a valid defining site for opaque types.
22
//@ check-pass
33
#![feature(type_alias_impl_trait)]
44

tests/ui/type-alias-impl-trait/equal-lifetime-params-not-ok.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ mod mod3 {
2525
}
2626

2727
// This is similar to the previous cases in that 'a is equal to 'static,
28-
// which is is some sense an implicit parameter to `Opaque`.
28+
// which is some sense an implicit parameter to `Opaque`.
2929
// For example, given a defining use `Opaque<'a> := &'a ()`,
3030
// it is ambiguous whether `Opaque<'a> := &'a ()` or `Opaque<'a> := &'static ()`
3131
mod mod4 {

0 commit comments

Comments
 (0)