Skip to content

Commit 49780e9

Browse files
authored
Rollup merge of #103018 - Rageking8:more-dupe-word-typos, r=TaKO8Ki
More dupe word typos I only picked those changes (from the regex search) that I am pretty certain doesn't change meaning and is just a typo fix. Do correct me if any fix is undesirable and I can revert those. Thanks.
2 parents 24a8086 + 7122aba commit 49780e9

File tree

47 files changed

+68
-72
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+68
-72
lines changed

compiler/rustc_borrowck/src/universal_regions.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ impl<'cx, 'tcx> UniversalRegionsBuilder<'cx, 'tcx> {
414414

415415
let typeck_root_def_id = self.infcx.tcx.typeck_root_def_id(self.mir_def.did.to_def_id());
416416

417-
// If this is is a 'root' body (not a closure/generator/inline const), then
417+
// If this is a 'root' body (not a closure/generator/inline const), then
418418
// there are no extern regions, so the local regions start at the same
419419
// position as the (empty) sub-list of extern regions
420420
let first_local_index = if self.mir_def.did.to_def_id() == typeck_root_def_id {

compiler/rustc_codegen_cranelift/build_system/rustc_info.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ pub(crate) fn get_file_name(crate_name: &str, crate_type: &str) -> String {
6565
}
6666

6767
/// Similar to `get_file_name`, but converts any dashes (`-`) in the `crate_name` to
68-
/// underscores (`_`). This is specially made for the the rustc and cargo wrappers
68+
/// underscores (`_`). This is specially made for the rustc and cargo wrappers
6969
/// which have a dash in the name, and that is not allowed in a crate name.
7070
pub(crate) fn get_wrapper_file_name(crate_name: &str, crate_type: &str) -> String {
7171
let crate_name = crate_name.replace('-', "_");

compiler/rustc_codegen_cranelift/src/abi/pass_mode.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ pub(super) fn from_casted_value<'tcx>(
193193
kind: StackSlotKind::ExplicitSlot,
194194
// FIXME Don't force the size to a multiple of 16 bytes once Cranelift gets a way to
195195
// specify stack slot alignment.
196-
// Stack slot size may be bigger for for example `[u8; 3]` which is packed into an `i32`.
196+
// Stack slot size may be bigger for example `[u8; 3]` which is packed into an `i32`.
197197
// It may also be smaller for example when the type is a wrapper around an integer with a
198198
// larger alignment than the integer.
199199
size: (std::cmp::max(abi_param_size, layout_size) + 15) / 16 * 16,

compiler/rustc_codegen_llvm/src/coverageinfo/mapgen.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ impl CoverageMapGenerator {
129129
// LLVM Coverage Mapping Format version 6 (zero-based encoded as 5)
130130
// requires setting the first filename to the compilation directory.
131131
// Since rustc generates coverage maps with relative paths, the
132-
// compilation directory can be combined with the the relative paths
132+
// compilation directory can be combined with the relative paths
133133
// to get absolute paths, if needed.
134134
let working_dir = tcx
135135
.sess

compiler/rustc_const_eval/src/const_eval/error.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ pub struct ConstEvalErr<'tcx> {
6464
impl<'tcx> ConstEvalErr<'tcx> {
6565
/// Turn an interpreter error into something to report to the user.
6666
/// As a side-effect, if RUSTC_CTFE_BACKTRACE is set, this prints the backtrace.
67-
/// Should be called only if the error is actually going to to be reported!
67+
/// Should be called only if the error is actually going to be reported!
6868
pub fn new<'mir, M: Machine<'mir, 'tcx>>(
6969
ecx: &InterpCx<'mir, 'tcx, M>,
7070
error: InterpErrorInfo<'tcx>,

compiler/rustc_const_eval/src/interpret/memory.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -794,7 +794,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
794794
todo.extend(static_roots);
795795
while let Some(id) = todo.pop() {
796796
if reachable.insert(id) {
797-
// This is a new allocation, add the allocation it points to to `todo`.
797+
// This is a new allocation, add the allocation it points to `todo`.
798798
if let Some((_, alloc)) = self.memory.alloc_map.get(id) {
799799
todo.extend(
800800
alloc.provenance().values().filter_map(|prov| prov.get_alloc_id()),

compiler/rustc_data_structures/src/graph/vec_graph/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ impl<N: Idx + Ord> VecGraph<N> {
2929
// Store the *target* of each edge into `edge_targets`.
3030
let edge_targets: Vec<N> = edge_pairs.iter().map(|&(_, target)| target).collect();
3131

32-
// Create the *edge starts* array. We are iterating over over
33-
// the (sorted) edge pairs. We maintain the invariant that the
32+
// Create the *edge starts* array. We are iterating over the
33+
// (sorted) edge pairs. We maintain the invariant that the
3434
// length of the `node_starts` array is enough to store the
3535
// current source node -- so when we see that the source node
3636
// for an edge is greater than the current length, we grow the

compiler/rustc_expand/src/expand.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ impl InvocationKind {
327327
fn placeholder_visibility(&self) -> Option<ast::Visibility> {
328328
// HACK: For unnamed fields placeholders should have the same visibility as the actual
329329
// fields because for tuple structs/variants resolve determines visibilities of their
330-
// constructor using these field visibilities before attributes on them are are expanded.
330+
// constructor using these field visibilities before attributes on them are expanded.
331331
// The assumption is that the attribute expansion cannot change field visibilities,
332332
// and it holds because only inert attributes are supported in this position.
333333
match self {

compiler/rustc_hir_analysis/src/check/fallback.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ impl<'tcx> FnCtxt<'_, 'tcx> {
7272
//
7373
// - Unconstrained ints are replaced with `i32`.
7474
//
75-
// - Unconstrained floats are replaced with with `f64`.
75+
// - Unconstrained floats are replaced with `f64`.
7676
//
7777
// - Non-numerics may get replaced with `()` or `!`, depending on
7878
// how they were categorized by `calculate_diverging_fallback`

compiler/rustc_hir_analysis/src/check/generator_interior/drop_ranges/cfg_build.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ impl<'a, 'tcx> DropRangeVisitor<'a, 'tcx> {
210210
}
211211

212212
/// For an expression with an uninhabited return type (e.g. a function that returns !),
213-
/// this adds a self edge to to the CFG to model the fact that the function does not
213+
/// this adds a self edge to the CFG to model the fact that the function does not
214214
/// return.
215215
fn handle_uninhabited_return(&mut self, expr: &Expr<'tcx>) {
216216
let ty = self.typeck_results.expr_ty(expr);

compiler/rustc_hir_analysis/src/check/upvar.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
352352
/// and that the path can be captured with required capture kind (depending on use in closure,
353353
/// move closure etc.)
354354
///
355-
/// Returns the set of of adjusted information along with the inferred closure kind and span
355+
/// Returns the set of adjusted information along with the inferred closure kind and span
356356
/// associated with the closure kind inference.
357357
///
358358
/// Note that we *always* infer a minimal kind, even if

compiler/rustc_infer/src/infer/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1150,8 +1150,8 @@ impl<'tcx> InferCtxt<'tcx> {
11501150
/// Return the universe that the region `r` was created in. For
11511151
/// most regions (e.g., `'static`, named regions from the user,
11521152
/// etc) this is the root universe U0. For inference variables or
1153-
/// placeholders, however, it will return the universe which which
1154-
/// they are associated.
1153+
/// placeholders, however, it will return the universe which they
1154+
/// are associated.
11551155
pub fn universe_of_region(&self, r: ty::Region<'tcx>) -> ty::UniverseIndex {
11561156
self.inner.borrow_mut().unwrap_region_constraints().universe(r)
11571157
}

compiler/rustc_lint/src/builtin.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3310,7 +3310,7 @@ declare_lint! {
33103310
/// explicitly.
33113311
///
33123312
/// To access a library from a binary target within the same crate,
3313-
/// use `your_crate_name::` as the path path instead of `lib::`:
3313+
/// use `your_crate_name::` as the path instead of `lib::`:
33143314
///
33153315
/// ```rust,compile_fail
33163316
/// // bar/src/lib.rs

compiler/rustc_lint_defs/src/builtin.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3937,7 +3937,7 @@ declare_lint! {
39373937
///
39383938
/// The compiler disables the automatic implementation if an explicit one
39393939
/// exists for given type constructor. The exact rules governing this
3940-
/// are currently unsound and quite subtle and and will be modified in the future.
3940+
/// are currently unsound, quite subtle, and will be modified in the future.
39413941
/// This change will cause the automatic implementation to be disabled in more
39423942
/// cases, potentially breaking some code.
39433943
pub SUSPICIOUS_AUTO_TRAIT_IMPLS,

compiler/rustc_middle/src/mir/interpret/pointer.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ pub trait PointerArithmetic: HasDataLayout {
4343
let val = val as i64;
4444
// Now wrap-around into the machine_isize range.
4545
if val > self.machine_isize_max() {
46-
// This can only happen the the ptr size is < 64, so we know max_usize_plus_1 fits into
46+
// This can only happen if the ptr size is < 64, so we know max_usize_plus_1 fits into
4747
// i64.
4848
debug_assert!(self.pointer_size().bits() < 64);
4949
let max_usize_plus_1 = 1u128 << self.pointer_size().bits();

compiler/rustc_middle/src/ty/fold.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@
1313
//!
1414
//! There are three groups of traits involved in each traversal.
1515
//! - `TypeFoldable`. This is implemented once for many types, including:
16-
//! - Types of interest, for which the the methods delegate to the
17-
//! folder.
16+
//! - Types of interest, for which the methods delegate to the folder.
1817
//! - All other types, including generic containers like `Vec` and `Option`.
1918
//! It defines a "skeleton" of how they should be folded.
2019
//! - `TypeSuperFoldable`. This is implemented only for each type of interest,

compiler/rustc_middle/src/ty/util.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -958,7 +958,7 @@ impl<'tcx> Ty<'tcx> {
958958
}
959959
}
960960

961-
/// Checks if `ty` has has a significant drop.
961+
/// Checks if `ty` has a significant drop.
962962
///
963963
/// Note that this method can return false even if `ty` has a destructor
964964
/// attached; even if that is the case then the adt has been marked with

compiler/rustc_middle/src/ty/visit.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010
//!
1111
//! There are three groups of traits involved in each traversal.
1212
//! - `TypeVisitable`. This is implemented once for many types, including:
13-
//! - Types of interest, for which the the methods delegate to the
14-
//! visitor.
13+
//! - Types of interest, for which the methods delegate to the visitor.
1514
//! - All other types, including generic containers like `Vec` and `Option`.
1615
//! It defines a "skeleton" of how they should be visited.
1716
//! - `TypeSuperVisitable`. This is implemented only for each type of interest,

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -885,7 +885,7 @@ fn is_useful<'p, 'tcx>(
885885
// that has the potential to trigger the `non_exhaustive_omitted_patterns` lint.
886886
// To understand the workings checkout `Constructor::split` and `SplitWildcard::new/into_ctors`
887887
if is_non_exhaustive_and_wild
888-
// We check that the match has a wildcard pattern and that that wildcard is useful,
888+
// We check that the match has a wildcard pattern and that wildcard is useful,
889889
// meaning there are variants that are covered by the wildcard. Without the check
890890
// for `witness_preference` the lint would trigger on `if let NonExhaustiveEnum::A = foo {}`
891891
&& usefulness.is_useful() && matches!(witness_preference, RealArm)

compiler/rustc_parse/src/parser/diagnostics.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2232,7 +2232,7 @@ impl<'a> Parser<'a> {
22322232
///
22332233
/// When encountering code like `foo::< bar + 3 >` or `foo::< bar - baz >` we suggest
22342234
/// `foo::<{ bar + 3 }>` and `foo::<{ bar - baz }>`, respectively. We only provide a suggestion
2235-
/// if we think that that the resulting expression would be well formed.
2235+
/// if we think that the resulting expression would be well formed.
22362236
pub fn recover_const_arg(
22372237
&mut self,
22382238
start: Span,

0 commit comments

Comments
 (0)