mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 22:31:43 +00:00
Sketching the resolver API
This commit is contained in:
parent
2b5c226e86
commit
5208c2aa93
8 changed files with 134 additions and 11 deletions
|
@ -10,15 +10,15 @@ use ra_syntax::{
|
|||
};
|
||||
|
||||
use crate::{
|
||||
Path, Name, Function,
|
||||
name::AsName, HirDatabase,
|
||||
Path, Name, HirDatabase, Function, Resolver,
|
||||
name::AsName,
|
||||
type_ref::{Mutability, TypeRef},
|
||||
};
|
||||
use crate::ty::primitive::{UintTy, UncertainIntTy, UncertainFloatTy};
|
||||
|
||||
pub use self::scope::{ExprScopes, ScopesWithSyntaxMapping, ScopeEntryWithSyntax};
|
||||
|
||||
mod scope;
|
||||
pub(crate) mod scope;
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||
pub struct ExprId(RawId);
|
||||
|
@ -62,6 +62,11 @@ impl Body {
|
|||
pub fn body_expr(&self) -> ExprId {
|
||||
self.body_expr
|
||||
}
|
||||
|
||||
#[allow(unused_variables)]
|
||||
pub fn resolver_for_expr(&self, expr_id: ExprId) -> Resolver {
|
||||
unimplemented!()
|
||||
}
|
||||
}
|
||||
|
||||
impl Index<ExprId> for Body {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue