mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +00:00
fold ScopeWithSyntax into SourceAnalyzer
This commit is contained in:
parent
30481808fb
commit
f4a94e74bc
7 changed files with 159 additions and 193 deletions
|
@ -16,7 +16,7 @@ use crate::{
|
|||
};
|
||||
use crate::{ path::GenericArgs, ty::primitive::{IntTy, UncertainIntTy, FloatTy, UncertainFloatTy}};
|
||||
|
||||
pub use self::scope::{ExprScopes, ScopesWithSourceMap, ScopeEntryWithSyntax};
|
||||
pub use self::scope::{ExprScopes, ScopeEntryWithSyntax};
|
||||
|
||||
pub(crate) mod scope;
|
||||
|
||||
|
@ -93,7 +93,7 @@ pub fn resolver_for_scope(
|
|||
) -> Resolver {
|
||||
let mut r = body.owner.resolver(db);
|
||||
let scopes = db.expr_scopes(body.owner);
|
||||
let scope_chain = scopes.scope_chain_for(scope_id).collect::<Vec<_>>();
|
||||
let scope_chain = scopes.scope_chain(scope_id).collect::<Vec<_>>();
|
||||
for scope in scope_chain.into_iter().rev() {
|
||||
r = r.push_expr_scope(Arc::clone(&scopes), scope);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue