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_interface/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_interface/src/errors.rs')
| -rw-r--r-- | compiler/rustc_interface/src/errors.rs | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/compiler/rustc_interface/src/errors.rs b/compiler/rustc_interface/src/errors.rs index 097640f26c1..f5135c78dc8 100644 --- a/compiler/rustc_interface/src/errors.rs +++ b/compiler/rustc_interface/src/errors.rs @@ -5,7 +5,7 @@ use std::io; use std::path::Path; #[derive(Diagnostic)] -#[diag(interface::ferris_identifier)] +#[diag(interface_ferris_identifier)] pub struct FerrisIdentifier { #[primary_span] pub spans: Vec<Span>, @@ -14,7 +14,7 @@ pub struct FerrisIdentifier { } #[derive(Diagnostic)] -#[diag(interface::emoji_identifier)] +#[diag(interface_emoji_identifier)] pub struct EmojiIdentifier { #[primary_span] pub spans: Vec<Span>, @@ -22,67 +22,67 @@ pub struct EmojiIdentifier { } #[derive(Diagnostic)] -#[diag(interface::mixed_bin_crate)] +#[diag(interface_mixed_bin_crate)] pub struct MixedBinCrate; #[derive(Diagnostic)] -#[diag(interface::mixed_proc_macro_crate)] +#[diag(interface_mixed_proc_macro_crate)] pub struct MixedProcMacroCrate; #[derive(Diagnostic)] -#[diag(interface::proc_macro_doc_without_arg)] +#[diag(interface_proc_macro_doc_without_arg)] pub struct ProcMacroDocWithoutArg; #[derive(Diagnostic)] -#[diag(interface::error_writing_dependencies)] +#[diag(interface_error_writing_dependencies)] pub struct ErrorWritingDependencies<'a> { pub path: &'a Path, pub error: io::Error, } #[derive(Diagnostic)] -#[diag(interface::input_file_would_be_overwritten)] +#[diag(interface_input_file_would_be_overwritten)] pub struct InputFileWouldBeOverWritten<'a> { pub path: &'a Path, } #[derive(Diagnostic)] -#[diag(interface::generated_file_conflicts_with_directory)] +#[diag(interface_generated_file_conflicts_with_directory)] pub struct GeneratedFileConflictsWithDirectory<'a> { pub input_path: &'a Path, pub dir_path: &'a Path, } #[derive(Diagnostic)] -#[diag(interface::temps_dir_error)] +#[diag(interface_temps_dir_error)] pub struct TempsDirError; #[derive(Diagnostic)] -#[diag(interface::out_dir_error)] +#[diag(interface_out_dir_error)] pub struct OutDirError; #[derive(Diagnostic)] -#[diag(interface::cant_emit_mir)] +#[diag(interface_cant_emit_mir)] pub struct CantEmitMIR { pub error: io::Error, } #[derive(Diagnostic)] -#[diag(interface::rustc_error_fatal)] +#[diag(interface_rustc_error_fatal)] pub struct RustcErrorFatal { #[primary_span] pub span: Span, } #[derive(Diagnostic)] -#[diag(interface::rustc_error_unexpected_annotation)] +#[diag(interface_rustc_error_unexpected_annotation)] pub struct RustcErrorUnexpectedAnnotation { #[primary_span] pub span: Span, } #[derive(Diagnostic)] -#[diag(interface::failed_writing_file)] +#[diag(interface_failed_writing_file)] pub struct FailedWritingFile<'a> { pub path: &'a Path, pub error: io::Error, |
