Skip to content

Commit 45df09b

Browse files
committed
Fix some typos in comments
Signed-off-by: TechVest <[email protected]>
1 parent b758149 commit 45df09b

File tree

7 files changed

+8
-8
lines changed

7 files changed

+8
-8
lines changed

compiler/rustc_hir_analysis/src/collect.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -992,7 +992,7 @@ fn lower_variant(
992992
.inspect(|f| {
993993
has_unnamed_fields |= f.ident.name == kw::Underscore;
994994
// We only check named ADT here because anonymous ADTs are checked inside
995-
// the nammed ADT in which they are defined.
995+
// the named ADT in which they are defined.
996996
if !is_anonymous {
997997
field_uniqueness_check_ctx.check_field(f);
998998
}

src/bootstrap/src/core/build_steps/compile.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ pub struct Std {
4343
/// This shouldn't be used from other steps; see the comment on [`Rustc`].
4444
crates: Vec<String>,
4545
/// When using download-rustc, we need to use a new build of `std` for running unit tests of Std itself,
46-
/// but we need to use the downloaded copy of std for linking to rustdoc. Allow this to be overriden by `builder.ensure` from other steps.
46+
/// but we need to use the downloaded copy of std for linking to rustdoc. Allow this to be overridden by `builder.ensure` from other steps.
4747
force_recompile: bool,
4848
extra_rust_args: &'static [&'static str],
4949
is_for_mir_opt_tests: bool,

src/doc/rustdoc/src/lints.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ warning: 1 warning emitted
417417

418418
This lint is **warn-by-default**. It detects explicit links that are the same
419419
as computed automatic links.
420-
This usually means the explicit links are removeable. For example:
420+
This usually means the explicit links are removable. For example:
421421

422422
```rust
423423
#![warn(rustdoc::redundant_explicit_links)] // note: unnecessary - warns by default.

src/librustdoc/lint.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ declare_rustdoc_lint! {
187187

188188
declare_rustdoc_lint! {
189189
/// This lint is **warn-by-default**. It detects explicit links that are the same
190-
/// as computed automatic links. This usually means the explicit links are removeable.
190+
/// as computed automatic links. This usually means the explicit links are removable.
191191
/// This is a `rustdoc` only lint, see the documentation in the [rustdoc book].
192192
///
193193
/// [rustdoc book]: ../../../rustdoc/lints.html#redundant_explicit_links

src/librustdoc/passes/collect_intra_doc_links.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1420,7 +1420,7 @@ impl LinkCollector<'_, '_> {
14201420
//
14211421
// Otherwise, check if 2 links are same, if so, skip the resolve process.
14221422
//
1423-
// Notice that this algorithm is passive, might possibly miss actual redudant cases.
1423+
// Notice that this algorithm is passive, might possibly miss actual redundant cases.
14241424
let explicit_link = explicit_link.to_string();
14251425
let display_text = ori_link.display_text.as_ref().unwrap();
14261426

src/rustdoc-json-types/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ pub enum StructKind {
314314
/// All [`Id`]'s will point to [`ItemEnum::StructField`]. Private and
315315
/// `#[doc(hidden)]` fields will be given as `None`
316316
Tuple(Vec<Option<Id>>),
317-
/// A struct with nammed fields.
317+
/// A struct with named fields.
318318
///
319319
/// ```rust
320320
/// pub struct PlainStruct { x: i32 }

tests/ui/lto/issue-105637.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
//
44
// That manifested as both `rustc_driver` and rustc's "main" (`compiler/rustc`) having their own
55
// `std::panicking::HOOK` static, and the hook in rustc's main (the default stdlib's) being executed
6-
// when rustc ICEs, instead of the overriden hook from `rustc_driver` (which also displays the query
7-
// stack and information on how to open a GH issue for the encountered ICE).
6+
// when rustc ICEs, instead of the overridden hook from `rustc_driver` (which also displays the
7+
// query stack and information on how to open a GH issue for the encountered ICE).
88
//
99
// In this test, we reproduce this setup by installing a panic hook in both the main and an LTOed
1010
// dylib: the last hook set should be the one being executed, the dylib's.

0 commit comments

Comments
 (0)