oxc/crates/oxc_semantic/src/diagnostics.rs
2023-04-27 21:51:15 +08:00

14 lines
386 B
Rust

use oxc_diagnostics::{
miette::{self, Diagnostic},
thiserror::{self, Error},
};
use oxc_span::{Atom, Span};
#[derive(Debug, Error, Diagnostic)]
#[error("Identifier `{0}` has already been declared")]
#[diagnostic()]
pub struct Redeclaration(
pub Atom,
#[label("`{0}` has already been declared here")] pub Span,
#[label("It can not be redeclared here")] pub Span,
);