aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_editor/src/scope/fn_scope.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-10-15 18:05:26 +0100
committerAleksey Kladov <[email protected]>2018-10-15 18:05:26 +0100
commit1624bf2d7f8c60620830149ac2f88e94dfdb036e (patch)
treec92ef6d7811360c138830abd182ec3c4ce301cc2 /crates/ra_editor/src/scope/fn_scope.rs
parent94349206483ad78de71e1546d74a355bbdf764c4 (diff)
switch editor to 2018
Diffstat (limited to 'crates/ra_editor/src/scope/fn_scope.rs')
-rw-r--r--crates/ra_editor/src/scope/fn_scope.rs4
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
256mod tests { 256mod 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);