diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-10-15 18:55:03 +0100 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-10-15 18:55:03 +0100 |
commit | e929355eca10b1d8d4e55ddd41549d5bf0a685aa (patch) | |
tree | 872ab3701dcd27207fab5531269a66d205c74539 /crates/ra_editor/src/scope | |
parent | a230b438e025c5878b8d17e11d3928cbad95bb28 (diff) | |
parent | 9a98d8e99acf8acd40b2153847a37551d2a8d0f4 (diff) |
Merge #129
129: 2018 r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_editor/src/scope')
-rw-r--r-- | crates/ra_editor/src/scope/fn_scope.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_editor/src/scope/fn_scope.rs b/crates/ra_editor/src/scope/fn_scope.rs index 9a48bda02..99d698b60 100644 --- a/crates/ra_editor/src/scope/fn_scope.rs +++ b/crates/ra_editor/src/scope/fn_scope.rs | |||
@@ -174,7 +174,7 @@ fn compute_expr_scopes(expr: ast::Expr, scopes: &mut FnScopes, scope: ScopeId) { | |||
174 | } | 174 | } |
175 | } | 175 | } |
176 | ast::Expr::LambdaExpr(e) => { | 176 | ast::Expr::LambdaExpr(e) => { |
177 | let mut scope = scopes.new_scope(scope); | 177 | let scope = scopes.new_scope(scope); |
178 | scopes.add_params_bindings(scope, e.param_list()); | 178 | scopes.add_params_bindings(scope, e.param_list()); |
179 | if let Some(body) = e.body() { | 179 | if let Some(body) = e.body() { |
180 | scopes.set_scope(body.syntax(), scope); | 180 | scopes.set_scope(body.syntax(), scope); |
@@ -256,7 +256,7 @@ pub fn resolve_local_name<'a>(name_ref: ast::NameRef, scopes: &'a FnScopes) -> O | |||
256 | mod tests { | 256 | mod tests { |
257 | use super::*; | 257 | use super::*; |
258 | use ra_syntax::File; | 258 | use ra_syntax::File; |
259 | use {find_node_at_offset, test_utils::extract_offset}; | 259 | use crate::{find_node_at_offset, test_utils::extract_offset}; |
260 | 260 | ||
261 | fn do_check(code: &str, expected: &[&str]) { | 261 | fn do_check(code: &str, expected: &[&str]) { |
262 | let (off, code) = extract_offset(code); | 262 | let (off, code) = extract_offset(code); |