From d1982bd0af0ac3e9bc0b1e3bf596a1a5c84e60af Mon Sep 17 00:00:00 2001 From: Rageking8 Date: Thu, 13 Oct 2022 00:12:19 +0800 Subject: [PATCH] fix small word dupe typos --- compiler/rustc_error_codes/src/error_codes/E0591.md | 4 ++-- compiler/rustc_infer/src/infer/mod.rs | 2 +- library/std/src/io/error/tests.rs | 2 +- library/std/src/sys/unix/kernel_copy.rs | 2 +- src/test/ui/async-await/issue-64130-1-sync.rs | 2 +- src/test/ui/async-await/issue-64130-2-send.rs | 2 +- src/test/ui/async-await/issue-64130-3-other.rs | 2 +- src/test/ui/const-generics/occurs-check/unused-substs-2.rs | 2 +- src/test/ui/const-generics/occurs-check/unused-substs-3.rs | 2 +- src/test/ui/deprecation/deprecation-lint.rs | 2 +- src/test/ui/explain.stdout | 4 ++-- src/test/ui/issues/issue-29746.rs | 2 +- src/test/ui/issues/issue-75907.rs | 2 +- src/test/ui/issues/issue-75907_b.rs | 2 +- src/test/ui/lint/lint-stability-deprecated.rs | 2 +- src/test/ui/proc-macro/meta-macro-hygiene.rs | 4 ++-- src/test/ui/proc-macro/meta-macro-hygiene.stdout | 4 ++-- 17 files changed, 21 insertions(+), 21 deletions(-) diff --git a/compiler/rustc_error_codes/src/error_codes/E0591.md b/compiler/rustc_error_codes/src/error_codes/E0591.md index f49805d9b4e15..6ed8370e8c1c7 100644 --- a/compiler/rustc_error_codes/src/error_codes/E0591.md +++ b/compiler/rustc_error_codes/src/error_codes/E0591.md @@ -53,8 +53,8 @@ unsafe { ``` Here, transmute is being used to convert the types of the fn arguments. -This pattern is incorrect because, because the type of `foo` is a function -**item** (`typeof(foo)`), which is zero-sized, and the target type (`fn()`) +This pattern is incorrect because the type of `foo` is a function **item** +(`typeof(foo)`), which is zero-sized, and the target type (`fn()`) is a function pointer, which is not zero-sized. This pattern should be rewritten. There are a few possible ways to do this: diff --git a/compiler/rustc_infer/src/infer/mod.rs b/compiler/rustc_infer/src/infer/mod.rs index 441dc3c7e888c..5a5e9db81a243 100644 --- a/compiler/rustc_infer/src/infer/mod.rs +++ b/compiler/rustc_infer/src/infer/mod.rs @@ -1283,7 +1283,7 @@ impl<'tcx> InferCtxt<'tcx> { assert!(old_value.is_none()); } - /// Process the region constraints and return any any errors that + /// Process the region constraints and return any errors that /// result. After this, no more unification operations should be /// done -- or the compiler will panic -- but it is legal to use /// `resolve_vars_if_possible` as well as `fully_resolve`. diff --git a/library/std/src/io/error/tests.rs b/library/std/src/io/error/tests.rs index c897a5e8701c4..16c634e9afd50 100644 --- a/library/std/src/io/error/tests.rs +++ b/library/std/src/io/error/tests.rs @@ -86,7 +86,7 @@ fn test_errorkind_packing() { assert_eq!(Error::from(ErrorKind::NotFound).kind(), ErrorKind::NotFound); assert_eq!(Error::from(ErrorKind::PermissionDenied).kind(), ErrorKind::PermissionDenied); assert_eq!(Error::from(ErrorKind::Uncategorized).kind(), ErrorKind::Uncategorized); - // Check that the innards look like like what we want. + // Check that the innards look like what we want. assert_matches!( Error::from(ErrorKind::OutOfMemory).repr.data(), ErrorData::Simple(ErrorKind::OutOfMemory), diff --git a/library/std/src/sys/unix/kernel_copy.rs b/library/std/src/sys/unix/kernel_copy.rs index 8f7abb55e2376..94546ca09d00d 100644 --- a/library/std/src/sys/unix/kernel_copy.rs +++ b/library/std/src/sys/unix/kernel_copy.rs @@ -20,7 +20,7 @@ //! Since those syscalls have requirements that cannot be fully checked in advance and //! gathering additional information about file descriptors would require additional syscalls //! anyway it simply attempts to use them one after another (guided by inaccurate hints) to -//! figure out which one works and and falls back to the generic read-write copy loop if none of them +//! figure out which one works and falls back to the generic read-write copy loop if none of them //! does. //! Once a working syscall is found for a pair of file descriptors it will be called in a loop //! until the copy operation is completed. diff --git a/src/test/ui/async-await/issue-64130-1-sync.rs b/src/test/ui/async-await/issue-64130-1-sync.rs index af83f14bbda5d..1714cec5221de 100644 --- a/src/test/ui/async-await/issue-64130-1-sync.rs +++ b/src/test/ui/async-await/issue-64130-1-sync.rs @@ -1,7 +1,7 @@ #![feature(negative_impls)] // edition:2018 -// This tests the the specialized async-await-specific error when futures don't implement an +// This tests the specialized async-await-specific error when futures don't implement an // auto trait (which is specifically Sync) due to some type that was captured. struct Foo; diff --git a/src/test/ui/async-await/issue-64130-2-send.rs b/src/test/ui/async-await/issue-64130-2-send.rs index 2362831d8b8f6..7a6e5952cb956 100644 --- a/src/test/ui/async-await/issue-64130-2-send.rs +++ b/src/test/ui/async-await/issue-64130-2-send.rs @@ -1,7 +1,7 @@ #![feature(negative_impls)] // edition:2018 -// This tests the the specialized async-await-specific error when futures don't implement an +// This tests the specialized async-await-specific error when futures don't implement an // auto trait (which is specifically Send) due to some type that was captured. struct Foo; diff --git a/src/test/ui/async-await/issue-64130-3-other.rs b/src/test/ui/async-await/issue-64130-3-other.rs index 52801c35ba3d3..630fb2c41cded 100644 --- a/src/test/ui/async-await/issue-64130-3-other.rs +++ b/src/test/ui/async-await/issue-64130-3-other.rs @@ -2,7 +2,7 @@ #![feature(negative_impls)] // edition:2018 -// This tests the the unspecialized async-await-specific error when futures don't implement an +// This tests the unspecialized async-await-specific error when futures don't implement an // auto trait (which is not Send or Sync) due to some type that was captured. auto trait Qux {} diff --git a/src/test/ui/const-generics/occurs-check/unused-substs-2.rs b/src/test/ui/const-generics/occurs-check/unused-substs-2.rs index 9a73f1a53e52f..9b1212694f5ba 100644 --- a/src/test/ui/const-generics/occurs-check/unused-substs-2.rs +++ b/src/test/ui/const-generics/occurs-check/unused-substs-2.rs @@ -1,7 +1,7 @@ #![feature(generic_const_exprs)] #![allow(incomplete_features)] -// The goal is is to get an unevaluated const `ct` with a `Ty::Infer(TyVar(_#1t)` subst. +// The goal is to get an unevaluated const `ct` with a `Ty::Infer(TyVar(_#1t)` subst. // // If we are then able to infer `ty::Infer(TyVar(_#1t) := Ty` we introduced an // artificial inference cycle. diff --git a/src/test/ui/const-generics/occurs-check/unused-substs-3.rs b/src/test/ui/const-generics/occurs-check/unused-substs-3.rs index 0d38bd3935194..d5aeab47e62b0 100644 --- a/src/test/ui/const-generics/occurs-check/unused-substs-3.rs +++ b/src/test/ui/const-generics/occurs-check/unused-substs-3.rs @@ -1,7 +1,7 @@ #![feature(generic_const_exprs)] #![allow(incomplete_features)] -// The goal is is to get an unevaluated const `ct` with a `Ty::Infer(TyVar(_#1t)` subst. +// The goal is to get an unevaluated const `ct` with a `Ty::Infer(TyVar(_#1t)` subst. // // If we are then able to infer `ty::Infer(TyVar(_#1t) := Ty` we introduced an // artificial inference cycle. diff --git a/src/test/ui/deprecation/deprecation-lint.rs b/src/test/ui/deprecation/deprecation-lint.rs index 65cc4e2ef1e41..0417e952eb71d 100644 --- a/src/test/ui/deprecation/deprecation-lint.rs +++ b/src/test/ui/deprecation/deprecation-lint.rs @@ -51,7 +51,7 @@ mod cross_crate { let _ = nested::DeprecatedTupleStruct (1); //~ ERROR use of deprecated tuple struct `deprecation_lint::nested::DeprecatedTupleStruct`: text - // At the moment, the lint checker only checks stability in + // At the moment, the lint checker only checks stability // in the arguments of macros. // Eventually, we will want to lint the contents of the // macro in the module *defining* it. Also, stability levels diff --git a/src/test/ui/explain.stdout b/src/test/ui/explain.stdout index 62f1a7f98ea16..ef1d866c3ff3b 100644 --- a/src/test/ui/explain.stdout +++ b/src/test/ui/explain.stdout @@ -47,8 +47,8 @@ unsafe { ``` Here, transmute is being used to convert the types of the fn arguments. -This pattern is incorrect because, because the type of `foo` is a function -**item** (`typeof(foo)`), which is zero-sized, and the target type (`fn()`) +This pattern is incorrect because the type of `foo` is a function **item** +(`typeof(foo)`), which is zero-sized, and the target type (`fn()`) is a function pointer, which is not zero-sized. This pattern should be rewritten. There are a few possible ways to do this: diff --git a/src/test/ui/issues/issue-29746.rs b/src/test/ui/issues/issue-29746.rs index 428cc637f5567..3470a7e09ad8b 100644 --- a/src/test/ui/issues/issue-29746.rs +++ b/src/test/ui/issues/issue-29746.rs @@ -7,7 +7,7 @@ macro_rules! zip { zip!([$($rest),*], $a.zip($b), (x,y), [x,y]) }; - // Intermediate steps to build the zipped expression, the match pattern, and + // Intermediate steps to build the zipped expression, the match pattern // and the output tuple of the closure, using macro hygiene to repeatedly // introduce new variables named 'x'. ([$a:expr, $($rest:expr),*], $zip:expr, $pat:pat, [$($flat:expr),*]) => { diff --git a/src/test/ui/issues/issue-75907.rs b/src/test/ui/issues/issue-75907.rs index 1534b6d07deb0..6da99cf6435cf 100644 --- a/src/test/ui/issues/issue-75907.rs +++ b/src/test/ui/issues/issue-75907.rs @@ -1,4 +1,4 @@ -// Test for for diagnostic improvement issue #75907 +// Test for diagnostic improvement issue #75907 mod foo { pub(crate) struct Foo(u8); diff --git a/src/test/ui/issues/issue-75907_b.rs b/src/test/ui/issues/issue-75907_b.rs index e30747782339c..fdfc5907c1674 100644 --- a/src/test/ui/issues/issue-75907_b.rs +++ b/src/test/ui/issues/issue-75907_b.rs @@ -1,4 +1,4 @@ -// Test for for diagnostic improvement issue #75907, extern crate +// Test for diagnostic improvement issue #75907, extern crate // aux-build:issue-75907.rs extern crate issue_75907 as a; diff --git a/src/test/ui/lint/lint-stability-deprecated.rs b/src/test/ui/lint/lint-stability-deprecated.rs index bdc66e83083f6..74c35083e60b5 100644 --- a/src/test/ui/lint/lint-stability-deprecated.rs +++ b/src/test/ui/lint/lint-stability-deprecated.rs @@ -130,7 +130,7 @@ mod cross_crate { let _ = UnstableTupleStruct (1); let _ = StableTupleStruct (1); - // At the moment, the lint checker only checks stability in + // At the moment, the lint checker only checks stability // in the arguments of macros. // Eventually, we will want to lint the contents of the // macro in the module *defining* it. Also, stability levels diff --git a/src/test/ui/proc-macro/meta-macro-hygiene.rs b/src/test/ui/proc-macro/meta-macro-hygiene.rs index 62968ea54e0aa..70b8d8da19b32 100644 --- a/src/test/ui/proc-macro/meta-macro-hygiene.rs +++ b/src/test/ui/proc-macro/meta-macro-hygiene.rs @@ -19,8 +19,8 @@ macro_rules! produce_it { // `print_def_site!` will respan the `$crate` identifier // with `Span::def_site()`. This should cause it to resolve // relative to `meta_macro`, *not* `make_macro` (despite - // the fact that that `print_def_site` is produced by - // a `macro_rules!` macro in `make_macro`). + // the fact that `print_def_site` is produced by a + // `macro_rules!` macro in `make_macro`). meta_macro::print_def_site!($crate::dummy!()); } } diff --git a/src/test/ui/proc-macro/meta-macro-hygiene.stdout b/src/test/ui/proc-macro/meta-macro-hygiene.stdout index 2494af1208f14..6b7b0c819cca6 100644 --- a/src/test/ui/proc-macro/meta-macro-hygiene.stdout +++ b/src/test/ui/proc-macro/meta-macro-hygiene.stdout @@ -35,8 +35,8 @@ macro_rules! produce_it // `print_def_site!` will respan the `$crate` identifier // with `Span::def_site()`. This should cause it to resolve // relative to `meta_macro`, *not* `make_macro` (despite - // the fact that that `print_def_site` is produced by - // a `macro_rules!` macro in `make_macro`). + // the fact that `print_def_site` is produced by a + // `macro_rules!` macro in `make_macro`). } }