aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crates/ra_hir_def/src/path/lower.rs6
-rw-r--r--crates/ra_hir_ty/src/infer/pat.rs8
-rw-r--r--editors/code/README.md5
-rw-r--r--editors/code/package.json7
4 files changed, 14 insertions, 12 deletions
diff --git a/crates/ra_hir_def/src/path/lower.rs b/crates/ra_hir_def/src/path/lower.rs
index 0934520d7..4900000fe 100644
--- a/crates/ra_hir_def/src/path/lower.rs
+++ b/crates/ra_hir_def/src/path/lower.rs
@@ -101,11 +101,7 @@ pub(super) fn lower_path(mut path: ast::Path, hygiene: &Hygiene) -> Option<Path>
101 break; 101 break;
102 } 102 }
103 ast::PathSegmentKind::SuperKw => { 103 ast::PathSegmentKind::SuperKw => {
104 let nested_super_count = if let PathKind::Super(n) = kind { 104 let nested_super_count = if let PathKind::Super(n) = kind { n } else { 0 };
105 n
106 } else {
107 0
108 };
109 kind = PathKind::Super(nested_super_count + 1); 105 kind = PathKind::Super(nested_super_count + 1);
110 } 106 }
111 } 107 }
diff --git a/crates/ra_hir_ty/src/infer/pat.rs b/crates/ra_hir_ty/src/infer/pat.rs
index 623e52599..7a84e47f8 100644
--- a/crates/ra_hir_ty/src/infer/pat.rs
+++ b/crates/ra_hir_ty/src/infer/pat.rs
@@ -187,12 +187,8 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> {
187 } 187 }
188 Pat::Slice { prefix, slice: _slice, suffix } => { 188 Pat::Slice { prefix, slice: _slice, suffix } => {
189 let (container_ty, elem_ty) = match &expected { 189 let (container_ty, elem_ty) = match &expected {
190 ty_app!(TypeCtor::Array, st) => { 190 ty_app!(TypeCtor::Array, st) => (TypeCtor::Array, st.as_single().clone()),
191 (TypeCtor::Array, st.as_single().clone()) 191 ty_app!(TypeCtor::Slice, st) => (TypeCtor::Slice, st.as_single().clone()),
192 },
193 ty_app!(TypeCtor::Slice, st) => {
194 (TypeCtor::Slice, st.as_single().clone())
195 },
196 _ => (TypeCtor::Slice, Ty::Unknown), 192 _ => (TypeCtor::Slice, Ty::Unknown),
197 }; 193 };
198 194
diff --git a/editors/code/README.md b/editors/code/README.md
new file mode 100644
index 000000000..336695d9f
--- /dev/null
+++ b/editors/code/README.md
@@ -0,0 +1,5 @@
1# rust-analyzer
2
3Provides support for rust-analyzer: novel LSP server for the Rust programming language.
4
5See https://rust-analyzer.github.io/ for more information.
diff --git a/editors/code/package.json b/editors/code/package.json
index 862de3210..daccb31fb 100644
--- a/editors/code/package.json
+++ b/editors/code/package.json
@@ -12,8 +12,13 @@
12 "url": "https://github.com/rust-analyzer/rust-analyzer.git", 12 "url": "https://github.com/rust-analyzer/rust-analyzer.git",
13 "type": "git" 13 "type": "git"
14 }, 14 },
15 "homepage": "https://rust-analyzer.github.io/",
16 "license": "MIT OR Apache-2.0",
17 "keywords": [
18 "rust"
19 ],
15 "categories": [ 20 "categories": [
16 "Other" 21 "Programming Languages"
17 ], 22 ],
18 "engines": { 23 "engines": {
19 "vscode": "^1.42.0" 24 "vscode": "^1.42.0"