mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 20:09:19 +00:00
Replace HasSource usages with Semantics equivalent
This commit is contained in:
parent
c3148cb396
commit
2f8dd64830
4 changed files with 17 additions and 17 deletions
|
@ -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>>;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue