Skip to content

Commit 7e8201a

Browse files
committed
Spellchecking some comments
This PR attempts to clean up some minor spelling mistakes in comments
1 parent 600ec28 commit 7e8201a

File tree

48 files changed

+61
-61
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+61
-61
lines changed

compiler/rustc_apfloat/src/ieee.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ impl<S: Semantics> fmt::Display for IeeeFloat<S> {
461461
(combined / 10) as u32 as Limb
462462
});
463463

464-
// Reduce the sigificand to avoid wasting time dividing 0's.
464+
// Reduce the significand to avoid wasting time dividing 0's.
465465
while sig.last() == Some(&0) {
466466
sig.pop();
467467
}

compiler/rustc_ast_lowering/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
634634
// This can happen when trying to lower the return type `x` in erroneous code like
635635
// async fn foo(x: u8) -> x {}
636636
// In that case, `x` is lowered as a function parameter, and the return type is lowered as
637-
// an opaque type as a synthetized HIR owner.
637+
// an opaque type as a synthesized HIR owner.
638638
res.unwrap_or(Res::Err)
639639
}
640640

compiler/rustc_ast_passes/src/ast_validation.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -622,7 +622,7 @@ impl<'a> AstValidator<'a> {
622622
}
623623
}
624624

625-
/// Reject C-varadic type unless the function is foreign,
625+
/// Reject C-variadic type unless the function is foreign,
626626
/// or free and `unsafe extern "C"` semantically.
627627
fn check_c_varadic_type(&self, fk: FnKind<'a>) {
628628
match (fk.ctxt(), fk.header()) {

compiler/rustc_borrowck/src/diagnostics/outlives_suggestion.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ impl OutlivesSuggestionBuilder {
5555
| RegionNameSource::NamedFreeRegion(..)
5656
| RegionNameSource::Static => true,
5757

58-
// Don't give suggestions for upvars, closure return types, or other unnamable
58+
// Don't give suggestions for upvars, closure return types, or other unnameable
5959
// regions.
6060
RegionNameSource::SynthesizedFreeEnvRegion(..)
6161
| RegionNameSource::AnonRegionFromArgument(..)

compiler/rustc_borrowck/src/diagnostics/region_errors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, 'tcx> {
176176
// FIXME. We should handle this case better. It
177177
// indicates that we have e.g., some region variable
178178
// whose value is like `'a+'b` where `'a` and `'b` are
179-
// distinct unrelated univesal regions that are not
179+
// distinct unrelated universal regions that are not
180180
// known to outlive one another. It'd be nice to have
181181
// some examples where this arises to decide how best
182182
// to report it; we could probably handle it by

compiler/rustc_borrowck/src/invalidation.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ impl<'cx, 'tcx> InvalidationGenerator<'cx, 'tcx> {
365365
// borrow); so don't check if they interfere.
366366
//
367367
// NOTE: *reservations* do conflict with themselves;
368-
// thus aren't injecting unsoundenss w/ this check.)
368+
// thus aren't injecting unsoundness w/ this check.)
369369
(Activation(_, activating), _) if activating == borrow_index => {
370370
// Activating a borrow doesn't generate any invalidations, since we
371371
// have already taken the reservation

compiler/rustc_borrowck/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1046,7 +1046,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
10461046
// borrow); so don't check if they interfere.
10471047
//
10481048
// NOTE: *reservations* do conflict with themselves;
1049-
// thus aren't injecting unsoundenss w/ this check.)
1049+
// thus aren't injecting unsoundness w/ this check.)
10501050
(Activation(_, activating), _) if activating == borrow_index => {
10511051
debug!(
10521052
"check_access_for_conflict place_span: {:?} sd: {:?} rw: {:?} \
@@ -1105,7 +1105,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
11051105
);
11061106
// rust-lang/rust#56254 - This was previously permitted on
11071107
// the 2018 edition so we emit it as a warning. We buffer
1108-
// these sepately so that we only emit a warning if borrow
1108+
// these separately so that we only emit a warning if borrow
11091109
// checking was otherwise successful.
11101110
this.reservation_warnings
11111111
.insert(bi, (place_span.0, place_span.1, location, bk, borrow.clone()));
@@ -1586,7 +1586,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
15861586
) {
15871587
debug!("check_if_reassignment_to_immutable_state({:?})", local);
15881588

1589-
// Check if any of the initializiations of `local` have happened yet:
1589+
// Check if any of the initializations of `local` have happened yet:
15901590
if let Some(init_index) = self.is_local_ever_initialized(local, flow_state) {
15911591
// And, if so, report an error.
15921592
let init = &self.move_data.inits[init_index];

compiler/rustc_borrowck/src/region_infer/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -787,7 +787,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
787787
let universe_a = self.scc_universes[scc_a];
788788

789789
// Quick check: if scc_b's declared universe is a subset of
790-
// scc_a's declared univese (typically, both are ROOT), then
790+
// scc_a's declared universe (typically, both are ROOT), then
791791
// it cannot contain any problematic universe elements.
792792
if universe_a.can_name(self.scc_universes[scc_b]) {
793793
return true;
@@ -1991,7 +1991,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
19911991
.iter()
19921992
.find_map(|constraint| {
19931993
if let ConstraintCategory::Predicate(predicate_span) = constraint.category {
1994-
// We currentl'y doesn't store the `DefId` in the `ConstraintCategory`
1994+
// We currently do not store the `DefId` in the `ConstraintCategory`
19951995
// for performances reasons. The error reporting code used by NLL only
19961996
// uses the span, so this doesn't cause any problems at the moment.
19971997
Some(ObligationCauseCode::BindingObligation(

compiler/rustc_borrowck/src/type_check/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2640,7 +2640,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
26402640
// we have to solve them here where we instantiate the
26412641
// closure.
26422642
//
2643-
// Despite the opacity of the previous parapgrah, this is
2643+
// Despite the opacity of the previous paragraph, this is
26442644
// actually relatively easy to understand in terms of the
26452645
// desugaring. A closure gets desugared to a struct, and
26462646
// these extra requirements are basically like where

compiler/rustc_builtin_macros/src/cfg_eval.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ impl CfgEval<'_, '_> {
137137
}
138138

139139
// The majority of parsed attribute targets will never need to have early cfg-expansion
140-
// run (e.g. they are not part of a `#[derive]` or `#[cfg_eval]` macro inoput).
140+
// run (e.g. they are not part of a `#[derive]` or `#[cfg_eval]` macro input).
141141
// Therefore, we normally do not capture the necessary information about `#[cfg]`
142142
// and `#[cfg_attr]` attributes during parsing.
143143
//

0 commit comments

Comments
 (0)