From a87579500a2c35597071efd0ad6983927f0c1815 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 27 Nov 2019 17:46:02 +0300 Subject: Move Ty --- crates/ra_hir/src/source_binder.rs | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) (limited to 'crates/ra_hir/src/source_binder.rs') diff --git a/crates/ra_hir/src/source_binder.rs b/crates/ra_hir/src/source_binder.rs index 05f5bca57..76c493f1a 100644 --- a/crates/ra_hir/src/source_binder.rs +++ b/crates/ra_hir/src/source_binder.rs @@ -8,6 +8,10 @@ use std::sync::Arc; use hir_def::{ + body::{ + scope::{ExprScopes, ScopeId}, + BodySourceMap, + }, expr::{ExprId, PatId}, path::known, resolver::{self, resolver_for_scope, HasResolver, Resolver, TypeNs, ValueNs}, @@ -25,7 +29,6 @@ use ra_syntax::{ use crate::{ db::HirDatabase, - expr::{BodySourceMap, ExprScopes, ScopeId}, ty::{ method_resolution::{self, implements_trait}, InEnvironment, TraitEnvironment, Ty, @@ -91,7 +94,7 @@ pub struct SourceAnalyzer { body_owner: Option, body_source_map: Option>, infer: Option>, - scopes: Option>, + scopes: Option>, } #[derive(Debug, Clone, PartialEq, Eq)] @@ -455,21 +458,6 @@ impl SourceAnalyzer { macro_file_kind: to_macro_file_kind(macro_call.value), }) } - - #[cfg(test)] - pub(crate) fn body_source_map(&self) -> Arc { - self.body_source_map.clone().unwrap() - } - - #[cfg(test)] - pub(crate) fn inference_result(&self) -> Arc { - self.infer.clone().unwrap() - } - - #[cfg(test)] - pub(crate) fn analyzed_declaration(&self) -> Option { - self.body_owner - } } fn scope_for( -- cgit v1.2.3