diff options
| author | Giacomo Stevanato <giaco.stevanato@gmail.com> | 2022-08-20 18:30:49 +0200 |
|---|---|---|
| committer | Giacomo Stevanato <giaco.stevanato@gmail.com> | 2022-08-22 13:17:36 +0200 |
| commit | e4403ae9ff9ca9912fe80a5401c57c48fb979e5f (patch) | |
| tree | e39d6b13706d86e71568bfa7095d263d3023c0d1 /compiler/rustc_interface/src/errors.rs | |
| parent | ee8c31e64d229cac4eba6d8f03bb70e16f34a14b (diff) | |
| download | rust-e4403ae9ff9ca9912fe80a5401c57c48fb979e5f.tar.gz rust-e4403ae9ff9ca9912fe80a5401c57c48fb979e5f.zip | |
Move existing diagnostic struct to a new errors module
Diffstat (limited to 'compiler/rustc_interface/src/errors.rs')
| -rw-r--r-- | compiler/rustc_interface/src/errors.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/compiler/rustc_interface/src/errors.rs b/compiler/rustc_interface/src/errors.rs new file mode 100644 index 00000000000..62456d76d71 --- /dev/null +++ b/compiler/rustc_interface/src/errors.rs @@ -0,0 +1,19 @@ +use rustc_macros::SessionDiagnostic; +use rustc_span::{Span, Symbol}; + +#[derive(SessionDiagnostic)] +#[diag(interface::ferris_identifier)] +pub struct FerrisIdentifier { + #[primary_span] + pub spans: Vec<Span>, + #[suggestion(code = "ferris", applicability = "maybe-incorrect")] + pub first_span: Span, +} + +#[derive(SessionDiagnostic)] +#[diag(interface::emoji_identifier)] +pub struct EmojiIdentifier { + #[primary_span] + pub spans: Vec<Span>, + pub ident: Symbol, +} |
