diff --git a/compiler/rustc_attr_parsing/src/attributes/codegen_attrs.rs b/compiler/rustc_attr_parsing/src/attributes/codegen_attrs.rs index a8db114129ffd..652a783de3227 100644 --- a/compiler/rustc_attr_parsing/src/attributes/codegen_attrs.rs +++ b/compiler/rustc_attr_parsing/src/attributes/codegen_attrs.rs @@ -169,7 +169,7 @@ impl SingleAttributeParser for RustcObjcClassParser { return None; }; let Some(classname) = nv.value_as_str() else { - // `#[rustc_objc_class = ...]` is expected to be used as an implementatioin detail + // `#[rustc_objc_class = ...]` is expected to be used as an implementation detail // inside a standard library macro, but `cx.expected_string_literal` exposes too much. // Use a custom error message instead. cx.emit_err(ObjcClassExpectedStringLiteral { span: nv.value_span }); @@ -201,7 +201,7 @@ impl SingleAttributeParser for RustcObjcSelectorParser { return None; }; let Some(methname) = nv.value_as_str() else { - // `#[rustc_objc_selector = ...]` is expected to be used as an implementatioin detail + // `#[rustc_objc_selector = ...]` is expected to be used as an implementation detail // inside a standard library macro, but `cx.expected_string_literal` exposes too much. // Use a custom error message instead. cx.emit_err(ObjcSelectorExpectedStringLiteral { span: nv.value_span }); diff --git a/compiler/rustc_codegen_ssa/src/mir/mod.rs b/compiler/rustc_codegen_ssa/src/mir/mod.rs index 1a0f66d31cca4..5c14d6f2c0930 100644 --- a/compiler/rustc_codegen_ssa/src/mir/mod.rs +++ b/compiler/rustc_codegen_ssa/src/mir/mod.rs @@ -437,7 +437,7 @@ fn arg_local_refs<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>( assert_eq!( None, num_untupled.replace(tupled_arg_tys.len()), - "Replaced existing num_tupled" + "Replaced existing num_untupled" ); return LocalRef::Place(place); diff --git a/compiler/rustc_hir/src/def.rs b/compiler/rustc_hir/src/def.rs index 3959ee7f94128..21abb5506fcc6 100644 --- a/compiler/rustc_hir/src/def.rs +++ b/compiler/rustc_hir/src/def.rs @@ -192,7 +192,7 @@ pub enum DefKind { /// These are all represented with the same `ExprKind::Closure` in the AST and HIR, /// which makes it difficult to distinguish these during def collection. Therefore, /// we treat them all the same, and code which needs to distinguish them can match - /// or `hir::ClosureKind` or `type_of`. + /// on `hir::ClosureKind` or `type_of`. Closure, /// The definition of a synthetic coroutine body created by the lowering of a /// coroutine-closure, such as an async closure. diff --git a/compiler/rustc_hir/src/target.rs b/compiler/rustc_hir/src/target.rs index dd685c44ec477..07c33eb935f21 100644 --- a/compiler/rustc_hir/src/target.rs +++ b/compiler/rustc_hir/src/target.rs @@ -1,8 +1,4 @@ -//! This module implements some validity checks for attributes. -//! In particular it verifies that `#[inline]` and `#[repr]` attributes are -//! attached to items that actually support them and if there are -//! conflicts between multiple such attributes attached to the same -//! item. +//! This module lists attribute targets, with conversions from other types. use std::fmt::{self, Display}; diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs index b674c6e29d424..b584d14b0c9ff 100644 --- a/src/tools/compiletest/src/runtest.rs +++ b/src/tools/compiletest/src/runtest.rs @@ -2121,7 +2121,7 @@ impl<'test> TestCx<'test> { } /// Prints a message to (captured) stdout if `config.verbose` is true. - /// The message is also logged to `tracing::debug!` regardles of verbosity. + /// The message is also logged to `tracing::debug!` regardless of verbosity. /// /// Use `format_args!` as the argument to perform formatting if required. fn logv(&self, message: impl fmt::Display) { @@ -2748,7 +2748,7 @@ impl<'test> TestCx<'test> { return CompareOutcome::Same; } if expected_lines.is_empty() { - // if we have no lines to check, force a full overwite + // if we have no lines to check, force a full overwrite ("", actual) } else { // this prints/blesses the subset, not the actual diff --git a/tests/ui/README.md b/tests/ui/README.md index b6e6557088922..c14cbd9b43874 100644 --- a/tests/ui/README.md +++ b/tests/ui/README.md @@ -133,7 +133,7 @@ Runtime panics and error handling generate backtraces to assist in debugging and This directory was originally meant to contain tests related to time complexity and benchmarking. -However, only a single test was ever added to this category: https://github.com/rust-lang/rust/pull/32062 +However, only a single test was ever added to this category: **FIXME**: It is also unclear what would happen were this test to "fail" - would it cause the test suite to remain stuck on this test for a much greater duration than normal? @@ -694,9 +694,7 @@ This test category revolves around trait objects with `Sized` having illegal ope Tests on lifetime elision in impl function signatures. See [Lifetime elision | Nomicon](https://doc.rust-lang.org/nomicon/lifetime-elision.html). ## `tests/ui/impl-restriction/` -Tests for `#![feature(impl_restriction)]`. See [Tracking issue for restrictions #105077 -](https://github.com/rust-lang/rust/issues/105077). - +Tests for `#![feature(impl_restriction)]`. See [Tracking issue for restrictions #105077](https://github.com/rust-lang/rust/issues/105077). ## `tests/ui/impl-trait/` @@ -796,8 +794,7 @@ See [Type Layout | Reference](https://doc.rust-lang.org/reference/type-layout.ht ## `tests/ui/lazy-type-alias/` -Tests for `#![feature(lazy_type_alias)]`. See [Tracking issue for lazy type aliases #112792 -](https://github.com/rust-lang/rust/issues/112792). +Tests for `#![feature(lazy_type_alias)]`. See [Tracking issue for lazy type aliases #112792](https://github.com/rust-lang/rust/issues/112792). ## `tests/ui/lazy-type-alias-impl-trait/` @@ -852,7 +849,7 @@ See: Tests exercising analysis for unused variables, unreachable statements, functions which are supposed to return a value but do not, as well as values moved elsewhere before they could be used by a function. -**FIXME**: This seems unrelated to "liveness" as defined in the rustc compiler guide. Is this misleadingly named? https://rustc-dev-guide.rust-lang.org/borrow_check/region_inference/lifetime_parameters.html#liveness-and-universal-regions +**FIXME**: This seems unrelated to "liveness" as defined in the rustc compiler guide. Is this misleadingly named? ## `tests/ui/loop-match` diff --git a/typos.toml b/typos.toml index 3c95a45d572d5..82e2b98f2e49c 100644 --- a/typos.toml +++ b/typos.toml @@ -20,6 +20,7 @@ extend-exclude = [ # right now. Entries should look like `mipsel = "mipsel"`. # # tidy-alphabetical-start +anser = "anser" # an ANSI parsing package used by rust-analyzer arange = "arange" # short for A-range childs = "childs" clonable = "clonable" @@ -29,10 +30,12 @@ makro = "makro" # deliberate misspelling to avoid `macro` keyword misformed = "misformed" moreso = "moreso" numer = "numer" # short for numerator, not a typo for "number" +old-skool = "old-skool" # variant spelling of "old-school" optin = "optin" # short for opt-in publically = "publically" rplace = "rplace" # short for R-place splitted = "splitted" +sythetic = "sythetic" # typo in vendored LLVM sources taits = "taits" # lowercase for TAITs (type alias impl trait) targetting = "targetting" unparseable = "unparseable"