Skip to content

Commit 2f9ddf3

Browse files
committed
Fix typos “an”→“a” and a few different ones that appeared in the same search
1 parent 2396fad commit 2f9ddf3

File tree

36 files changed

+43
-43
lines changed

36 files changed

+43
-43
lines changed

compiler/rustc_codegen_llvm/src/intrinsic.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1031,7 +1031,7 @@ fn generic_simd_intrinsic(
10311031
// vector mask and returns an unsigned integer containing the most
10321032
// significant bit (MSB) of each lane.
10331033

1034-
// If the vector has less than 8 lanes, an u8 is returned with zeroed
1034+
// If the vector has less than 8 lanes, a u8 is returned with zeroed
10351035
// trailing bits.
10361036
let expected_int_bits = in_len.max(8);
10371037
match ret_ty.kind() {

compiler/rustc_hir/src/hir.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -974,7 +974,7 @@ pub enum PatKind<'hir> {
974974
/// Invariant: `pats.len() >= 2`.
975975
Or(&'hir [Pat<'hir>]),
976976

977-
/// A path pattern for an unit struct/variant or a (maybe-associated) constant.
977+
/// A path pattern for a unit struct/variant or a (maybe-associated) constant.
978978
Path(QPath<'hir>),
979979

980980
/// A tuple pattern (e.g., `(a, b)`).

compiler/rustc_lint_defs/src/builtin.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3371,7 +3371,7 @@ declare_lint! {
33713371
}
33723372

33733373
declare_lint! {
3374-
/// The `unsupported_calling_conventions` lint is output whenever there is an use of the
3374+
/// The `unsupported_calling_conventions` lint is output whenever there is a use of the
33753375
/// `stdcall`, `fastcall`, `thiscall`, `vectorcall` calling conventions (or their unwind
33763376
/// variants) on targets that cannot meaningfully be supported for the requested target.
33773377
///

compiler/rustc_metadata/src/rmeta/decoder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ crate struct CrateMetadata {
6262
// --- Some data pre-decoded from the metadata blob, usually for performance ---
6363
/// Properties of the whole crate.
6464
/// NOTE(eddyb) we pass `'static` to a `'tcx` parameter because this
65-
/// lifetime is only used behind `Lazy`, and therefore acts like an
65+
/// lifetime is only used behind `Lazy`, and therefore acts like a
6666
/// universal (`for<'tcx>`), that is paired up with whichever `TyCtxt`
6767
/// is being used to decode those values.
6868
root: CrateRoot<'static>,

compiler/rustc_middle/src/mir/interpret/value.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -376,27 +376,27 @@ impl<'tcx, Tag: Provenance> Scalar<Tag> {
376376
self.to_bits(sz)
377377
}
378378

379-
/// Converts the scalar to produce an `u8`. Fails if the scalar is a pointer.
379+
/// Converts the scalar to produce a `u8`. Fails if the scalar is a pointer.
380380
pub fn to_u8(self) -> InterpResult<'static, u8> {
381381
self.to_unsigned_with_bit_width(8).map(|v| u8::try_from(v).unwrap())
382382
}
383383

384-
/// Converts the scalar to produce an `u16`. Fails if the scalar is a pointer.
384+
/// Converts the scalar to produce a `u16`. Fails if the scalar is a pointer.
385385
pub fn to_u16(self) -> InterpResult<'static, u16> {
386386
self.to_unsigned_with_bit_width(16).map(|v| u16::try_from(v).unwrap())
387387
}
388388

389-
/// Converts the scalar to produce an `u32`. Fails if the scalar is a pointer.
389+
/// Converts the scalar to produce a `u32`. Fails if the scalar is a pointer.
390390
pub fn to_u32(self) -> InterpResult<'static, u32> {
391391
self.to_unsigned_with_bit_width(32).map(|v| u32::try_from(v).unwrap())
392392
}
393393

394-
/// Converts the scalar to produce an `u64`. Fails if the scalar is a pointer.
394+
/// Converts the scalar to produce a `u64`. Fails if the scalar is a pointer.
395395
pub fn to_u64(self) -> InterpResult<'static, u64> {
396396
self.to_unsigned_with_bit_width(64).map(|v| u64::try_from(v).unwrap())
397397
}
398398

399-
/// Converts the scalar to produce an `u128`. Fails if the scalar is a pointer.
399+
/// Converts the scalar to produce a `u128`. Fails if the scalar is a pointer.
400400
pub fn to_u128(self) -> InterpResult<'static, u128> {
401401
self.to_unsigned_with_bit_width(128)
402402
}

compiler/rustc_middle/src/mir/tcx.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ impl BorrowKind {
265265
BorrowKind::Shared => hir::Mutability::Not,
266266

267267
// We have no type corresponding to a unique imm borrow, so
268-
// use `&mut`. It gives all the capabilities of an `&uniq`
268+
// use `&mut`. It gives all the capabilities of a `&uniq`
269269
// and hence is a safe "over approximation".
270270
BorrowKind::Unique => hir::Mutability::Mut,
271271

compiler/rustc_middle/src/mir/visit.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1202,7 +1202,7 @@ pub enum NonUseContext {
12021202
StorageDead,
12031203
/// User type annotation assertions for NLL.
12041204
AscribeUserTy,
1205-
/// The data of an user variable, for debug info.
1205+
/// The data of a user variable, for debug info.
12061206
VarDebugInfo,
12071207
}
12081208

compiler/rustc_middle/src/query/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1733,7 +1733,7 @@ rustc_queries! {
17331733
}
17341734

17351735
/// Performs an HIR-based well-formed check on the item with the given `HirId`. If
1736-
/// we get an `Umimplemented` error that matches the provided `Predicate`, return
1736+
/// we get an `Unimplemented` error that matches the provided `Predicate`, return
17371737
/// the cause of the newly created obligation.
17381738
///
17391739
/// This is only used by error-reporting code to get a better cause (in particular, a better

compiler/rustc_middle/src/ty/closure.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ impl BorrowKind {
434434
ImmBorrow => hir::Mutability::Not,
435435

436436
// We have no type corresponding to a unique imm borrow, so
437-
// use `&mut`. It gives all the capabilities of an `&uniq`
437+
// use `&mut`. It gives all the capabilities of a `&uniq`
438438
// and hence is a safe "over approximation".
439439
UniqueImmBorrow => hir::Mutability::Mut,
440440
}

compiler/rustc_middle/src/ty/codec.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ where
209209
impl<'tcx, D: TyDecoder<'tcx>> Decodable<D> for Ty<'tcx> {
210210
#[allow(rustc::usage_of_ty_tykind)]
211211
fn decode(decoder: &mut D) -> Result<Ty<'tcx>, D::Error> {
212-
// Handle shorthands first, if we have an usize > 0x80.
212+
// Handle shorthands first, if we have a usize > 0x80.
213213
if decoder.positioned_at_shorthand() {
214214
let pos = decoder.read_usize()?;
215215
assert!(pos >= SHORTHAND_OFFSET);
@@ -228,7 +228,7 @@ impl<'tcx, D: TyDecoder<'tcx>> Decodable<D> for Ty<'tcx> {
228228
impl<'tcx, D: TyDecoder<'tcx>> Decodable<D> for ty::Binder<'tcx, ty::PredicateKind<'tcx>> {
229229
fn decode(decoder: &mut D) -> Result<ty::Binder<'tcx, ty::PredicateKind<'tcx>>, D::Error> {
230230
let bound_vars = Decodable::decode(decoder)?;
231-
// Handle shorthands first, if we have an usize > 0x80.
231+
// Handle shorthands first, if we have a usize > 0x80.
232232
Ok(ty::Binder::bind_with_vars(
233233
if decoder.positioned_at_shorthand() {
234234
let pos = decoder.read_usize()?;

0 commit comments

Comments
 (0)