Fix more “a”/“an” typos

This commit is contained in:
Frank Steffahn 2021-08-22 16:20:58 +02:00
parent bf88b113ea
commit be9d2699ca
15 changed files with 17 additions and 17 deletions

View File

@ -558,7 +558,7 @@ impl BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
fn range_metadata(&mut self, load: &'ll Value, range: Range<u128>) {
if self.sess().target.arch == "amdgpu" {
// amdgpu/LLVM does something weird and thinks a i64 value is
// amdgpu/LLVM does something weird and thinks an i64 value is
// split into a v2i32, halving the bitwidth LLVM expects,
// tripping an assertion. So, for now, just disable this
// optimization.

View File

@ -139,7 +139,7 @@ impl IntrinsicCallMethods<'tcx> for Builder<'a, 'll, 'tcx> {
if self.cx().size_of(ret_ty).bytes() < 4 {
// `va_arg` should not be called on an integer type
// less than 4 bytes in length. If it is, promote
// the integer to a `i32` and truncate the result
// the integer to an `i32` and truncate the result
// back to the smaller type.
let promoted_result = emit_va_arg(self, args[0], tcx.types.i32);
self.trunc(promoted_result, llret_ty)

View File

@ -1148,7 +1148,7 @@ pub type StringRef = OwningRef<String, str>;
/// Typedef of an owning reference that uses a `Rc` as the owner.
pub type RcRef<T, U = T> = OwningRef<Rc<T>, U>;
/// Typedef of an owning reference that uses a `Arc` as the owner.
/// Typedef of an owning reference that uses an `Arc` as the owner.
pub type ArcRef<T, U = T> = OwningRef<Arc<T>, U>;
/// Typedef of an owning reference that uses a `Ref` as the owner.

View File

@ -1889,7 +1889,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
ProjectionElem::Downcast(_/*adt_def*/, _/*variant_idx*/) =>
// assigning to (P->variant) is okay if assigning to `P` is okay
//
// FIXME: is this true even if P is a adt with a dtor?
// FIXME: is this true even if P is an adt with a dtor?
{ }
// assigning to (*P) requires P to be initialized

View File

@ -1826,7 +1826,7 @@ impl<'tcx> LifetimeContext<'_, 'tcx> {
err.emit();
}
// FIXME(const_generics): This patches over a ICE caused by non-'static lifetimes in const
// FIXME(const_generics): This patches over an ICE caused by non-'static lifetimes in const
// generics. We are disallowing this until we can decide on how we want to handle non-'static
// lifetimes in const generics. See issue #74052 for discussion.
crate fn emit_non_static_lt_in_const_generic_error(&self, lifetime_ref: &hir::Lifetime) {

View File

@ -1202,7 +1202,7 @@ impl Json {
matches!(*self, Json::I64(_) | Json::U64(_) | Json::F64(_))
}
/// Returns `true` if the Json value is a `i64`.
/// Returns `true` if the Json value is an `i64`.
pub fn is_i64(&self) -> bool {
matches!(*self, Json::I64(_))
}
@ -1217,7 +1217,7 @@ impl Json {
matches!(*self, Json::F64(_))
}
/// If the Json value is a number, returns or cast it to a `i64`;
/// If the Json value is a number, returns or cast it to an `i64`;
/// returns `None` otherwise.
pub fn as_i64(&self) -> Option<i64> {
match *self {

View File

@ -45,7 +45,7 @@ impl<T, const N: usize> IntoIter<T, N> {
/// use std::array;
///
/// for value in array::IntoIter::new([1, 2, 3, 4, 5]) {
/// // The type of `value` is a `i32` here, instead of `&i32`
/// // The type of `value` is an `i32` here, instead of `&i32`
/// let _: i32 = value;
/// }
/// ```

View File

@ -939,7 +939,7 @@ impl<'a> From<&'a CString> for Cow<'a, CStr> {
#[stable(feature = "shared_from_slice2", since = "1.24.0")]
impl From<CString> for Arc<CStr> {
/// Converts a [`CString`] into a [`Arc`]`<CStr>` without copying or allocating.
/// Converts a [`CString`] into an [`Arc`]`<CStr>` without copying or allocating.
#[inline]
fn from(s: CString) -> Arc<CStr> {
let arc: Arc<[u8]> = Arc::from(s.into_inner());

View File

@ -897,7 +897,7 @@ impl Clone for Box<OsStr> {
#[stable(feature = "shared_from_slice2", since = "1.24.0")]
impl From<OsString> for Arc<OsStr> {
/// Converts an [`OsString`] into a [`Arc`]`<OsStr>` without copying or allocating.
/// Converts an [`OsString`] into an [`Arc`]`<OsStr>` without copying or allocating.
#[inline]
fn from(s: OsString) -> Arc<OsStr> {
let arc = s.inner.into_arc();

View File

@ -30,7 +30,7 @@ fn smoke() {
#[test]
fn is_mutex() {
let m = unsafe {
// FIXME: Simplify this if Arc gets a Arc::get_pin_mut.
// FIXME: Simplify this if Arc gets an Arc::get_pin_mut.
let mut m = Arc::new(ReentrantMutex::new(RefCell::new(0)));
Pin::new_unchecked(Arc::get_mut_unchecked(&mut m)).init();
Pin::new_unchecked(m)
@ -52,7 +52,7 @@ fn is_mutex() {
#[test]
fn trylock_works() {
let m = unsafe {
// FIXME: Simplify this if Arc gets a Arc::get_pin_mut.
// FIXME: Simplify this if Arc gets an Arc::get_pin_mut.
let mut m = Arc::new(ReentrantMutex::new(()));
Pin::new_unchecked(Arc::get_mut_unchecked(&mut m)).init();
Pin::new_unchecked(m)

View File

@ -22,7 +22,7 @@ use crate::html::render::IndexItem;
///
/// This structure purposefully does not implement `Clone` because it's intended
/// to be a fairly large and expensive structure to clone. Instead this adheres
/// to `Send` so it may be stored in a `Arc` instance and shared among the various
/// to `Send` so it may be stored in an `Arc` instance and shared among the various
/// rendering threads.
#[derive(Default)]
crate struct Cache {

View File

@ -8,7 +8,7 @@ use std::future::Future;
use std::marker::Unpin;
use std::pin::Pin;
// This is a regression test for a ICE/unbounded recursion issue relating to async-await.
// This is a regression test for an ICE/unbounded recursion issue relating to async-await.
#[derive(Debug)]
#[must_use = "futures do nothing unless polled"]

View File

@ -1,5 +1,5 @@
// run-pass
// Test a ZST enum whose dicriminant is ~0i128. This caused an ICE when casting to a i32.
// Test a ZST enum whose dicriminant is ~0i128. This caused an ICE when casting to an i32.
#![feature(bench_black_box)]
use std::hint::black_box;

View File

@ -1,4 +1,4 @@
// This test enumerates various cases of interest where a ADT or tuple is
// This test enumerates various cases of interest where an ADT or tuple is
// partially initialized and then used in some way that is wrong *even*
// after rust-lang/rust#54987 is implemented.
//

View File

@ -36,7 +36,7 @@ pub(crate) struct SnippetProvider {
big_snippet: Lrc<String>,
/// A position of the start of `big_snippet`, used as an offset.
start_pos: usize,
/// A end position of the file that this snippet lives.
/// An end position of the file that this snippet lives.
end_pos: usize,
}