Skip to content

Commit 2396fad

Browse files
committed
Fix more “a”/“an” typos
1 parent b08b92e commit 2396fad

File tree

18 files changed

+20
-20
lines changed

18 files changed

+20
-20
lines changed

compiler/rustc_infer/src/infer/nll_relate/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ where
307307
/// relations between `'0` and `'a`).
308308
///
309309
/// The variable `pair` can be either a `(vid, ty)` or `(ty, vid)`
310-
/// -- in other words, it is always a (unresolved) inference
310+
/// -- in other words, it is always an (unresolved) inference
311311
/// variable `vid` and a type `ty` that are being related, but the
312312
/// vid may appear either as the "a" type or the "b" type,
313313
/// depending on where it appears in the tuple. The trait

compiler/rustc_infer/src/infer/undo_log.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ impl Default for InferCtxtUndoLogs<'_> {
9696
}
9797

9898
/// The UndoLogs trait defines how we undo a particular kind of action (of type T). We can undo any
99-
/// action that is convertable into a UndoLog (per the From impls above).
99+
/// action that is convertable into an UndoLog (per the From impls above).
100100
impl<'tcx, T> UndoLogs<T> for InferCtxtUndoLogs<'tcx>
101101
where
102102
UndoLog<'tcx>: From<T>,

compiler/rustc_lexer/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ impl Cursor<'_> {
489489
// Start is already eaten, eat the rest of identifier.
490490
self.eat_while(is_id_continue);
491491
// Known prefixes must have been handled earlier. So if
492-
// we see a prefix here, it is definitely a unknown prefix.
492+
// we see a prefix here, it is definitely an unknown prefix.
493493
match self.first() {
494494
'#' | '"' | '\'' => UnknownPrefix,
495495
_ => Ident,

compiler/rustc_lint/src/nonstandard_style.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ fn to_camel_case(s: &str) -> String {
118118
})
119119
.fold((String::new(), None), |(acc, prev): (String, Option<String>), next| {
120120
// separate two components with an underscore if their boundary cannot
121-
// be distinguished using a uppercase/lowercase case distinction
121+
// be distinguished using an uppercase/lowercase case distinction
122122
let join = if let Some(prev) = prev {
123123
let l = prev.chars().last().unwrap();
124124
let f = next.chars().next().unwrap();

compiler/rustc_middle/src/query/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,7 @@ rustc_queries! {
648648
}
649649
}
650650

651-
/// HACK: when evaluated, this reports a "unsafe derive on repr(packed)" error.
651+
/// HACK: when evaluated, this reports an "unsafe derive on repr(packed)" error.
652652
///
653653
/// Unsafety checking is executed for each method separately, but we only want
654654
/// to emit this error once per derive. As there are some impls with multiple

compiler/rustc_middle/src/ty/util.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -681,7 +681,7 @@ impl<'tcx> ty::TyS<'tcx> {
681681
}
682682

683683
/// Checks whether values of this type `T` implement the `Freeze`
684-
/// trait -- frozen types are those that do not contain a
684+
/// trait -- frozen types are those that do not contain an
685685
/// `UnsafeCell` anywhere. This is a language concept used to
686686
/// distinguish "true immutability", which is relevant to
687687
/// optimization as well as the rules around static values. Note

compiler/rustc_mir/src/borrow_check/diagnostics/explain_borrow.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
606606

607607
/// Checks if a borrowed value was captured by a trait object. We do this by
608608
/// looking forward in the MIR from the reserve location and checking if we see
609-
/// a unsized cast to a trait object on our data.
609+
/// an unsized cast to a trait object on our data.
610610
fn was_captured_by_trait_object(&self, borrow: &BorrowData<'tcx>) -> bool {
611611
// Start at the reserve location, find the place that we want to see cast to a trait object.
612612
let location = borrow.reserve_location;
@@ -666,7 +666,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
666666
}
667667
_ => {}
668668
},
669-
// If we see a unsized cast, then if it is our data we should check
669+
// If we see an unsized cast, then if it is our data we should check
670670
// whether it is being cast to a trait object.
671671
Rvalue::Cast(CastKind::Pointer(PointerCast::Unsize), operand, ty) => {
672672
match operand {

compiler/rustc_mir/src/borrow_check/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2003,7 +2003,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
20032003
}
20042004

20052005
if let Some((prefix, mpi)) = shortest_uninit_seen {
2006-
// Check for a reassignment into a uninitialized field of a union (for example,
2006+
// Check for a reassignment into an uninitialized field of a union (for example,
20072007
// after a move out). In this case, do not report an error here. There is an
20082008
// exception, if this is the first assignment into the union (that is, there is
20092009
// no move out from an earlier location) then this is an attempt at initialization

compiler/rustc_mir/src/monomorphize/partitioning/default.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ fn mono_item_visibility(
455455
def_id
456456
} else {
457457
return if export_generics && is_generic {
458-
// If it is a upstream monomorphization and we export generics, we must make
458+
// If it is an upstream monomorphization and we export generics, we must make
459459
// it available to downstream crates.
460460
*can_be_internalized = false;
461461
default_visibility(tcx, def_id, true)

compiler/rustc_mir/src/transform/check_consts/ops.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ impl NonConstOp for FnCallNonConst {
8686
}
8787
}
8888

89-
/// A call to a `#[unstable]` const fn or `#[rustc_const_unstable]` function.
89+
/// A call to an `#[unstable]` const fn or `#[rustc_const_unstable]` function.
9090
///
9191
/// Contains the name of the feature that would allow the use of this function.
9292
#[derive(Debug)]

0 commit comments

Comments
 (0)