diff --git a/compiler/rustc_codegen_llvm/src/errors.rs b/compiler/rustc_codegen_llvm/src/errors.rs index 23fa05f3d02f..20eba352bc41 100644 --- a/compiler/rustc_codegen_llvm/src/errors.rs +++ b/compiler/rustc_codegen_llvm/src/errors.rs @@ -214,5 +214,5 @@ pub(crate) struct FixedX18InvalidArch<'a> { } #[derive(Diagnostic)] -#[diag("`-Zsanitizer-kcfi-arity` requires LLVM 21.0.0 or later.")] +#[diag("`-Zsanitizer-kcfi-arity` requires LLVM 21.0.0 or later")] pub(crate) struct SanitizerKcfiArityRequiresLLVM2100; diff --git a/compiler/rustc_codegen_ssa/src/errors.rs b/compiler/rustc_codegen_ssa/src/errors.rs index 742e05973ee5..82a6525adcc9 100644 --- a/compiler/rustc_codegen_ssa/src/errors.rs +++ b/compiler/rustc_codegen_ssa/src/errors.rs @@ -59,7 +59,7 @@ pub(crate) struct MissingQueryDepGraph { #[derive(Diagnostic)] #[diag( - "found malformed codegen unit name `{$user_path}`. codegen units names must always start with the name of the crate (`{$crate_name}` in this case)." + "found malformed codegen unit name `{$user_path}`. codegen units names must always start with the name of the crate (`{$crate_name}` in this case)" )] pub(crate) struct MalformedCguName { #[primary_span] @@ -562,12 +562,12 @@ pub(crate) struct SelfContainedLinkerMissing; #[derive(Diagnostic)] #[diag( - "please ensure that Visual Studio 2017 or later, or Build Tools for Visual Studio were installed with the Visual C++ option." + "please ensure that Visual Studio 2017 or later, or Build Tools for Visual Studio were installed with the Visual C++ option" )] pub(crate) struct CheckInstalledVisualStudio; #[derive(Diagnostic)] -#[diag("VS Code is a different product, and is not sufficient.")] +#[diag("VS Code is a different product, and is not sufficient")] pub(crate) struct InsufficientVSCodeProduct; #[derive(Diagnostic)] @@ -610,13 +610,13 @@ pub(crate) struct LinkerFileStem; #[derive(Diagnostic)] #[diag( - "link against the following native artifacts when linking against this static library. The order and any duplication can be significant on some platforms." + "link against the following native artifacts when linking against this static library. The order and any duplication can be significant on some platforms" )] pub(crate) struct StaticLibraryNativeArtifacts; #[derive(Diagnostic)] #[diag( - "native artifacts to link against have been written to {$path}. The order and any duplication can be significant on some platforms." + "native artifacts to link against have been written to {$path}. The order and any duplication can be significant on some platforms" )] pub(crate) struct StaticLibraryNativeArtifactsToFile<'a> { pub path: &'a Path, diff --git a/compiler/rustc_const_eval/src/errors.rs b/compiler/rustc_const_eval/src/errors.rs index 39f98b844920..3b49dbd907c8 100644 --- a/compiler/rustc_const_eval/src/errors.rs +++ b/compiler/rustc_const_eval/src/errors.rs @@ -309,7 +309,7 @@ pub(crate) struct UnallowedHeapAllocations { pub span: Span, pub kind: ConstContext, #[note( - "The runtime heap is not yet available at compile-time, so no runtime heap allocations can be created." + "the runtime heap is not yet available at compile-time, so no runtime heap allocations can be created" )] pub teach: bool, } @@ -347,7 +347,7 @@ pub(crate) struct InteriorMutableBorrowEscaping { #[diag("constant evaluation is taking a long time")] #[note( "this lint makes sure the compiler doesn't get stuck due to infinite loops in const eval. - If your compilation actually takes a long time, you can safely allow the lint." + If your compilation actually takes a long time, you can safely allow the lint" )] pub struct LongRunning { #[help("the constant being evaluated")] diff --git a/compiler/rustc_driver_impl/src/session_diagnostics.rs b/compiler/rustc_driver_impl/src/session_diagnostics.rs index 565c176645de..97972185ebc4 100644 --- a/compiler/rustc_driver_impl/src/session_diagnostics.rs +++ b/compiler/rustc_driver_impl/src/session_diagnostics.rs @@ -51,7 +51,7 @@ pub(crate) struct RlinkCorruptFile<'a> { } #[derive(Diagnostic)] -#[diag("the compiler unexpectedly panicked. this is a bug.")] +#[diag("the compiler unexpectedly panicked. This is a bug")] pub(crate) struct Ice; #[derive(Diagnostic)] diff --git a/compiler/rustc_hir_typeck/src/errors.rs b/compiler/rustc_hir_typeck/src/errors.rs index 0f330c3021c0..a5de1014dd7a 100644 --- a/compiler/rustc_hir_typeck/src/errors.rs +++ b/compiler/rustc_hir_typeck/src/errors.rs @@ -1145,7 +1145,7 @@ pub(crate) struct CastThinPointerToWidePointer<'tcx> { pub expr_ty: Ty<'tcx>, pub cast_ty: Ty<'tcx>, #[note( - "Thin pointers are \"simple\" pointers: they are purely a reference to a + "thin pointers are \"simple\" pointers: they are purely a reference to a memory address. Wide pointers are pointers referencing \"Dynamically Sized Types\" (also diff --git a/compiler/rustc_incremental/src/errors.rs b/compiler/rustc_incremental/src/errors.rs index 9b33b49d4406..3354689d0ca3 100644 --- a/compiler/rustc_incremental/src/errors.rs +++ b/compiler/rustc_incremental/src/errors.rs @@ -281,7 +281,7 @@ pub(crate) struct DeleteWorkProduct<'a> { #[derive(Diagnostic)] #[diag( - "corrupt incremental compilation artifact found at `{$path}`. This file will automatically be ignored and deleted. If you see this message repeatedly or can provoke it without manually manipulating the compiler's artifacts, please file an issue. The incremental compilation system relies on hardlinks and filesystem locks behaving correctly, and may not deal well with OS crashes, so whatever information you can provide about your filesystem or other state may be very relevant." + "corrupt incremental compilation artifact found at `{$path}`. This file will automatically be ignored and deleted. If you see this message repeatedly or can provoke it without manually manipulating the compiler's artifacts, please file an issue. The incremental compilation system relies on hardlinks and filesystem locks behaving correctly, and may not deal well with OS crashes, so whatever information you can provide about your filesystem or other state may be very relevant" )] pub(crate) struct CorruptFile<'a> { pub path: &'a Path, diff --git a/compiler/rustc_macros/src/diagnostics/message.rs b/compiler/rustc_macros/src/diagnostics/message.rs index 16ee3c657611..948cc9e93064 100644 --- a/compiler/rustc_macros/src/diagnostics/message.rs +++ b/compiler/rustc_macros/src/diagnostics/message.rs @@ -153,6 +153,7 @@ const ALLOWED_CAPITALIZED_WORDS: &[&str] = &[ "Ferris", "GCC", "MIR", + "NaNs", "OK", "VS", // tidy-alphabetical-end diff --git a/compiler/rustc_mir_build/src/errors.rs b/compiler/rustc_mir_build/src/errors.rs index f51e130ea47a..13d8211999e6 100644 --- a/compiler/rustc_mir_build/src/errors.rs +++ b/compiler/rustc_mir_build/src/errors.rs @@ -849,7 +849,7 @@ pub(crate) struct LowerRangeBoundMustBeLessThanOrEqualToUpper { #[label("lower bound larger than upper bound")] pub(crate) span: Span, #[note( - "When matching against a range, the compiler verifies that the range is non-empty. Range patterns include both end-points, so this is equivalent to requiring the start of the range to be less than or equal to the end of the range." + "when matching against a range, the compiler verifies that the range is non-empty. Range patterns include both end-points, so this is equivalent to requiring the start of the range to be less than or equal to the end of the range" )] pub(crate) teach: bool, }