1
Fork 0

migrate lib_features.rs to translateable diagnostics

This commit is contained in:
Nathan Stocks 2022-09-24 12:21:58 -06:00
parent 40d5f00e16
commit c457abee2e
3 changed files with 40 additions and 20 deletions

View file

@ -832,3 +832,23 @@ pub struct Layout {
pub span: Span,
pub layout_error: String,
}
#[derive(Diagnostic)]
#[diag(passes::feature_stable_twice, code = "E0711")]
pub struct FeatureStableTwice {
#[primary_span]
pub span: Span,
pub feature: Symbol,
pub since: Symbol,
pub prev_since: Symbol,
}
#[derive(Diagnostic)]
#[diag(passes::feature_previously_declared, code = "E0711")]
pub struct FeaturePreviouslyDeclared<'a, 'b> {
#[primary_span]
pub span: Span,
pub feature: Symbol,
pub declared: &'a str,
pub prev_declared: &'b str,
}