From e4403ae9ff9ca9912fe80a5401c57c48fb979e5f Mon Sep 17 00:00:00 2001 From: Giacomo Stevanato Date: Sat, 20 Aug 2022 18:30:49 +0200 Subject: Move existing diagnostic struct to a new errors module --- compiler/rustc_interface/src/errors.rs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 compiler/rustc_interface/src/errors.rs (limited to 'compiler/rustc_interface/src/errors.rs') 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, + #[suggestion(code = "ferris", applicability = "maybe-incorrect")] + pub first_span: Span, +} + +#[derive(SessionDiagnostic)] +#[diag(interface::emoji_identifier)] +pub struct EmojiIdentifier { + #[primary_span] + pub spans: Vec, + pub ident: Symbol, +} -- cgit 1.4.1-3-g733a5