From 65864d85f992300bad3913438a542af1bd736a24 Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Sat, 19 Jan 2019 19:47:56 +0100 Subject: 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. --- crates/ra_hir/src/ty.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'crates/ra_hir/src/ty.rs') 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; use crate::{ Module, Function, Struct, StructField, Enum, EnumVariant, Path, Name, ImplBlock, - FnSignature, FnScopes, ModuleDef, AdtDef, + FnSignature, ExprScopes, ModuleDef, AdtDef, db::HirDatabase, type_ref::{TypeRef, Mutability}, name::KnownName, @@ -814,7 +814,7 @@ impl Index for InferenceResult { struct InferenceContext<'a, D: HirDatabase> { db: &'a D, body: Arc, - scopes: Arc, + scopes: Arc, module: Module, impl_block: Option, var_unification_table: InPlaceUnificationTable, @@ -908,7 +908,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> { fn new( db: &'a D, body: Arc, - scopes: Arc, + scopes: Arc, module: Module, impl_block: Option, ) -> Self { @@ -1720,7 +1720,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> { pub fn infer(db: &impl HirDatabase, func: Function) -> Arc { db.check_canceled(); let body = func.body(db); - let scopes = db.fn_scopes(func); + let scopes = db.expr_scopes(func); let module = func.module(db); let impl_block = func.impl_block(db); let mut ctx = InferenceContext::new(db, body, scopes, module, impl_block); -- cgit v1.2.3