pub trait HasSource {
type Value: AstNode;
// Required method
fn ast_ptr(&self, db: &dyn DefDatabase) -> InFile<AstPtr<Self::Value>>;
// Provided method
fn source(&self, db: &dyn DefDatabase) -> InFile<Self::Value> { ... }
}
pub trait HasSource {
type Value: AstNode;
// Required method
fn ast_ptr(&self, db: &dyn DefDatabase) -> InFile<AstPtr<Self::Value>>;
// Provided method
fn source(&self, db: &dyn DefDatabase) -> InFile<Self::Value> { ... }
}