Skip to content

Commit

Permalink
Fix a mistake in condition
Browse files Browse the repository at this point in the history
  • Loading branch information
ShoyuVanilla committed Jan 27, 2025
1 parent ec89b7d commit e4e7c95
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand Down
1 change: 0 additions & 1 deletion src/tools/rust-analyzer/crates/hir-ty/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,6 @@ 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] {
Expand Down

0 comments on commit e4e7c95

Please sign in to comment.