mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 13:03:31 +00:00
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:
commit
02f761ba4b
4 changed files with 14 additions and 12 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
5
editors/code/README.md
Normal 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.
|
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue