Replace HasSource usages with Semantics equivalent

This commit is contained in:
Lukas Wirth 2022-01-14 10:59:27 +01:00
parent c3148cb396
commit 2f8dd64830
4 changed files with 17 additions and 17 deletions

View file

@ -16,6 +16,9 @@ use crate::{
pub trait HasSource {
type Ast;
/// Fetches the definition's source node.
/// Using [`crate::Semantics::source`] is preferred when working with [`crate::Semantics`],
/// as that caches the parsed file in the semantics' cache.
fn source(self, db: &dyn HirDatabase) -> Option<InFile<Self::Ast>>;
}