mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-28 18:43:01 +00:00
Back out "Fix a mistake in condition"
This backs out commit e5c38558f5.
This commit is contained in:
parent
55d3851820
commit
34d05b3bd0
2 changed files with 2 additions and 1 deletions
|
|
@ -550,7 +550,7 @@ pub fn record_literal_missing_fields(
|
|||
) -> Option<(VariantId, Vec<LocalFieldId>, /*has spread expr*/ bool)> {
|
||||
let (fields, has_spread_expr, has_ellipsis) = match expr {
|
||||
Expr::RecordLit { fields, spread, .. } => {
|
||||
(fields, !matches!(spread, Spread::Base(_)), matches!(spread, Spread::Yes))
|
||||
(fields, matches!(spread, Spread::Base(_)), matches!(spread, Spread::Yes))
|
||||
}
|
||||
_ => return None,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -202,6 +202,7 @@ fn check_impl(
|
|||
for def in defs {
|
||||
let (body, body_source_map) = db.body_with_source_map(def);
|
||||
let inference_result = db.infer(def);
|
||||
dbg!(&inference_result);
|
||||
|
||||
for (pat, mut ty) in inference_result.type_of_pat.iter() {
|
||||
if let Pat::Bind { id, .. } = body.pats[pat] {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue