Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix small word dupe typos #102974

Merged
merged 1 commit into from
Oct 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions compiler/rustc_error_codes/src/error_codes/E0591.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_infer/src/infer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down
2 changes: 1 addition & 1 deletion library/std/src/io/error/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion library/std/src/sys/unix/kernel_copy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/async-await/issue-64130-1-sync.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/async-await/issue-64130-2-send.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/async-await/issue-64130-3-other.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {}
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/const-generics/occurs-check/unused-substs-2.rs
Original file line number Diff line number Diff line change
@@ -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<ct>` we introduced an
// artificial inference cycle.
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/const-generics/occurs-check/unused-substs-3.rs
Original file line number Diff line number Diff line change
@@ -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<ct>` we introduced an
// artificial inference cycle.
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/deprecation/deprecation-lint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/test/ui/explain.stdout
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/issues/issue-29746.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),*]) => {
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/issues/issue-75907.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Test for for diagnostic improvement issue #75907
// Test for diagnostic improvement issue #75907

mod foo {
pub(crate) struct Foo(u8);
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/issues/issue-75907_b.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/lint/lint-stability-deprecated.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/test/ui/proc-macro/meta-macro-hygiene.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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!());
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/test/ui/proc-macro/meta-macro-hygiene.stdout
Original file line number Diff line number Diff line change
Expand Up @@ -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`).
}
}

Expand Down