diff options
author | Florian Diebold <[email protected]> | 2019-01-19 18:47:56 +0000 |
---|---|---|
committer | Florian Diebold <[email protected]> | 2019-01-30 20:23:50 +0000 |
commit | 65864d85f992300bad3913438a542af1bd736a24 (patch) | |
tree | c2030da2bcd55fc1033a2c0602b7a9349c2dd702 /crates/ra_hir/src/ty.rs | |
parent | c65e6cdcb3d603ce7c0943785f7140662022c54a (diff) |
Rename FnScopes -> ExprScopes
The reason for this is that it describes scopes for any body expression, not
just that of a function. It did not actually refer to functions at all anymore.
Diffstat (limited to 'crates/ra_hir/src/ty.rs')
-rw-r--r-- | crates/ra_hir/src/ty.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_hir/src/ty.rs b/crates/ra_hir/src/ty.rs index 7a5485698..0472414a6 100644 --- a/crates/ra_hir/src/ty.rs +++ b/crates/ra_hir/src/ty.rs | |||
@@ -34,7 +34,7 @@ use test_utils::tested_by; | |||
34 | 34 | ||
35 | use crate::{ | 35 | use crate::{ |
36 | Module, Function, Struct, StructField, Enum, EnumVariant, Path, Name, ImplBlock, | 36 | Module, Function, Struct, StructField, Enum, EnumVariant, Path, Name, ImplBlock, |
37 | FnSignature, FnScopes, ModuleDef, AdtDef, | 37 | FnSignature, ExprScopes, ModuleDef, AdtDef, |
38 | db::HirDatabase, | 38 | db::HirDatabase, |
39 | type_ref::{TypeRef, Mutability}, | 39 | type_ref::{TypeRef, Mutability}, |
40 | name::KnownName, | 40 | name::KnownName, |
@@ -814,7 +814,7 @@ impl Index<PatId> for InferenceResult { | |||
814 | struct InferenceContext<'a, D: HirDatabase> { | 814 | struct InferenceContext<'a, D: HirDatabase> { |
815 | db: &'a D, | 815 | db: &'a D, |
816 | body: Arc<Body>, | 816 | body: Arc<Body>, |
817 | scopes: Arc<FnScopes>, | 817 | scopes: Arc<ExprScopes>, |
818 | module: Module, | 818 | module: Module, |
819 | impl_block: Option<ImplBlock>, | 819 | impl_block: Option<ImplBlock>, |
820 | var_unification_table: InPlaceUnificationTable<TypeVarId>, | 820 | var_unification_table: InPlaceUnificationTable<TypeVarId>, |
@@ -908,7 +908,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> { | |||
908 | fn new( | 908 | fn new( |
909 | db: &'a D, | 909 | db: &'a D, |
910 | body: Arc<Body>, | 910 | body: Arc<Body>, |
911 | scopes: Arc<FnScopes>, | 911 | scopes: Arc<ExprScopes>, |
912 | module: Module, | 912 | module: Module, |
913 | impl_block: Option<ImplBlock>, | 913 | impl_block: Option<ImplBlock>, |
914 | ) -> Self { | 914 | ) -> Self { |
@@ -1720,7 +1720,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> { | |||
1720 | pub fn infer(db: &impl HirDatabase, func: Function) -> Arc<InferenceResult> { | 1720 | pub fn infer(db: &impl HirDatabase, func: Function) -> Arc<InferenceResult> { |
1721 | db.check_canceled(); | 1721 | db.check_canceled(); |
1722 | let body = func.body(db); | 1722 | let body = func.body(db); |
1723 | let scopes = db.fn_scopes(func); | 1723 | let scopes = db.expr_scopes(func); |
1724 | let module = func.module(db); | 1724 | let module = func.module(db); |
1725 | let impl_block = func.impl_block(db); | 1725 | let impl_block = func.impl_block(db); |
1726 | let mut ctx = InferenceContext::new(db, body, scopes, module, impl_block); | 1726 | let mut ctx = InferenceContext::new(db, body, scopes, module, impl_block); |