Skip to content

Commit be9d269

Browse files
committed
Fix more “a”/“an” typos
1 parent bf88b11 commit be9d269

File tree

15 files changed

+17
-17
lines changed

15 files changed

+17
-17
lines changed

compiler/rustc_codegen_llvm/src/builder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,7 @@ impl BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
558558

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

compiler/rustc_codegen_llvm/src/intrinsic.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ impl IntrinsicCallMethods<'tcx> for Builder<'a, 'll, 'tcx> {
139139
if self.cx().size_of(ret_ty).bytes() < 4 {
140140
// `va_arg` should not be called on an integer type
141141
// less than 4 bytes in length. If it is, promote
142-
// the integer to a `i32` and truncate the result
142+
// the integer to an `i32` and truncate the result
143143
// back to the smaller type.
144144
let promoted_result = emit_va_arg(self, args[0], tcx.types.i32);
145145
self.trunc(promoted_result, llret_ty)

compiler/rustc_data_structures/src/owning_ref/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1148,7 +1148,7 @@ pub type StringRef = OwningRef<String, str>;
11481148

11491149
/// Typedef of an owning reference that uses a `Rc` as the owner.
11501150
pub type RcRef<T, U = T> = OwningRef<Rc<T>, U>;
1151-
/// Typedef of an owning reference that uses a `Arc` as the owner.
1151+
/// Typedef of an owning reference that uses an `Arc` as the owner.
11521152
pub type ArcRef<T, U = T> = OwningRef<Arc<T>, U>;
11531153

11541154
/// Typedef of an owning reference that uses a `Ref` as the owner.

compiler/rustc_mir/src/borrow_check/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1889,7 +1889,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
18891889
ProjectionElem::Downcast(_/*adt_def*/, _/*variant_idx*/) =>
18901890
// assigning to (P->variant) is okay if assigning to `P` is okay
18911891
//
1892-
// FIXME: is this true even if P is a adt with a dtor?
1892+
// FIXME: is this true even if P is an adt with a dtor?
18931893
{ }
18941894

18951895
// assigning to (*P) requires P to be initialized

compiler/rustc_resolve/src/late/diagnostics.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1826,7 +1826,7 @@ impl<'tcx> LifetimeContext<'_, 'tcx> {
18261826
err.emit();
18271827
}
18281828

1829-
// FIXME(const_generics): This patches over a ICE caused by non-'static lifetimes in const
1829+
// FIXME(const_generics): This patches over an ICE caused by non-'static lifetimes in const
18301830
// generics. We are disallowing this until we can decide on how we want to handle non-'static
18311831
// lifetimes in const generics. See issue #74052 for discussion.
18321832
crate fn emit_non_static_lt_in_const_generic_error(&self, lifetime_ref: &hir::Lifetime) {

compiler/rustc_serialize/src/json.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1202,7 +1202,7 @@ impl Json {
12021202
matches!(*self, Json::I64(_) | Json::U64(_) | Json::F64(_))
12031203
}
12041204

1205-
/// Returns `true` if the Json value is a `i64`.
1205+
/// Returns `true` if the Json value is an `i64`.
12061206
pub fn is_i64(&self) -> bool {
12071207
matches!(*self, Json::I64(_))
12081208
}
@@ -1217,7 +1217,7 @@ impl Json {
12171217
matches!(*self, Json::F64(_))
12181218
}
12191219

1220-
/// If the Json value is a number, returns or cast it to a `i64`;
1220+
/// If the Json value is a number, returns or cast it to an `i64`;
12211221
/// returns `None` otherwise.
12221222
pub fn as_i64(&self) -> Option<i64> {
12231223
match *self {

library/core/src/array/iter.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ impl<T, const N: usize> IntoIter<T, N> {
4545
/// use std::array;
4646
///
4747
/// for value in array::IntoIter::new([1, 2, 3, 4, 5]) {
48-
/// // The type of `value` is a `i32` here, instead of `&i32`
48+
/// // The type of `value` is an `i32` here, instead of `&i32`
4949
/// let _: i32 = value;
5050
/// }
5151
/// ```

library/std/src/ffi/c_str.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -939,7 +939,7 @@ impl<'a> From<&'a CString> for Cow<'a, CStr> {
939939

940940
#[stable(feature = "shared_from_slice2", since = "1.24.0")]
941941
impl From<CString> for Arc<CStr> {
942-
/// Converts a [`CString`] into a [`Arc`]`<CStr>` without copying or allocating.
942+
/// Converts a [`CString`] into an [`Arc`]`<CStr>` without copying or allocating.
943943
#[inline]
944944
fn from(s: CString) -> Arc<CStr> {
945945
let arc: Arc<[u8]> = Arc::from(s.into_inner());

library/std/src/ffi/os_str.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -897,7 +897,7 @@ impl Clone for Box<OsStr> {
897897

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

library/std/src/sys_common/remutex/tests.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ fn smoke() {
3030
#[test]
3131
fn is_mutex() {
3232
let m = unsafe {
33-
// FIXME: Simplify this if Arc gets a Arc::get_pin_mut.
33+
// FIXME: Simplify this if Arc gets an Arc::get_pin_mut.
3434
let mut m = Arc::new(ReentrantMutex::new(RefCell::new(0)));
3535
Pin::new_unchecked(Arc::get_mut_unchecked(&mut m)).init();
3636
Pin::new_unchecked(m)
@@ -52,7 +52,7 @@ fn is_mutex() {
5252
#[test]
5353
fn trylock_works() {
5454
let m = unsafe {
55-
// FIXME: Simplify this if Arc gets a Arc::get_pin_mut.
55+
// FIXME: Simplify this if Arc gets an Arc::get_pin_mut.
5656
let mut m = Arc::new(ReentrantMutex::new(()));
5757
Pin::new_unchecked(Arc::get_mut_unchecked(&mut m)).init();
5858
Pin::new_unchecked(m)

src/librustdoc/formats/cache.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ use crate::html::render::IndexItem;
2222
///
2323
/// This structure purposefully does not implement `Clone` because it's intended
2424
/// to be a fairly large and expensive structure to clone. Instead this adheres
25-
/// to `Send` so it may be stored in a `Arc` instance and shared among the various
25+
/// to `Send` so it may be stored in an `Arc` instance and shared among the various
2626
/// rendering threads.
2727
#[derive(Default)]
2828
crate struct Cache {

src/test/ui/async-await/issues/issue-53249.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use std::future::Future;
88
use std::marker::Unpin;
99
use std::pin::Pin;
1010

11-
// This is a regression test for a ICE/unbounded recursion issue relating to async-await.
11+
// This is a regression test for an ICE/unbounded recursion issue relating to async-await.
1212

1313
#[derive(Debug)]
1414
#[must_use = "futures do nothing unless polled"]

src/test/ui/consts/cast-discriminant-zst-enum.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// run-pass
2-
// Test a ZST enum whose dicriminant is ~0i128. This caused an ICE when casting to a i32.
2+
// Test a ZST enum whose dicriminant is ~0i128. This caused an ICE when casting to an i32.
33
#![feature(bench_black_box)]
44
use std::hint::black_box;
55

src/test/ui/nll/issue-21232-partial-init-and-erroneous-use.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// This test enumerates various cases of interest where a ADT or tuple is
1+
// This test enumerates various cases of interest where an ADT or tuple is
22
// partially initialized and then used in some way that is wrong *even*
33
// after rust-lang/rust#54987 is implemented.
44
//

src/tools/rustfmt/src/visitor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ pub(crate) struct SnippetProvider {
3636
big_snippet: Lrc<String>,
3737
/// A position of the start of `big_snippet`, used as an offset.
3838
start_pos: usize,
39-
/// A end position of the file that this snippet lives.
39+
/// An end position of the file that this snippet lives.
4040
end_pos: usize,
4141
}
4242

0 commit comments

Comments
 (0)