Add translatable diagnostic for invalid imports

This commit is contained in:
Tom Martin 2023-06-18 09:14:25 +01:00
parent 8fa9003621
commit 50c971a0b7
No known key found for this signature in database
GPG key ID: 73A733F9629F5AC5
3 changed files with 16 additions and 5 deletions

View file

@ -605,3 +605,11 @@ pub(crate) struct ChangeImportBindingSuggestion {
pub(crate) span: Span,
pub(crate) suggestion: String,
}
#[derive(Diagnostic)]
#[diag(resolve_imports_cannot_refer_to)]
pub(crate) struct ImportsCannotReferTo<'a> {
#[primary_span]
pub(crate) span: Span,
pub(crate) what: &'a str,
}