diff options
| author | bors <bors@rust-lang.org> | 2022-10-23 09:06:39 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-10-23 09:06:39 +0000 |
| commit | e64f1110c062f61746f222059439529a43ccf6dc (patch) | |
| tree | f6deb949a3796b6fd79eef0a3745e2d9dcc1ae8c /compiler/rustc_session/src/errors.rs | |
| parent | faab68eb29121f25b577b50e2e00e33bafc60a36 (diff) | |
| parent | 6987322445d7388b61d6249204402574ee0308f5 (diff) | |
| download | rust-e64f1110c062f61746f222059439529a43ccf6dc.tar.gz rust-e64f1110c062f61746f222059439529a43ccf6dc.zip | |
Auto merge of #103345 - Nilstrieb:diag-flat, r=compiler-errors
Flatten diagnostic slug modules This makes it easier to grep for the slugs in the code. See https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/Localization.20infra.20interferes.20with.20grepping.20for.20error for more discussion about it. This was mostly done with a few regexes and a bunch of manual work. This also exposes a pretty annoying inconsistency for the extra labels. Some of the extra labels are defined as additional properties in the fluent message (which makes them not prefixed with the crate name) and some of them are new fluent messages themselves (which makes them prefixed with the crate name). I don't know whether we want to clean this up at some point but it's useful to know. r? `@davidtwco`
Diffstat (limited to 'compiler/rustc_session/src/errors.rs')
| -rw-r--r-- | compiler/rustc_session/src/errors.rs | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/compiler/rustc_session/src/errors.rs b/compiler/rustc_session/src/errors.rs index 500ab4a584c..bf542faec41 100644 --- a/compiler/rustc_session/src/errors.rs +++ b/compiler/rustc_session/src/errors.rs @@ -7,7 +7,7 @@ use rustc_span::{Span, Symbol}; use rustc_target::spec::{SplitDebuginfo, StackProtector, TargetTriple}; #[derive(Diagnostic)] -#[diag(session::incorrect_cgu_reuse_type)] +#[diag(session_incorrect_cgu_reuse_type)] pub struct IncorrectCguReuseType<'a> { #[primary_span] pub span: Span, @@ -18,14 +18,14 @@ pub struct IncorrectCguReuseType<'a> { } #[derive(Diagnostic)] -#[diag(session::cgu_not_recorded)] +#[diag(session_cgu_not_recorded)] pub struct CguNotRecorded<'a> { pub cgu_user_name: &'a str, pub cgu_name: &'a str, } #[derive(Diagnostic)] -#[diag(session::feature_gate_error, code = "E0658")] +#[diag(session_feature_gate_error, code = "E0658")] pub struct FeatureGateError<'a> { #[primary_span] pub span: MultiSpan, @@ -33,99 +33,99 @@ pub struct FeatureGateError<'a> { } #[derive(Subdiagnostic)] -#[note(session::feature_diagnostic_for_issue)] +#[note(session_feature_diagnostic_for_issue)] pub struct FeatureDiagnosticForIssue { pub n: NonZeroU32, } #[derive(Subdiagnostic)] -#[help(session::feature_diagnostic_help)] +#[help(session_feature_diagnostic_help)] pub struct FeatureDiagnosticHelp { pub feature: Symbol, } #[derive(Diagnostic)] -#[diag(session::not_circumvent_feature)] +#[diag(session_not_circumvent_feature)] pub struct NotCircumventFeature; #[derive(Diagnostic)] -#[diag(session::linker_plugin_lto_windows_not_supported)] +#[diag(session_linker_plugin_lto_windows_not_supported)] pub struct LinkerPluginToWindowsNotSupported; #[derive(Diagnostic)] -#[diag(session::profile_use_file_does_not_exist)] +#[diag(session_profile_use_file_does_not_exist)] pub struct ProfileUseFileDoesNotExist<'a> { pub path: &'a std::path::Path, } #[derive(Diagnostic)] -#[diag(session::profile_sample_use_file_does_not_exist)] +#[diag(session_profile_sample_use_file_does_not_exist)] pub struct ProfileSampleUseFileDoesNotExist<'a> { pub path: &'a std::path::Path, } #[derive(Diagnostic)] -#[diag(session::target_requires_unwind_tables)] +#[diag(session_target_requires_unwind_tables)] pub struct TargetRequiresUnwindTables; #[derive(Diagnostic)] -#[diag(session::sanitizer_not_supported)] +#[diag(session_sanitizer_not_supported)] pub struct SanitizerNotSupported { pub us: String, } #[derive(Diagnostic)] -#[diag(session::sanitizers_not_supported)] +#[diag(session_sanitizers_not_supported)] pub struct SanitizersNotSupported { pub us: String, } #[derive(Diagnostic)] -#[diag(session::cannot_mix_and_match_sanitizers)] +#[diag(session_cannot_mix_and_match_sanitizers)] pub struct CannotMixAndMatchSanitizers { pub first: String, pub second: String, } #[derive(Diagnostic)] -#[diag(session::cannot_enable_crt_static_linux)] +#[diag(session_cannot_enable_crt_static_linux)] pub struct CannotEnableCrtStaticLinux; #[derive(Diagnostic)] -#[diag(session::sanitizer_cfi_enabled)] +#[diag(session_sanitizer_cfi_enabled)] pub struct SanitizerCfiEnabled; #[derive(Diagnostic)] -#[diag(session::unstable_virtual_function_elimination)] +#[diag(session_unstable_virtual_function_elimination)] pub struct UnstableVirtualFunctionElimination; #[derive(Diagnostic)] -#[diag(session::unsupported_dwarf_version)] +#[diag(session_unsupported_dwarf_version)] pub struct UnsupportedDwarfVersion { pub dwarf_version: u32, } #[derive(Diagnostic)] -#[diag(session::target_stack_protector_not_supported)] +#[diag(session_target_stack_protector_not_supported)] pub struct StackProtectorNotSupportedForTarget<'a> { pub stack_protector: StackProtector, pub target_triple: &'a TargetTriple, } #[derive(Diagnostic)] -#[diag(session::split_debuginfo_unstable_platform)] +#[diag(session_split_debuginfo_unstable_platform)] pub struct SplitDebugInfoUnstablePlatform { pub debuginfo: SplitDebuginfo, } #[derive(Diagnostic)] -#[diag(session::file_is_not_writeable)] +#[diag(session_file_is_not_writeable)] pub struct FileIsNotWriteable<'a> { pub file: &'a std::path::Path, } #[derive(Diagnostic)] -#[diag(session::crate_name_does_not_match)] +#[diag(session_crate_name_does_not_match)] pub struct CrateNameDoesNotMatch<'a> { #[primary_span] pub span: Span, @@ -134,20 +134,20 @@ pub struct CrateNameDoesNotMatch<'a> { } #[derive(Diagnostic)] -#[diag(session::crate_name_invalid)] +#[diag(session_crate_name_invalid)] pub struct CrateNameInvalid<'a> { pub s: &'a str, } #[derive(Diagnostic)] -#[diag(session::crate_name_empty)] +#[diag(session_crate_name_empty)] pub struct CrateNameEmpty { #[primary_span] pub span: Option<Span>, } #[derive(Diagnostic)] -#[diag(session::invalid_character_in_create_name)] +#[diag(session_invalid_character_in_create_name)] pub struct InvalidCharacterInCrateName<'a> { #[primary_span] pub span: Option<Span>, @@ -156,7 +156,7 @@ pub struct InvalidCharacterInCrateName<'a> { } #[derive(Subdiagnostic)] -#[multipart_suggestion(session::expr_parentheses_needed, applicability = "machine-applicable")] +#[multipart_suggestion(session_expr_parentheses_needed, applicability = "machine-applicable")] pub struct ExprParenthesesNeeded { #[suggestion_part(code = "(")] pub left: Span, @@ -171,7 +171,7 @@ impl ExprParenthesesNeeded { } #[derive(Diagnostic)] -#[diag(session::skipping_const_checks)] +#[diag(session_skipping_const_checks)] pub struct SkippingConstChecks { #[subdiagnostic(eager)] pub unleashed_features: Vec<UnleashedFeatureHelp>, @@ -179,13 +179,13 @@ pub struct SkippingConstChecks { #[derive(Subdiagnostic)] pub enum UnleashedFeatureHelp { - #[help(session::unleashed_feature_help_named)] + #[help(session_unleashed_feature_help_named)] Named { #[primary_span] span: Span, gate: Symbol, }, - #[help(session::unleashed_feature_help_unnamed)] + #[help(session_unleashed_feature_help_unnamed)] Unnamed { #[primary_span] span: Span, |
