1
Fork 0

Move existing diagnostic struct to a new errors module

This commit is contained in:
Giacomo Stevanato 2022-08-20 18:30:49 +02:00
parent ee8c31e64d
commit e4403ae9ff
3 changed files with 22 additions and 19 deletions

View file

@ -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,
}