Move existing diagnostic struct to a new errors module
This commit is contained in:
parent
ee8c31e64d
commit
e4403ae9ff
3 changed files with 22 additions and 19 deletions
19
compiler/rustc_interface/src/errors.rs
Normal file
19
compiler/rustc_interface/src/errors.rs
Normal 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,
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue