Skip to content

Commit e4e7c95

Browse files
committed
Fix a mistake in condition
1 parent ec89b7d commit e4e7c95

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
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: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,6 @@ 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);
206205

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

0 commit comments

Comments
 (0)