mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
Rollup merge of #102974 - Rageking8:fix-small-word-dupe-typos, r=JohnTitor
Fix small word dupe typos
This commit is contained in:
commit
0ace46f98c
@ -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:
|
||||
|
||||
|
@ -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`.
|
||||
|
@ -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),
|
||||
|
@ -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.
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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 {}
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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
|
||||
|
@ -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:
|
||||
|
||||
|
@ -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),*]) => {
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Test for for diagnostic improvement issue #75907
|
||||
// Test for diagnostic improvement issue #75907
|
||||
|
||||
mod foo {
|
||||
pub(crate) struct Foo(u8);
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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!());
|
||||
}
|
||||
}
|
||||
|
@ -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`).
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user