Skip to content

Commit f43ee8e

Browse files
committed
fix few typos
1 parent 6265286 commit f43ee8e

File tree

32 files changed

+39
-39
lines changed

32 files changed

+39
-39
lines changed

compiler/rustc_ast/src/ast.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1345,7 +1345,7 @@ pub enum ExprKind {
13451345
Field(P<Expr>, Ident),
13461346
/// An indexing operation (e.g., `foo[2]`).
13471347
Index(P<Expr>, P<Expr>),
1348-
/// A range (e.g., `1..2`, `1..`, `..2`, `1..=2`, `..=2`; and `..` in destructuring assingment).
1348+
/// A range (e.g., `1..2`, `1..`, `..2`, `1..=2`, `..=2`; and `..` in destructuring assignment).
13491349
Range(Option<P<Expr>>, Option<P<Expr>>, RangeLimits),
13501350
/// An underscore, used in destructuring assignment to ignore a value.
13511351
Underscore,

compiler/rustc_ast/src/tokenstream.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ impl AttrAnnotatedTokenStream {
301301
/// tokens.
302302
///
303303
/// For example, `#[cfg(FALSE)] struct Foo {}` would
304-
/// have an `attrs` field contaiing the `#[cfg(FALSE)]` attr,
304+
/// have an `attrs` field containing the `#[cfg(FALSE)]` attr,
305305
/// and a `tokens` field storing the (unparesd) tokens `struct Foo {}`
306306
#[derive(Clone, Debug, Encodable, Decodable)]
307307
pub struct AttributesData {

compiler/rustc_errors/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ struct HandlerInner {
321321

322322
/// This set contains the `DiagnosticId` of all emitted diagnostics to avoid
323323
/// emitting the same diagnostic with extended help (`--teach`) twice, which
324-
/// would be uneccessary repetition.
324+
/// would be unnecessary repetition.
325325
taught_diagnostics: FxHashSet<DiagnosticId>,
326326

327327
/// Used to suggest rustc --explain <error code>

compiler/rustc_expand/src/mbe.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ enum KleeneOp {
6969
ZeroOrMore,
7070
/// Kleene plus (`+`) for one or more repetitions
7171
OneOrMore,
72-
/// Kleene optional (`?`) for zero or one reptitions
72+
/// Kleene optional (`?`) for zero or one repetitions
7373
ZeroOrOne,
7474
}
7575

compiler/rustc_expand/src/mbe/transcribe.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ pub(super) fn transcribe<'a>(
209209
}
210210
} else {
211211
// 0 is the initial counter (we have done 0 repretitions so far). `len`
212-
// is the total number of reptitions we should generate.
212+
// is the total number of repetitions we should generate.
213213
repeats.push((0, len));
214214

215215
// The first time we encounter the sequence we push it to the stack. It
@@ -362,7 +362,7 @@ impl LockstepIterSize {
362362
/// appropriate meta-vars in `interpolations`.
363363
///
364364
/// Note that if `repeats` does not match the exact correct depth of a meta-var,
365-
/// `lookup_cur_matched` will return `None`, which is why this still works even in the presnece of
365+
/// `lookup_cur_matched` will return `None`, which is why this still works even in the presence of
366366
/// multiple nested matcher sequences.
367367
fn lockstep_iter_size(
368368
tree: &mbe::TokenTree,

compiler/rustc_infer/src/infer/combine.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ impl<'infcx, 'tcx> InferCtxt<'infcx, 'tcx> {
191191
///
192192
/// This also tests if the given const `ct` contains an inference variable which was previously
193193
/// unioned with `target_vid`. If this is the case, inferring `target_vid` to `ct`
194-
/// would result in an infinite type as we continously replace an inference variable
194+
/// would result in an infinite type as we continuously replace an inference variable
195195
/// in `ct` with `ct` itself.
196196
///
197197
/// This is especially important as unevaluated consts use their parents generics.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ where
279279
/// Relate a type inference variable with a value type. This works
280280
/// by creating a "generalization" G of the value where all the
281281
/// lifetimes are replaced with fresh inference values. This
282-
/// genearlization G becomes the value of the inference variable,
282+
/// generalization G becomes the value of the inference variable,
283283
/// and is then related in turn to the value. So e.g. if you had
284284
/// `vid = ?0` and `value = &'a u32`, we might first instantiate
285285
/// `?0` to a type like `&'0 u32` where `'0` is a fresh variable,

compiler/rustc_lint/src/builtin.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3022,7 +3022,7 @@ impl<'tcx> LateLintPass<'tcx> for DerefNullPtr {
30223022
false
30233023
}
30243024

3025-
/// test if experssion is the literal `0`
3025+
/// test if expression is the literal `0`
30263026
fn is_zero(expr: &hir::Expr<'_>) -> bool {
30273027
match &expr.kind {
30283028
rustc_hir::ExprKind::Lit(ref lit) => {

compiler/rustc_lint_defs/src/builtin.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2483,7 +2483,7 @@ declare_lint! {
24832483
///
24842484
/// On x86, `asm!` uses the intel assembly syntax by default. While this
24852485
/// can be switched using assembler directives like `.att_syntax`, using the
2486-
/// `att_syntax` option is recomended instead because it will also properly
2486+
/// `att_syntax` option is recommended instead because it will also properly
24872487
/// prefix register placeholders with `%` as required by AT&T syntax.
24882488
pub BAD_ASM_STYLE,
24892489
Warn,
@@ -2678,7 +2678,7 @@ declare_lint! {
26782678
/// Statics with an uninhabited type can never be initialized, so they are impossible to define.
26792679
/// However, this can be side-stepped with an `extern static`, leading to problems later in the
26802680
/// compiler which assumes that there are no initialized uninhabited places (such as locals or
2681-
/// statics). This was accientally allowed, but is being phased out.
2681+
/// statics). This was accidentally allowed, but is being phased out.
26822682
pub UNINHABITED_STATIC,
26832683
Warn,
26842684
"uninhabited static",

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ static_assert_size!(InterpErrorInfo<'_>, 8);
4545

4646
/// Packages the kind of error we got from the const code interpreter
4747
/// up with a Rust-level backtrace of where the error occurred.
48-
/// Thsese should always be constructed by calling `.into()` on
48+
/// These should always be constructed by calling `.into()` on
4949
/// a `InterpError`. In `rustc_mir::interpret`, we have `throw_err_*`
5050
/// macros for this.
5151
#[derive(Debug)]

0 commit comments

Comments
 (0)