Skip to content

Commit ff2656d

Browse files
committed
Back out "Fix a mistake in condition"
This backs out commit e5c38558f5dbc37cbc91f9fda58144ce02e1f5aa.
1 parent a4e6556 commit ff2656d

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/tools/rust-analyzer/crates/hir-ty/src/diagnostics/expr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@ pub fn record_literal_missing_fields(
550550
) -> Option<(VariantId, Vec<LocalFieldId>, /*has spread expr*/ bool)> {
551551
let (fields, has_spread_expr, has_ellipsis) = match expr {
552552
Expr::RecordLit { fields, spread, .. } => {
553-
(fields, !matches!(spread, Spread::Base(_)), matches!(spread, Spread::Yes))
553+
(fields, matches!(spread, Spread::Base(_)), matches!(spread, Spread::Yes))
554554
}
555555
_ => return None,
556556
};

src/tools/rust-analyzer/crates/hir-ty/src/tests.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ fn check_impl(
202202
for def in defs {
203203
let (body, body_source_map) = db.body_with_source_map(def);
204204
let inference_result = db.infer(def);
205+
dbg!(&inference_result);
205206

206207
for (pat, mut ty) in inference_result.type_of_pat.iter() {
207208
if let Pat::Bind { id, .. } = body.pats[pat] {

0 commit comments

Comments
 (0)