Skip to content

Commit 1caaa88

Browse files
committed
Fix typos
1 parent ac9ac0e commit 1caaa88

File tree

17 files changed

+23
-23
lines changed

17 files changed

+23
-23
lines changed

compiler/rustc_ast_lowering/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -896,7 +896,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
896896
let ret = self.arena.alloc_from_iter(lowered_attrs);
897897

898898
// this is possible if an item contained syntactical attribute,
899-
// but none of them parse succesfully or all of them were ignored
899+
// but none of them parse successfully or all of them were ignored
900900
// for not being built-in attributes at all. They could be remaining
901901
// unexpanded attributes used as markers in proc-macro derives for example.
902902
// This will have emitted some diagnostics for the misparse, but will then

compiler/rustc_codegen_ssa/src/codegen_attrs.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ fn codegen_fn_attrs(tcx: TyCtxt<'_>, did: LocalDefId) -> CodegenFnAttrs {
387387
[sym::arm, sym::a32 | sym::t32]
388388
if !tcx.sess.target.has_thumb_interworking =>
389389
{
390-
tcx.dcx().emit_err(errors::UnsuportedInstructionSet {
390+
tcx.dcx().emit_err(errors::UnsupportedInstructionSet {
391391
span: attr.span(),
392392
});
393393
None

compiler/rustc_codegen_ssa/src/errors.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ pub(crate) struct NullOnExport {
149149

150150
#[derive(Diagnostic)]
151151
#[diag(codegen_ssa_unsupported_instruction_set, code = E0779)]
152-
pub(crate) struct UnsuportedInstructionSet {
152+
pub(crate) struct UnsupportedInstructionSet {
153153
#[primary_span]
154154
pub span: Span,
155155
}

compiler/rustc_hir_analysis/messages.ftl

+1-1
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ hir_analysis_trait_object_declared_with_no_traits =
522522
at least one trait is required for an object type
523523
.alias_span = this alias does not contain a trait
524524
525-
hir_analysis_traits_with_defualt_impl = traits with a default impl, like `{$traits}`, cannot be implemented for {$problematic_kind} `{$self_ty}`
525+
hir_analysis_traits_with_default_impl = traits with a default impl, like `{$traits}`, cannot be implemented for {$problematic_kind} `{$self_ty}`
526526
.note = a trait object implements `{$traits}` if and only if `{$traits}` is one of the trait object's trait bounds
527527
528528
hir_analysis_transparent_enum_variant = transparent enum needs exactly one variant, but has {$number}

compiler/rustc_hir_analysis/src/errors.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1327,7 +1327,7 @@ pub(crate) struct ImplForTyRequires {
13271327
}
13281328

13291329
#[derive(Diagnostic)]
1330-
#[diag(hir_analysis_traits_with_defualt_impl, code = E0321)]
1330+
#[diag(hir_analysis_traits_with_default_impl, code = E0321)]
13311331
#[note]
13321332
pub(crate) struct TraitsWithDefaultImpl<'a> {
13331333
#[primary_span]

compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2339,7 +2339,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
23392339
}
23402340

23412341
if !mismatched_params.is_empty() {
2342-
// For each mismatched paramter, create a two-way link to each matched parameter
2342+
// For each mismatched parameter, create a two-way link to each matched parameter
23432343
// of the same type.
23442344
let mut dependants = IndexVec::<ExpectedIdx, _>::from_fn_n(
23452345
|_| SmallVec::<[u32; 4]>::new(),

compiler/rustc_interface/src/passes.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -907,7 +907,7 @@ pub fn create_and_enter_global_ctxt<T, F: for<'tcx> FnOnce(TyCtxt<'tcx>) -> T>(
907907
feed.output_filenames(Arc::new(outputs));
908908

909909
let res = f(tcx);
910-
// FIXME maybe run finish even when a fatal error occured? or at least tcx.alloc_self_profile_query_strings()?
910+
// FIXME maybe run finish even when a fatal error occurred? or at least tcx.alloc_self_profile_query_strings()?
911911
tcx.finish();
912912
res
913913
},

compiler/rustc_macros/src/symbols.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ fn symbols_with_errors(input: TokenStream) -> (TokenStream, Vec<syn::Error>) {
299299
let output = quote! {
300300
const SYMBOL_DIGITS_BASE: u32 = #symbol_digits_base;
301301

302-
/// The number of predefined symbols; this is the the first index for
302+
/// The number of predefined symbols; this is the first index for
303303
/// extra pre-interned symbols in an Interner created via
304304
/// [`Interner::with_extra_symbols`].
305305
pub const PREDEFINED_SYMBOLS_COUNT: u32 = #predefined_symbols_count;

compiler/rustc_mir_build/src/builder/scope.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1485,7 +1485,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
14851485
/// panic occurred (a subset of the drops in `scope`, since we sometimes elide StorageDead and other
14861486
/// instructions on unwinding)
14871487
/// * `dropline_to`, describes the drops that would occur at this point in the code if a
1488-
/// coroutine drop occured.
1488+
/// coroutine drop occurred.
14891489
/// * `storage_dead_on_unwind`, if true, then we should emit `StorageDead` even when unwinding
14901490
/// * `arg_count`, number of MIR local variables corresponding to fn arguments (used to assert that we don't drop those)
14911491
fn build_scope_drops<'tcx, F>(

compiler/rustc_next_trait_solver/src/solve/assembly/structural_traits.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -945,7 +945,7 @@ where
945945

946946
// This is quite similar to the `projection_may_match` we use in unsizing,
947947
// but here we want to unify a projection predicate against an alias term
948-
// so we can replace it with the the projection predicate's term.
948+
// so we can replace it with the projection predicate's term.
949949
let mut matching_projections = replacements
950950
.iter()
951951
.filter(|source_projection| self.projection_may_match(**source_projection, alias_term));

compiler/rustc_trait_selection/src/error_reporting/traits/on_unimplemented_format.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ pub struct FormatString {
2020
input: Symbol,
2121
span: Span,
2222
pieces: Vec<Piece>,
23-
/// The formatting string was parsed succesfully but with warnings
23+
/// The formatting string was parsed successfully but with warnings
2424
pub warnings: Vec<FormatWarning>,
2525
}
2626

src/doc/rustc-dev-guide/src/autodiff/installation.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Installation
22

3-
In the near future, `std::autodiff` should become available in nightly builds for users. As a contribute however, you will still need to build rustc from source. Please be aware that the msvc target is not supported at the moment, all other tier 1 targets should work. Please open an issue if you encounter any problems on a supported tier 1 target, or if you succesfully build this project on a tier2/tier3 target.
3+
In the near future, `std::autodiff` should become available in nightly builds for users. As a contributor however, you will still need to build rustc from source. Please be aware that the msvc target is not supported at the moment, all other tier 1 targets should work. Please open an issue if you encounter any problems on a supported tier 1 target, or if you successfully build this project on a tier2/tier3 target.
44

55
## Build instructions
66

src/doc/rustc-dev-guide/src/rustdoc-internals/rustdoc-test-suite.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ In addition to the directives listed here,
1616
`rustdoc` tests also support most
1717
[compiletest directives](../tests/directives.html).
1818

19-
All `PATH`s in directives are relative to the the rustdoc output directory (`build/TARGET/test/rustdoc/TESTNAME`),
19+
All `PATH`s in directives are relative to the rustdoc output directory (`build/TARGET/test/rustdoc/TESTNAME`),
2020
so it is conventional to use a `#![crate_name = "foo"]` attribute to avoid
2121
having to write a long crate name multiple times.
22-
To avoid repetion, `-` can be used in any `PATH` argument to re-use the previous `PATH` argument.
22+
To avoid repetition, `-` can be used in any `PATH` argument to re-use the previous `PATH` argument.
2323

2424
All arguments take the form of quoted strings
2525
(both single and double quotes are supported),
@@ -87,7 +87,7 @@ compiletest's `--bless` flag is forwarded to htmldocck.
8787

8888
Usage: `//@ has-dir PATH`
8989

90-
Checks for the existance of directory `PATH`.
90+
Checks for the existence of directory `PATH`.
9191

9292
### `files`
9393

@@ -106,7 +106,7 @@ Example: `//@ files "foo/bar" '["index.html", "sidebar-items.js"]'`
106106
## Limitations
107107
`htmldocck.py` uses the xpath implementation from the standard library.
108108
This leads to several limitations:
109-
* All `XPATH` arguments must start with `//` due to a flaw in the implemention.
109+
* All `XPATH` arguments must start with `//` due to a flaw in the implementation.
110110
* Many XPath features (functions, axies, etc.) are not supported.
111111
* Only well-formed HTML can be parsed (hopefully rustdoc doesn't output mismatched tags).
112112

src/doc/rustc-dev-guide/src/type-checking.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Type "collection" is the process of converting the types found in the HIR
1717
**internal representation** used by the compiler (`Ty<'tcx>`) – we also do
1818
similar conversions for where-clauses and other bits of the function signature.
1919

20-
To try and get a sense for the difference, consider this function:
20+
To try and get a sense of the difference, consider this function:
2121

2222
```rust,ignore
2323
struct Foo { }

src/doc/rustc-dev-guide/src/type-inference.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Here, the type of `things` is *inferred* to be `Vec<&str>` because of the value
1919
we push into `things`.
2020

2121
The type inference is based on the standard Hindley-Milner (HM) type inference
22-
algorithm, but extended in various way to accommodate subtyping, region
22+
algorithm, but extended in various ways to accommodate subtyping, region
2323
inference, and higher-ranked types.
2424

2525
## A note on terminology

src/doc/rustc-dev-guide/src/typing_parameter_envs.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
## Typing Environments
66

7-
When interacting with the type system there are a few variables to consider that can affect the results of trait solving. The the set of in-scope where clauses, and what phase of the compiler type system operations are being performed in (the [`ParamEnv`][penv] and [`TypingMode`][tmode] structs respectively).
7+
When interacting with the type system there are a few variables to consider that can affect the results of trait solving. The set of in-scope where clauses, and what phase of the compiler type system operations are being performed in (the [`ParamEnv`][penv] and [`TypingMode`][tmode] structs respectively).
88

99
When an environment to perform type system operations in has not yet been created, the [`TypingEnv`][tenv] can be used to bundle all of the external context required into a single type.
1010

@@ -13,11 +13,11 @@ Once a context to perform type system operations in has been created (e.g. an [`
1313
[ocx]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_trait_selection/traits/struct.ObligationCtxt.html
1414
[fnctxt]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_hir_typeck/fn_ctxt/struct.FnCtxt.html
1515

16-
## Parameter Environemnts
16+
## Parameter Environments
1717

1818
### What is a `ParamEnv`
1919

20-
The [`ParamEnv`][penv] is a list of in-scope where-clauses, it typically corresponds to a specific item's where clauses. Some clauses are not explicitly written but are instead are implicitly added in the [`predicates_of`][predicates_of] query, such as `ConstArgHasType` or (some) implied bounds.
20+
The [`ParamEnv`][penv] is a list of in-scope where-clauses, it typically corresponds to a specific item's where clauses. Some clauses are not explicitly written but are instead implicitly added in the [`predicates_of`][predicates_of] query, such as `ConstArgHasType` or (some) implied bounds.
2121

2222
In most cases `ParamEnv`s are initially created via the [`param_env` query][query] which returns a `ParamEnv` derived from the provided item's where clauses. A `ParamEnv` can also be created with arbitrary sets of clauses that are not derived from a specific item, such as in [`compare_method_predicate_entailment`][method_pred_entailment] where we create a hybrid `ParamEnv` consisting of the impl's where clauses and the trait definition's function's where clauses.
2323

@@ -73,7 +73,7 @@ fn foo2<T>(a: T) {
7373

7474
### Acquiring a `ParamEnv`
7575

76-
Using the wrong [`ParamEnv`][penv] when interacting with the type system can lead to ICEs, illformed programs compiling, or erroing when we shouldn't. See [#82159](https://github.com/rust-lang/rust/pull/82159) and [#82067](https://github.com/rust-lang/rust/pull/82067) as examples of PRs that modified the compiler to use the correct param env and in the process fixed ICEs.
76+
Using the wrong [`ParamEnv`][penv] when interacting with the type system can lead to ICEs, illformed programs compiling, or erroring when we shouldn't. See [#82159](https://github.com/rust-lang/rust/pull/82159) and [#82067](https://github.com/rust-lang/rust/pull/82067) as examples of PRs that modified the compiler to use the correct param env and in the process fixed ICEs.
7777

7878
In the large majority of cases, when a `ParamEnv` is required it either already exists somewhere in scope, or above in the call stack and should be passed down. A non exhaustive list of places where you might find an existing `ParamEnv`:
7979
- During typeck `FnCtxt` has a [`param_env` field][fnctxt_param_env]

src/doc/rustc/src/platform-support/xtensa.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ Xtensa targets that support `std` are documented in the [ESP-IDF platform suppor
2424

2525
## Building the targets
2626

27-
The targets can be built by installing the [Xtensa enabled Rust channel](https://github.com/esp-rs/rust/). See instructions in the [RISC-V and Xtensa Targets section of the The Rust on ESP Book](https://docs.esp-rs.org/book/installation/riscv-and-xtensa.html).
27+
The targets can be built by installing the [Xtensa enabled Rust channel](https://github.com/esp-rs/rust/). See instructions in the [RISC-V and Xtensa Targets section of The Rust on ESP Book](https://docs.esp-rs.org/book/installation/riscv-and-xtensa.html).

0 commit comments

Comments
 (0)