mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 11:59:49 +00:00
Diagnose unimplemented built-in macros
This commit is contained in:
parent
06b301e2f8
commit
cb5454db86
6 changed files with 87 additions and 18 deletions
|
|
@ -227,3 +227,27 @@ impl Diagnostic for MacroError {
|
|||
true
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct UnimplementedBuiltinMacro {
|
||||
pub file: HirFileId,
|
||||
pub node: SyntaxNodePtr,
|
||||
}
|
||||
|
||||
impl Diagnostic for UnimplementedBuiltinMacro {
|
||||
fn code(&self) -> DiagnosticCode {
|
||||
DiagnosticCode("unimplemented-builtin-macro")
|
||||
}
|
||||
|
||||
fn message(&self) -> String {
|
||||
"unimplemented built-in macro".to_string()
|
||||
}
|
||||
|
||||
fn display_source(&self) -> InFile<SyntaxNodePtr> {
|
||||
InFile::new(self.file, self.node.clone())
|
||||
}
|
||||
|
||||
fn as_any(&self) -> &(dyn Any + Send + 'static) {
|
||||
self
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue