1
Fork 0

Rollup merge of #102974 - Rageking8:fix-small-word-dupe-typos, r=JohnTitor

Fix small word dupe typos
This commit is contained in:
Yuki Okushi 2022-10-13 09:41:27 +09:00 committed by GitHub
commit 0ace46f98c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 21 additions and 21 deletions

View file

@ -53,8 +53,8 @@ unsafe {
``` ```
Here, transmute is being used to convert the types of the fn arguments. 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 This pattern is incorrect because the type of `foo` is a function **item**
**item** (`typeof(foo)`), which is zero-sized, and the target type (`fn()`) (`typeof(foo)`), which is zero-sized, and the target type (`fn()`)
is a function pointer, which is not zero-sized. is a function pointer, which is not zero-sized.
This pattern should be rewritten. There are a few possible ways to do this: This pattern should be rewritten. There are a few possible ways to do this:

View file

@ -1283,7 +1283,7 @@ impl<'tcx> InferCtxt<'tcx> {
assert!(old_value.is_none()); 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 /// result. After this, no more unification operations should be
/// done -- or the compiler will panic -- but it is legal to use /// done -- or the compiler will panic -- but it is legal to use
/// `resolve_vars_if_possible` as well as `fully_resolve`. /// `resolve_vars_if_possible` as well as `fully_resolve`.

View file

@ -86,7 +86,7 @@ fn test_errorkind_packing() {
assert_eq!(Error::from(ErrorKind::NotFound).kind(), ErrorKind::NotFound); assert_eq!(Error::from(ErrorKind::NotFound).kind(), ErrorKind::NotFound);
assert_eq!(Error::from(ErrorKind::PermissionDenied).kind(), ErrorKind::PermissionDenied); assert_eq!(Error::from(ErrorKind::PermissionDenied).kind(), ErrorKind::PermissionDenied);
assert_eq!(Error::from(ErrorKind::Uncategorized).kind(), ErrorKind::Uncategorized); 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!( assert_matches!(
Error::from(ErrorKind::OutOfMemory).repr.data(), Error::from(ErrorKind::OutOfMemory).repr.data(),
ErrorData::Simple(ErrorKind::OutOfMemory), ErrorData::Simple(ErrorKind::OutOfMemory),

View file

@ -20,7 +20,7 @@
//! Since those syscalls have requirements that cannot be fully checked in advance and //! Since those syscalls have requirements that cannot be fully checked in advance and
//! gathering additional information about file descriptors would require additional syscalls //! 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 //! 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. //! does.
//! Once a working syscall is found for a pair of file descriptors it will be called in a loop //! 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. //! until the copy operation is completed.

View file

@ -1,7 +1,7 @@
#![feature(negative_impls)] #![feature(negative_impls)]
// edition:2018 // 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. // auto trait (which is specifically Sync) due to some type that was captured.
struct Foo; struct Foo;

View file

@ -1,7 +1,7 @@
#![feature(negative_impls)] #![feature(negative_impls)]
// edition:2018 // 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. // auto trait (which is specifically Send) due to some type that was captured.
struct Foo; struct Foo;

View file

@ -2,7 +2,7 @@
#![feature(negative_impls)] #![feature(negative_impls)]
// edition:2018 // 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 (which is not Send or Sync) due to some type that was captured.
auto trait Qux {} auto trait Qux {}

View file

@ -1,7 +1,7 @@
#![feature(generic_const_exprs)] #![feature(generic_const_exprs)]
#![allow(incomplete_features)] #![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 // If we are then able to infer `ty::Infer(TyVar(_#1t) := Ty<ct>` we introduced an
// artificial inference cycle. // artificial inference cycle.

View file

@ -1,7 +1,7 @@
#![feature(generic_const_exprs)] #![feature(generic_const_exprs)]
#![allow(incomplete_features)] #![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 // If we are then able to infer `ty::Infer(TyVar(_#1t) := Ty<ct>` we introduced an
// artificial inference cycle. // artificial inference cycle.

View file

@ -51,7 +51,7 @@ mod cross_crate {
let _ = nested::DeprecatedTupleStruct (1); //~ ERROR use of deprecated tuple struct `deprecation_lint::nested::DeprecatedTupleStruct`: text 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. // in the arguments of macros.
// Eventually, we will want to lint the contents of the // Eventually, we will want to lint the contents of the
// macro in the module *defining* it. Also, stability levels // macro in the module *defining* it. Also, stability levels

View file

@ -47,8 +47,8 @@ unsafe {
``` ```
Here, transmute is being used to convert the types of the fn arguments. 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 This pattern is incorrect because the type of `foo` is a function **item**
**item** (`typeof(foo)`), which is zero-sized, and the target type (`fn()`) (`typeof(foo)`), which is zero-sized, and the target type (`fn()`)
is a function pointer, which is not zero-sized. is a function pointer, which is not zero-sized.
This pattern should be rewritten. There are a few possible ways to do this: This pattern should be rewritten. There are a few possible ways to do this:

View file

@ -7,7 +7,7 @@ macro_rules! zip {
zip!([$($rest),*], $a.zip($b), (x,y), [x,y]) 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 // and the output tuple of the closure, using macro hygiene to repeatedly
// introduce new variables named 'x'. // introduce new variables named 'x'.
([$a:expr, $($rest:expr),*], $zip:expr, $pat:pat, [$($flat:expr),*]) => { ([$a:expr, $($rest:expr),*], $zip:expr, $pat:pat, [$($flat:expr),*]) => {

View file

@ -1,4 +1,4 @@
// Test for for diagnostic improvement issue #75907 // Test for diagnostic improvement issue #75907
mod foo { mod foo {
pub(crate) struct Foo(u8); pub(crate) struct Foo(u8);

View file

@ -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 // aux-build:issue-75907.rs
extern crate issue_75907 as a; extern crate issue_75907 as a;

View file

@ -130,7 +130,7 @@ mod cross_crate {
let _ = UnstableTupleStruct (1); let _ = UnstableTupleStruct (1);
let _ = StableTupleStruct (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. // in the arguments of macros.
// Eventually, we will want to lint the contents of the // Eventually, we will want to lint the contents of the
// macro in the module *defining* it. Also, stability levels // macro in the module *defining* it. Also, stability levels

View file

@ -19,8 +19,8 @@ macro_rules! produce_it {
// `print_def_site!` will respan the `$crate` identifier // `print_def_site!` will respan the `$crate` identifier
// with `Span::def_site()`. This should cause it to resolve // with `Span::def_site()`. This should cause it to resolve
// relative to `meta_macro`, *not* `make_macro` (despite // relative to `meta_macro`, *not* `make_macro` (despite
// the fact that that `print_def_site` is produced by // the fact that `print_def_site` is produced by a
// a `macro_rules!` macro in `make_macro`). // `macro_rules!` macro in `make_macro`).
meta_macro::print_def_site!($crate::dummy!()); meta_macro::print_def_site!($crate::dummy!());
} }
} }

View file

@ -35,8 +35,8 @@ macro_rules! produce_it
// `print_def_site!` will respan the `$crate` identifier // `print_def_site!` will respan the `$crate` identifier
// with `Span::def_site()`. This should cause it to resolve // with `Span::def_site()`. This should cause it to resolve
// relative to `meta_macro`, *not* `make_macro` (despite // relative to `meta_macro`, *not* `make_macro` (despite
// the fact that that `print_def_site` is produced by // the fact that `print_def_site` is produced by a
// a `macro_rules!` macro in `make_macro`). // `macro_rules!` macro in `make_macro`).
} }
} }