mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 06:11:35 +00:00
Sketching the resolver API
This commit is contained in:
parent
2b5c226e86
commit
5208c2aa93
8 changed files with 134 additions and 11 deletions
|
@ -5,14 +5,12 @@ use ra_syntax::ast::{self, NameOwner};
|
|||
use crate::{
|
||||
HirDatabase, Name, AsName, Function, FnSignature,
|
||||
type_ref::{TypeRef, Mutability},
|
||||
expr::Body, PersistentHirDatabase,
|
||||
PersistentHirDatabase,
|
||||
impl_block::ImplBlock,
|
||||
};
|
||||
|
||||
impl Function {
|
||||
pub(crate) fn body(&self, db: &impl HirDatabase) -> Arc<Body> {
|
||||
db.body_hir(*self)
|
||||
}
|
||||
// TODO impl_block should probably also be part of the code model API?
|
||||
|
||||
/// The containing impl block, if this is a method.
|
||||
pub(crate) fn impl_block(&self, db: &impl HirDatabase) -> Option<ImplBlock> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue