mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 11:31:15 +00:00
Fix a mistake in condition
This commit is contained in:
parent
4fe18a6fb5
commit
e5c38558f5
@ -550,7 +550,7 @@ pub fn record_literal_missing_fields(
|
|||||||
) -> Option<(VariantId, Vec<LocalFieldId>, /*has spread expr*/ bool)> {
|
) -> Option<(VariantId, Vec<LocalFieldId>, /*has spread expr*/ bool)> {
|
||||||
let (fields, has_spread_expr, has_ellipsis) = match expr {
|
let (fields, has_spread_expr, has_ellipsis) = match expr {
|
||||||
Expr::RecordLit { fields, spread, .. } => {
|
Expr::RecordLit { fields, spread, .. } => {
|
||||||
(fields, matches!(spread, Spread::Base(_)), matches!(spread, Spread::Yes))
|
(fields, !matches!(spread, Spread::Base(_)), matches!(spread, Spread::Yes))
|
||||||
}
|
}
|
||||||
_ => return None,
|
_ => return None,
|
||||||
};
|
};
|
||||||
|
@ -202,7 +202,6 @@ fn check_impl(
|
|||||||
for def in defs {
|
for def in defs {
|
||||||
let (body, body_source_map) = db.body_with_source_map(def);
|
let (body, body_source_map) = db.body_with_source_map(def);
|
||||||
let inference_result = db.infer(def);
|
let inference_result = db.infer(def);
|
||||||
dbg!(&inference_result);
|
|
||||||
|
|
||||||
for (pat, mut ty) in inference_result.type_of_pat.iter() {
|
for (pat, mut ty) in inference_result.type_of_pat.iter() {
|
||||||
if let Pat::Bind { id, .. } = body.pats[pat] {
|
if let Pat::Bind { id, .. } = body.pats[pat] {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user