diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-06-04 23:14:46 +0100 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-06-04 23:14:46 +0100 |
commit | 5deb907b4321d8328978d3322b0826b781814452 (patch) | |
tree | 2baa3b75b1ef62c02617c37ba9b800c41a3dd102 /crates/ra_ide_api/src/call_info.rs | |
parent | 8bd0e844247dc28d6ceb24b00f3cc3396bd5bf03 (diff) | |
parent | aa30c4909ebb1e85f1591f465c9e2875aa4d394e (diff) |
Merge #1374
1374: Implement `cargo lint` and fix some clippy errors r=alanhdu a=alanhdu
This creates a `cargo lint` command that runs clippy with certain lints disabled. I've also gone ahead and fixed some of the lint errors, although there are many more still to go.
cc #848
Co-authored-by: Alan Du <[email protected]>
Diffstat (limited to 'crates/ra_ide_api/src/call_info.rs')
-rw-r--r-- | crates/ra_ide_api/src/call_info.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/crates/ra_ide_api/src/call_info.rs b/crates/ra_ide_api/src/call_info.rs index 5d43282fd..bd08e183d 100644 --- a/crates/ra_ide_api/src/call_info.rs +++ b/crates/ra_ide_api/src/call_info.rs | |||
@@ -21,8 +21,7 @@ pub(crate) fn call_info(db: &RootDatabase, position: FilePosition) -> Option<Cal | |||
21 | let function = match calling_node { | 21 | let function = match calling_node { |
22 | FnCallNode::CallExpr(expr) => { | 22 | FnCallNode::CallExpr(expr) => { |
23 | //FIXME: apply subst | 23 | //FIXME: apply subst |
24 | let (callable_def, _subst) = | 24 | let (callable_def, _subst) = analyzer.type_of(db, expr.expr()?)?.as_callable()?; |
25 | analyzer.type_of(db, expr.expr()?.into())?.as_callable()?; | ||
26 | match callable_def { | 25 | match callable_def { |
27 | hir::CallableDef::Function(it) => it, | 26 | hir::CallableDef::Function(it) => it, |
28 | //FIXME: handle other callables | 27 | //FIXME: handle other callables |
@@ -64,7 +63,7 @@ pub(crate) fn call_info(db: &RootDatabase, position: FilePosition) -> Option<Cal | |||
64 | 63 | ||
65 | // If we are in a method account for `self` | 64 | // If we are in a method account for `self` |
66 | if has_self { | 65 | if has_self { |
67 | param = param + 1; | 66 | param += 1; |
68 | } | 67 | } |
69 | 68 | ||
70 | call_info.active_parameter = Some(param); | 69 | call_info.active_parameter = Some(param); |