Skip to content

Commit a10c231

Browse files
authored
Rollup merge of #127230 - hattizai:patch01, r=saethlin
chore: remove duplicate words remove duplicate words in comments to improve readability.
2 parents 5f17e5c + ada9fda commit a10c231

File tree

23 files changed

+26
-26
lines changed

23 files changed

+26
-26
lines changed

compiler/rustc_codegen_ssa/src/mir/block.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
403403
//
404404
// Why only in unoptimized builds?
405405
// - In unoptimized builds LLVM uses FastISel which does not support switches, so it
406-
// must fall back to the to the slower SelectionDAG isel. Therefore, using `br` gives
406+
// must fall back to the slower SelectionDAG isel. Therefore, using `br` gives
407407
// significant compile time speedups for unoptimized builds.
408408
// - In optimized builds the above doesn't hold, and using `br` sometimes results in
409409
// worse generated code because LLVM can no longer tell that the value being switched

compiler/rustc_const_eval/src/interpret/discriminant.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
245245
// The tag of a `Single` enum is like the tag of the niched
246246
// variant: there's no tag as the discriminant is encoded
247247
// entirely implicitly. If `write_discriminant` ever hits this
248-
// case, we do a "validation read" to ensure the the right
248+
// case, we do a "validation read" to ensure the right
249249
// discriminant is encoded implicitly, so any attempt to write
250250
// the wrong discriminant for a `Single` enum will reliably
251251
// result in UB.

compiler/rustc_hir_typeck/src/method/suggest.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
499499
}
500500
}
501501

502-
// If the shadowed binding has an an itializer expression,
502+
// If the shadowed binding has an itializer expression,
503503
// use the initializer expression'ty to try to find the method again.
504504
// For example like: `let mut x = Vec::new();`,
505505
// `Vec::new()` is the itializer expression.
@@ -968,7 +968,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
968968
}
969969

970970
// Make sure that, if any traits other than the found ones were involved,
971-
// we don't don't report an unimplemented trait.
971+
// we don't report an unimplemented trait.
972972
// We don't want to say that `iter::Cloned` is not an iterator, just
973973
// because of some non-Clone item being iterated over.
974974
for (predicate, _parent_pred, _cause) in unsatisfied_predicates {

compiler/rustc_middle/src/ty/closure.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ impl<'tcx> TyCtxt<'tcx> {
237237
/// Eg: 1. `foo.x` which is represented using `projections=[Field(x)]` is an ancestor of
238238
/// `foo.x.y` which is represented using `projections=[Field(x), Field(y)]`.
239239
/// Note both `foo.x` and `foo.x.y` start off of the same root variable `foo`.
240-
/// 2. Since we only look at the projections here function will return `bar.x` as an a valid
240+
/// 2. Since we only look at the projections here function will return `bar.x` as a valid
241241
/// ancestor of `foo.x.y`. It's the caller's responsibility to ensure that both projections
242242
/// list are being applied to the same root variable.
243243
pub fn is_ancestor_or_same_capture(

compiler/rustc_mir_build/src/build/expr/as_place.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ fn convert_to_hir_projections_and_truncate_for_capture(
130130
/// Eg: 1. `foo.x` which is represented using `projections=[Field(x)]` is an ancestor of
131131
/// `foo.x.y` which is represented using `projections=[Field(x), Field(y)]`.
132132
/// Note both `foo.x` and `foo.x.y` start off of the same root variable `foo`.
133-
/// 2. Since we only look at the projections here function will return `bar.x` as an a valid
133+
/// 2. Since we only look at the projections here function will return `bar.x` as a valid
134134
/// ancestor of `foo.x.y`. It's the caller's responsibility to ensure that both projections
135135
/// list are being applied to the same root variable.
136136
fn is_ancestor_or_same_capture(

compiler/rustc_mir_build/src/thir/pattern/const_to_pat.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ impl<'tcx> ConstToPat<'tcx> {
138138
// lints, but no errors), double-check that all types in the const implement
139139
// `PartialEq`. Even if we have a valtree, we may have found something
140140
// in there with non-structural-equality, meaning we match using `PartialEq`
141-
// and we hence have to check that that impl exists.
141+
// and we hence have to check if that impl exists.
142142
// This is all messy but not worth cleaning up: at some point we'll emit
143143
// a hard error when we don't have a valtree or when we find something in
144144
// the valtree that is not structural; then this can all be made a lot simpler.

compiler/rustc_mir_transform/src/gvn.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
//! `Value` is interned as a `VnIndex`, which allows us to cheaply compute identical values.
99
//!
1010
//! From those assignments, we construct a mapping `VnIndex -> Vec<(Local, Location)>` of available
11-
//! values, the locals in which they are stored, and a the assignment location.
11+
//! values, the locals in which they are stored, and the assignment location.
1212
//!
1313
//! In a second pass, we traverse all (non SSA) assignments `x = rvalue` and operands. For each
1414
//! one, we compute the `VnIndex` of the rvalue. If this `VnIndex` is associated to a constant, we

compiler/rustc_mir_transform/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ fn run_runtime_lowering_passes<'tcx>(tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
519519
&add_subtyping_projections::Subtyper, // calling this after reveal_all ensures that we don't deal with opaque types
520520
&elaborate_drops::ElaborateDrops,
521521
// This will remove extraneous landing pads which are no longer
522-
// necessary as well as well as forcing any call in a non-unwinding
522+
// necessary as well as forcing any call in a non-unwinding
523523
// function calling a possibly-unwinding function to abort the process.
524524
&abort_unwinding_calls::AbortUnwindingCalls,
525525
// AddMovesForPackedDrops needs to run after drop

compiler/rustc_mir_transform/src/promote_consts.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -816,7 +816,7 @@ impl<'a, 'tcx> Promoter<'a, 'tcx> {
816816
mut func, mut args, call_source: desugar, fn_span, ..
817817
} => {
818818
// This promoted involves a function call, so it may fail to evaluate.
819-
// Let's make sure it is added to `required_consts` so that that failure cannot get lost.
819+
// Let's make sure it is added to `required_consts` so that failure cannot get lost.
820820
self.add_to_required = true;
821821

822822
self.visit_operand(&mut func, loc);

compiler/rustc_passes/src/dead.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ fn ty_ref_to_pub_struct(tcx: TyCtxt<'_>, ty: &hir::Ty<'_>) -> Publicness {
102102
Publicness::new(true, true)
103103
}
104104

105-
/// Determine if a work from the worklist is coming from the a `#[allow]`
105+
/// Determine if a work from the worklist is coming from a `#[allow]`
106106
/// or a `#[expect]` of `dead_code`
107107
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
108108
enum ComesFromAllowExpect {

0 commit comments

Comments
 (0)