Don't expose impl details of SyntaxPtr
This commit is contained in:
@@ -22,10 +22,8 @@ use crate::{db::AstDatabase, InFile};
|
||||
|
||||
pub trait Diagnostic: Any + Send + Sync + fmt::Debug + 'static {
|
||||
fn message(&self) -> String;
|
||||
fn highlight_range(&self) -> TextRange;
|
||||
fn source(&self) -> InFile<SyntaxNodePtr>;
|
||||
fn highlight_range(&self) -> TextRange {
|
||||
self.source().value.range()
|
||||
}
|
||||
fn as_any(&self) -> &(dyn Any + Send + 'static);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user