mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-13 13:48:50 +00:00
Reformat?
This commit is contained in:
parent
cf23ca7719
commit
62e62d1c23
2 changed files with 3 additions and 11 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),
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue