Skip to content

Fix some typos in comments #124058

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compiler/rustc_hir_analysis/src/collect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -992,7 +992,7 @@ fn lower_variant(
.inspect(|f| {
has_unnamed_fields |= f.ident.name == kw::Underscore;
// We only check named ADT here because anonymous ADTs are checked inside
// the nammed ADT in which they are defined.
// the named ADT in which they are defined.
if !is_anonymous {
field_uniqueness_check_ctx.check_field(f);
}
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/src/core/build_steps/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ pub struct Std {
/// This shouldn't be used from other steps; see the comment on [`Rustc`].
crates: Vec<String>,
/// When using download-rustc, we need to use a new build of `std` for running unit tests of Std itself,
/// 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.
/// 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.
force_recompile: bool,
extra_rust_args: &'static [&'static str],
is_for_mir_opt_tests: bool,
Expand Down
2 changes: 1 addition & 1 deletion src/doc/rustdoc/src/lints.md
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ warning: 1 warning emitted

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

```rust
#![warn(rustdoc::redundant_explicit_links)] // note: unnecessary - warns by default.
Expand Down
2 changes: 1 addition & 1 deletion src/librustdoc/lint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ declare_rustdoc_lint! {

declare_rustdoc_lint! {
/// This lint is **warn-by-default**. It detects explicit links that are the same
/// as computed automatic links. This usually means the explicit links are removeable.
/// as computed automatic links. This usually means the explicit links are removable.
/// This is a `rustdoc` only lint, see the documentation in the [rustdoc book].
///
/// [rustdoc book]: ../../../rustdoc/lints.html#redundant_explicit_links
Expand Down
2 changes: 1 addition & 1 deletion src/librustdoc/passes/collect_intra_doc_links.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1420,7 +1420,7 @@ impl LinkCollector<'_, '_> {
//
// Otherwise, check if 2 links are same, if so, skip the resolve process.
//
// Notice that this algorithm is passive, might possibly miss actual redudant cases.
// Notice that this algorithm is passive, might possibly miss actual redundant cases.
let explicit_link = explicit_link.to_string();
let display_text = ori_link.display_text.as_ref().unwrap();

Expand Down
2 changes: 1 addition & 1 deletion src/rustdoc-json-types/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ pub enum StructKind {
/// All [`Id`]'s will point to [`ItemEnum::StructField`]. Private and
/// `#[doc(hidden)]` fields will be given as `None`
Tuple(Vec<Option<Id>>),
/// A struct with nammed fields.
/// A struct with named fields.
///
/// ```rust
/// pub struct PlainStruct { x: i32 }
Expand Down
4 changes: 2 additions & 2 deletions tests/ui/lto/issue-105637.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
//
// That manifested as both `rustc_driver` and rustc's "main" (`compiler/rustc`) having their own
// `std::panicking::HOOK` static, and the hook in rustc's main (the default stdlib's) being executed
// when rustc ICEs, instead of the overriden hook from `rustc_driver` (which also displays the query
// stack and information on how to open a GH issue for the encountered ICE).
// when rustc ICEs, instead of the overridden hook from `rustc_driver` (which also displays the
// query stack and information on how to open a GH issue for the encountered ICE).
//
// In this test, we reproduce this setup by installing a panic hook in both the main and an LTOed
// dylib: the last hook set should be the one being executed, the dylib's.
Expand Down