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),
};