3397: Minimal viable meta r=matklad a=matklad



bors r+
🤖

3398: Reformat? r=matklad a=matklad



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
bors[bot] 2020-03-02 13:31:56 +00:00 committed by GitHub
commit 02f761ba4b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 14 additions and 12 deletions

View file

@ -101,11 +101,7 @@ pub(super) fn lower_path(mut path: ast::Path, hygiene: &Hygiene) -> Option<Path>
break;
}
ast::PathSegmentKind::SuperKw => {
let nested_super_count = if let PathKind::Super(n) = kind {
n
} else {
0
};
let nested_super_count = if let PathKind::Super(n) = kind { n } else { 0 };
kind = PathKind::Super(nested_super_count + 1);
}
}

View file

@ -187,12 +187,8 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> {
}
Pat::Slice { prefix, slice: _slice, suffix } => {
let (container_ty, elem_ty) = match &expected {
ty_app!(TypeCtor::Array, st) => {
(TypeCtor::Array, st.as_single().clone())
},
ty_app!(TypeCtor::Slice, st) => {
(TypeCtor::Slice, st.as_single().clone())
},
ty_app!(TypeCtor::Array, st) => (TypeCtor::Array, st.as_single().clone()),
ty_app!(TypeCtor::Slice, st) => (TypeCtor::Slice, st.as_single().clone()),
_ => (TypeCtor::Slice, Ty::Unknown),
};

5
editors/code/README.md Normal file
View file

@ -0,0 +1,5 @@
# rust-analyzer
Provides support for rust-analyzer: novel LSP server for the Rust programming language.
See https://rust-analyzer.github.io/ for more information.

View file

@ -12,8 +12,13 @@
"url": "https://github.com/rust-analyzer/rust-analyzer.git",
"type": "git"
},
"homepage": "https://rust-analyzer.github.io/",
"license": "MIT OR Apache-2.0",
"keywords": [
"rust"
],
"categories": [
"Other"
"Programming Languages"
],
"engines": {
"vscode": "^1.42.0"