mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
rename
This commit is contained in:
parent
6c2ba945ed
commit
b6809b6695
10 changed files with 18 additions and 18 deletions
|
@ -66,7 +66,7 @@ pub use self::{
|
|||
adt::AdtDef,
|
||||
expr::{ExprScopes, ScopesWithSourceMap, ScopeEntryWithSyntax},
|
||||
resolve::{Resolver, Resolution},
|
||||
source_binder::{SourceAnalyser, PathResolution},
|
||||
source_binder::{SourceAnalyzer, PathResolution},
|
||||
};
|
||||
|
||||
pub use self::code_model_api::{
|
||||
|
|
|
@ -261,9 +261,9 @@ fn try_get_resolver_for_node(
|
|||
}
|
||||
}
|
||||
|
||||
// Name is bad, don't use inside HIR
|
||||
/// `SourceAnalyzer`
|
||||
#[derive(Debug)]
|
||||
pub struct SourceAnalyser {
|
||||
pub struct SourceAnalyzer {
|
||||
resolver: Resolver,
|
||||
body_source_map: Option<Arc<crate::expr::BodySourceMap>>,
|
||||
infer: Option<Arc<crate::ty::InferenceResult>>,
|
||||
|
@ -281,18 +281,18 @@ pub enum PathResolution {
|
|||
AssocItem(crate::ImplItem),
|
||||
}
|
||||
|
||||
impl SourceAnalyser {
|
||||
pub fn new(db: &impl HirDatabase, file_id: FileId, node: &SyntaxNode) -> SourceAnalyser {
|
||||
impl SourceAnalyzer {
|
||||
pub fn new(db: &impl HirDatabase, file_id: FileId, node: &SyntaxNode) -> SourceAnalyzer {
|
||||
let resolver = resolver_for_node(db, file_id, node);
|
||||
let function = function_from_child_node(db, file_id, node);
|
||||
if let Some(function) = function {
|
||||
SourceAnalyser {
|
||||
SourceAnalyzer {
|
||||
resolver,
|
||||
body_source_map: Some(function.body_source_map(db)),
|
||||
infer: Some(function.infer(db)),
|
||||
}
|
||||
} else {
|
||||
SourceAnalyser { resolver, body_source_map: None, infer: None }
|
||||
SourceAnalyzer { resolver, body_source_map: None, infer: None }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue