We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 4a2ceef + 7b418d3 commit 8769cd2Copy full SHA for 8769cd2
crates/hir/src/has_source.rs
@@ -21,6 +21,10 @@ pub trait HasSource {
21
/// Fetches the definition's source node.
22
/// Using [`crate::Semantics::source`] is preferred when working with [`crate::Semantics`],
23
/// as that caches the parsed file in the semantics' cache.
24
+ ///
25
+ /// The current some implementations can return `InFile` instead of `Option<InFile>`.
26
+ /// But we made this method `Option` to support rlib in the future
27
+ /// by https://github.com/rust-lang/rust-analyzer/issues/6913
28
fn source(self, db: &dyn HirDatabase) -> Option<InFile<Self::Ast>>;
29
}
30
0 commit comments