Skip to content

Commit 1429899

Browse files
committed
Auto merge of #106482 - compiler-errors:rollup-g7n1p39, r=compiler-errors
Rollup of 6 pull requests Successful merges: - #105846 (Account for return-position `impl Trait` in trait in `opt_suggest_box_span`) - #106385 (Split `-Zchalk` flag into `-Ztrait-solver=(classic|chalk|next)` flag) - #106403 (Rename `hir::Map::{get_,find_}parent_node` to `hir::Map::{,opt_}parent_id`, and add `hir::Map::{get,find}_parent`) - #106462 (rustdoc: remove unnecessary wrapper around sidebar and mobile logos) - #106464 (Update Fuchsia walkthrough with new configs) - #106478 (Tweak wording of fn call with wrong number of args) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2 parents 03b9e1d + e048ee2 commit 1429899

File tree

160 files changed

+478
-392
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

160 files changed

+478
-392
lines changed

compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
394394
}
395395
}
396396
let typeck = self.infcx.tcx.typeck(self.mir_def_id());
397-
let hir_id = hir.get_parent_node(expr.hir_id);
397+
let hir_id = hir.parent_id(expr.hir_id);
398398
if let Some(parent) = hir.find(hir_id) {
399399
let (def_id, args, offset) = if let hir::Node::Expr(parent_expr) = parent
400400
&& let hir::ExprKind::MethodCall(_, _, args, _) = parent_expr.kind

compiler/rustc_borrowck/src/diagnostics/mutability_errors.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1004,7 +1004,7 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, 'tcx> {
10041004
let hir = self.infcx.tcx.hir();
10051005
let closure_id = self.mir_hir_id();
10061006
let closure_span = self.infcx.tcx.def_span(self.mir_def_id());
1007-
let fn_call_id = hir.get_parent_node(closure_id);
1007+
let fn_call_id = hir.parent_id(closure_id);
10081008
let node = hir.get(fn_call_id);
10091009
let def_id = hir.enclosing_body_owner(fn_call_id);
10101010
let mut look_at_return = true;

compiler/rustc_const_eval/src/transform/check_consts/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ fn is_parent_const_stable_trait(tcx: TyCtxt<'_>, def_id: DefId) -> bool {
115115
let local_def_id = def_id.expect_local();
116116
let hir_id = tcx.local_def_id_to_hir_id(local_def_id);
117117

118-
let Some(parent) = tcx.hir().find_parent_node(hir_id) else { return false };
118+
let Some(parent) = tcx.hir().opt_parent_id(hir_id) else { return false };
119119
let parent_def = tcx.hir().get(parent);
120120

121121
if !matches!(

compiler/rustc_hir/src/hir.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3460,7 +3460,7 @@ impl<'hir> Node<'hir> {
34603460
/// ```ignore (illustrative)
34613461
/// ctor
34623462
/// .ctor_hir_id()
3463-
/// .and_then(|ctor_id| tcx.hir().find(tcx.hir().get_parent_node(ctor_id)))
3463+
/// .and_then(|ctor_id| tcx.hir().find_parent(ctor_id))
34643464
/// .and_then(|parent| parent.ident())
34653465
/// ```
34663466
pub fn ident(&self) -> Option<Ident> {

compiler/rustc_hir_analysis/src/astconv/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2936,7 +2936,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
29362936
let hir::Node::ImplItem(hir::ImplItem { kind: hir::ImplItemKind::Fn(..), ident, .. }) =
29372937
hir.get(fn_hir_id) else { return None };
29382938
let hir::Node::Item(hir::Item { kind: hir::ItemKind::Impl(i), .. }) =
2939-
hir.get(hir.get_parent_node(fn_hir_id)) else { bug!("ImplItem should have Impl parent") };
2939+
hir.get_parent(fn_hir_id) else { bug!("ImplItem should have Impl parent") };
29402940

29412941
let trait_ref = self.instantiate_mono_trait_ref(
29422942
i.of_trait.as_ref()?,

compiler/rustc_hir_analysis/src/collect.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ pub(crate) fn placeholder_type_error_diag<'tcx>(
213213
is_fn = true;
214214

215215
// Check if parent is const or static
216-
let parent_id = tcx.hir().get_parent_node(hir_ty.hir_id);
216+
let parent_id = tcx.hir().parent_id(hir_ty.hir_id);
217217
let parent_node = tcx.hir().get(parent_id);
218218

219219
is_const_or_static = matches!(
@@ -1109,7 +1109,7 @@ fn fn_sig(tcx: TyCtxt<'_>, def_id: DefId) -> ty::PolyFnSig<'_> {
11091109
ImplItem(hir::ImplItem { kind: ImplItemKind::Fn(sig, _), generics, .. }) => {
11101110
// Do not try to infer the return type for a impl method coming from a trait
11111111
if let Item(hir::Item { kind: ItemKind::Impl(i), .. }) =
1112-
tcx.hir().get(tcx.hir().get_parent_node(hir_id))
1112+
tcx.hir().get_parent(hir_id)
11131113
&& i.of_trait.is_some()
11141114
{
11151115
<dyn AstConv<'_>>::ty_of_fn(

compiler/rustc_hir_analysis/src/collect/generics_of.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ pub(super) fn generics_of(tcx: TyCtxt<'_>, def_id: DefId) -> ty::Generics {
103103
// `min_const_generics`.
104104
Some(parent_def_id.to_def_id())
105105
} else {
106-
let parent_node = tcx.hir().get(tcx.hir().get_parent_node(hir_id));
106+
let parent_node = tcx.hir().get_parent(hir_id);
107107
match parent_node {
108108
// HACK(eddyb) this provides the correct generics for repeat
109109
// expressions' count (i.e. `N` in `[x; N]`), and explicit
@@ -320,7 +320,7 @@ pub(super) fn generics_of(tcx: TyCtxt<'_>, def_id: DefId) -> ty::Generics {
320320

321321
// provide junk type parameter defs for const blocks.
322322
if let Node::AnonConst(_) = node {
323-
let parent_node = tcx.hir().get(tcx.hir().get_parent_node(hir_id));
323+
let parent_node = tcx.hir().get_parent(hir_id);
324324
if let Node::Expr(&Expr { kind: ExprKind::ConstBlock(_), .. }) = parent_node {
325325
params.push(ty::GenericParamDef {
326326
index: next_index(),

compiler/rustc_hir_analysis/src/collect/lifetimes.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,7 @@ impl<'a, 'tcx> Visitor<'tcx> for LifetimeContext<'a, 'tcx> {
682682
};
683683
let hir_id = self.tcx.hir().local_def_id_to_hir_id(def_id);
684684
// Ensure that the parent of the def is an item, not HRTB
685-
let parent_id = self.tcx.hir().get_parent_node(hir_id);
685+
let parent_id = self.tcx.hir().parent_id(hir_id);
686686
if !parent_id.is_owner() {
687687
struct_span_err!(
688688
self.tcx.sess,

compiler/rustc_hir_analysis/src/collect/predicates_of.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ fn gather_explicit_predicates_of(tcx: TyCtxt<'_>, def_id: DefId) -> ty::GenericP
270270
// We create bi-directional Outlives predicates between the original
271271
// and the duplicated parameter, to ensure that they do not get out of sync.
272272
if let Node::Item(&Item { kind: ItemKind::OpaqueTy(..), .. }) = node {
273-
let opaque_ty_id = tcx.hir().get_parent_node(hir_id);
273+
let opaque_ty_id = tcx.hir().parent_id(hir_id);
274274
let opaque_ty_node = tcx.hir().get(opaque_ty_id);
275275
let Node::Ty(&Ty { kind: TyKind::OpaqueDef(_, lifetimes, _), .. }) = opaque_ty_node else {
276276
bug!("unexpected {opaque_ty_node:?}")

compiler/rustc_hir_analysis/src/collect/type_of.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ pub(super) fn opt_const_param_of(tcx: TyCtxt<'_>, def_id: LocalDefId) -> Option<
2828
_ => return None,
2929
};
3030

31-
let parent_node_id = tcx.hir().get_parent_node(hir_id);
31+
let parent_node_id = tcx.hir().parent_id(hir_id);
3232
let parent_node = tcx.hir().get(parent_node_id);
3333

3434
let (generics, arg_idx) = match parent_node {
@@ -402,7 +402,7 @@ pub(super) fn type_of(tcx: TyCtxt<'_>, def_id: DefId) -> Ty<'_> {
402402
}
403403

404404
Node::AnonConst(_) => {
405-
let parent_node = tcx.hir().get(tcx.hir().get_parent_node(hir_id));
405+
let parent_node = tcx.hir().get_parent(hir_id);
406406
match parent_node {
407407
Node::Ty(&Ty { kind: TyKind::Array(_, ref constant), .. })
408408
| Node::Expr(&Expr { kind: ExprKind::Repeat(_, ref constant), .. })
@@ -445,7 +445,7 @@ pub(super) fn type_of(tcx: TyCtxt<'_>, def_id: DefId) -> Ty<'_> {
445445
..
446446
},
447447
) if let Node::TraitRef(trait_ref) =
448-
tcx.hir().get(tcx.hir().get_parent_node(binding_id))
448+
tcx.hir().get_parent(binding_id)
449449
&& e.hir_id == hir_id =>
450450
{
451451
let Some(trait_def_id) = trait_ref.trait_def_id() else {
@@ -472,7 +472,7 @@ pub(super) fn type_of(tcx: TyCtxt<'_>, def_id: DefId) -> Ty<'_> {
472472
Node::TypeBinding(
473473
binding @ &TypeBinding { hir_id: binding_id, gen_args, ref kind, .. },
474474
) if let Node::TraitRef(trait_ref) =
475-
tcx.hir().get(tcx.hir().get_parent_node(binding_id))
475+
tcx.hir().get_parent(binding_id)
476476
&& let Some((idx, _)) =
477477
gen_args.args.iter().enumerate().find(|(_, arg)| {
478478
if let GenericArg::Const(ct) = arg {

compiler/rustc_hir_analysis/src/structured_errors/wrong_number_of_generic_args.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -716,7 +716,7 @@ impl<'a, 'tcx> WrongNumberOfGenericArgs<'a, 'tcx> {
716716
num = num_trait_generics_except_self,
717717
);
718718

719-
if let Some(parent_node) = self.tcx.hir().find_parent_node(self.path_segment.hir_id)
719+
if let Some(parent_node) = self.tcx.hir().opt_parent_id(self.path_segment.hir_id)
720720
&& let Some(parent_node) = self.tcx.hir().find(parent_node)
721721
&& let hir::Node::Expr(expr) = parent_node {
722722
match expr.kind {

compiler/rustc_hir_typeck/src/_match.rs

+13-8
Original file line numberDiff line numberDiff line change
@@ -289,15 +289,12 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
289289

290290
fn maybe_get_coercion_reason(&self, hir_id: hir::HirId, sp: Span) -> Option<(Span, String)> {
291291
let node = {
292-
let rslt = self.tcx.hir().get_parent_node(self.tcx.hir().get_parent_node(hir_id));
292+
let rslt = self.tcx.hir().parent_id(self.tcx.hir().parent_id(hir_id));
293293
self.tcx.hir().get(rslt)
294294
};
295295
if let hir::Node::Block(block) = node {
296296
// check that the body's parent is an fn
297-
let parent = self
298-
.tcx
299-
.hir()
300-
.get(self.tcx.hir().get_parent_node(self.tcx.hir().get_parent_node(block.hir_id)));
297+
let parent = self.tcx.hir().get_parent(self.tcx.hir().parent_id(block.hir_id));
301298
if let (Some(expr), hir::Node::Item(hir::Item { kind: hir::ItemKind::Fn(..), .. })) =
302299
(&block.expr, parent)
303300
{
@@ -526,7 +523,6 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
526523
None
527524
}
528525
})?;
529-
let opaque_ty = self.tcx.mk_opaque(rpit_def_id, substs);
530526

531527
if !self.can_coerce(first_ty, expected) || !self.can_coerce(second_ty, expected) {
532528
return None;
@@ -540,13 +536,22 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
540536
{
541537
let pred = pred.kind().rebind(match pred.kind().skip_binder() {
542538
ty::PredicateKind::Clause(ty::Clause::Trait(trait_pred)) => {
543-
assert_eq!(trait_pred.trait_ref.self_ty(), opaque_ty);
539+
// FIXME(rpitit): This will need to be fixed when we move to associated types
540+
assert!(matches!(
541+
*trait_pred.trait_ref.self_ty().kind(),
542+
ty::Alias(_, ty::AliasTy { def_id, substs, .. })
543+
if def_id == rpit_def_id && substs == substs
544+
));
544545
ty::PredicateKind::Clause(ty::Clause::Trait(
545546
trait_pred.with_self_ty(self.tcx, ty),
546547
))
547548
}
548549
ty::PredicateKind::Clause(ty::Clause::Projection(mut proj_pred)) => {
549-
assert_eq!(proj_pred.projection_ty.self_ty(), opaque_ty);
550+
assert!(matches!(
551+
*proj_pred.projection_ty.self_ty().kind(),
552+
ty::Alias(_, ty::AliasTy { def_id, substs, .. })
553+
if def_id == rpit_def_id && substs == substs
554+
));
550555
proj_pred = proj_pred.with_self_ty(self.tcx, ty);
551556
ty::PredicateKind::Clause(ty::Clause::Projection(proj_pred))
552557
}

compiler/rustc_hir_typeck/src/callee.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
288288
callee_span: Span,
289289
) {
290290
let hir = self.tcx.hir();
291-
let parent_hir_id = hir.get_parent_node(hir_id);
291+
let parent_hir_id = hir.parent_id(hir_id);
292292
let parent_node = hir.get(parent_hir_id);
293293
if let (
294294
hir::Node::Expr(hir::Expr {
@@ -303,7 +303,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
303303
{
304304
// Actually need to unwrap a few more layers of HIR to get to
305305
// the _real_ closure...
306-
let async_closure = hir.get_parent_node(hir.get_parent_node(parent_hir_id));
306+
let async_closure = hir.parent_id(hir.parent_id(parent_hir_id));
307307
if let hir::Node::Expr(hir::Expr {
308308
kind: hir::ExprKind::Closure(&hir::Closure { fn_decl_span, .. }),
309309
..
@@ -336,7 +336,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
336336
call_expr: &'tcx hir::Expr<'tcx>,
337337
callee_expr: &'tcx hir::Expr<'tcx>,
338338
) -> bool {
339-
let hir_id = self.tcx.hir().get_parent_node(call_expr.hir_id);
339+
let hir_id = self.tcx.hir().parent_id(call_expr.hir_id);
340340
let parent_node = self.tcx.hir().get(hir_id);
341341
if let (
342342
hir::Node::Expr(hir::Expr { kind: hir::ExprKind::Array(_), .. }),

compiler/rustc_hir_typeck/src/coercion.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1547,7 +1547,7 @@ impl<'tcx, 'exprs, E: AsCoercionSite> CoerceMany<'tcx, 'exprs, E> {
15471547
err.span_label(cause.span, "return type is not `()`");
15481548
}
15491549
ObligationCauseCode::BlockTailExpression(blk_id) => {
1550-
let parent_id = fcx.tcx.hir().get_parent_node(blk_id);
1550+
let parent_id = fcx.tcx.hir().parent_id(blk_id);
15511551
err = self.report_return_mismatched_types(
15521552
cause,
15531553
expected,
@@ -1578,7 +1578,7 @@ impl<'tcx, 'exprs, E: AsCoercionSite> CoerceMany<'tcx, 'exprs, E> {
15781578
None,
15791579
);
15801580
if !fcx.tcx.features().unsized_locals {
1581-
let id = fcx.tcx.hir().get_parent_node(id);
1581+
let id = fcx.tcx.hir().parent_id(id);
15821582
unsized_return = self.is_return_ty_unsized(fcx, id);
15831583
}
15841584
}
@@ -1668,7 +1668,7 @@ impl<'tcx, 'exprs, E: AsCoercionSite> CoerceMany<'tcx, 'exprs, E> {
16681668
let mut pointing_at_return_type = false;
16691669
let mut fn_output = None;
16701670

1671-
let parent_id = fcx.tcx.hir().get_parent_node(id);
1671+
let parent_id = fcx.tcx.hir().parent_id(id);
16721672
let parent = fcx.tcx.hir().get(parent_id);
16731673
if let Some(expr) = expression
16741674
&& let hir::Node::Expr(hir::Expr { kind: hir::ExprKind::Closure(&hir::Closure { body, .. }), .. }) = parent

compiler/rustc_hir_typeck/src/demand.rs

+12-15
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
211211
expr: &hir::Expr<'_>,
212212
error: Option<TypeError<'tcx>>,
213213
) {
214-
let parent = self.tcx.hir().get_parent_node(expr.hir_id);
214+
let parent = self.tcx.hir().parent_id(expr.hir_id);
215215
match (self.tcx.hir().find(parent), error) {
216216
(Some(hir::Node::Local(hir::Local { ty: Some(ty), init: Some(init), .. })), _)
217217
if init.hir_id == expr.hir_id =>
@@ -258,10 +258,9 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
258258
hir::Path { res: hir::def::Res::Local(hir_id), .. },
259259
)) => {
260260
if let Some(hir::Node::Pat(pat)) = self.tcx.hir().find(*hir_id) {
261-
let parent = self.tcx.hir().get_parent_node(pat.hir_id);
262261
primary_span = pat.span;
263262
secondary_span = pat.span;
264-
match self.tcx.hir().find(parent) {
263+
match self.tcx.hir().find_parent(pat.hir_id) {
265264
Some(hir::Node::Local(hir::Local { ty: Some(ty), .. })) => {
266265
primary_span = ty.span;
267266
post_message = " type";
@@ -326,7 +325,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
326325
expr: &hir::Expr<'_>,
327326
error: Option<TypeError<'tcx>>,
328327
) {
329-
let parent = self.tcx.hir().get_parent_node(expr.hir_id);
328+
let parent = self.tcx.hir().parent_id(expr.hir_id);
330329
let Some(TypeError::Sorts(ExpectedFound { expected, .. })) = error else {return;};
331330
let Some(hir::Node::Expr(hir::Expr {
332331
kind: hir::ExprKind::Assign(lhs, rhs, _), ..
@@ -510,7 +509,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
510509

511510
// Unroll desugaring, to make sure this works for `for` loops etc.
512511
loop {
513-
parent = self.tcx.hir().get_parent_node(id);
512+
parent = self.tcx.hir().parent_id(id);
514513
if let Some(parent_span) = self.tcx.hir().opt_span(parent) {
515514
if parent_span.find_ancestor_inside(expr.span).is_some() {
516515
// The parent node is part of the same span, so is the result of the
@@ -790,12 +789,12 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
790789
return None;
791790
};
792791

793-
let local_parent = self.tcx.hir().get_parent_node(local_id);
792+
let local_parent = self.tcx.hir().parent_id(local_id);
794793
let Some(Node::Param(hir::Param { hir_id: param_hir_id, .. })) = self.tcx.hir().find(local_parent) else {
795794
return None;
796795
};
797796

798-
let param_parent = self.tcx.hir().get_parent_node(*param_hir_id);
797+
let param_parent = self.tcx.hir().parent_id(*param_hir_id);
799798
let Some(Node::Expr(hir::Expr {
800799
hir_id: expr_hir_id,
801800
kind: hir::ExprKind::Closure(hir::Closure { fn_decl: closure_fn_decl, .. }),
@@ -804,7 +803,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
804803
return None;
805804
};
806805

807-
let expr_parent = self.tcx.hir().get_parent_node(*expr_hir_id);
806+
let expr_parent = self.tcx.hir().parent_id(*expr_hir_id);
808807
let hir = self.tcx.hir().find(expr_parent);
809808
let closure_params_len = closure_fn_decl.inputs.len();
810809
let (
@@ -857,7 +856,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
857856
_ => None,
858857
}?;
859858

860-
match hir.find(hir.get_parent_node(expr.hir_id))? {
859+
match hir.find_parent(expr.hir_id)? {
861860
Node::ExprField(field) => {
862861
if field.ident.name == local.name && field.is_shorthand {
863862
return Some(local.name);
@@ -883,7 +882,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
883882
/// Returns whether the given expression is an `else if`.
884883
pub(crate) fn is_else_if_block(&self, expr: &hir::Expr<'_>) -> bool {
885884
if let hir::ExprKind::If(..) = expr.kind {
886-
let parent_id = self.tcx.hir().get_parent_node(expr.hir_id);
885+
let parent_id = self.tcx.hir().parent_id(expr.hir_id);
887886
if let Some(Node::Expr(hir::Expr {
888887
kind: hir::ExprKind::If(_, _, Some(else_expr)),
889888
..
@@ -1040,7 +1039,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
10401039
if let Some(hir::Node::Expr(hir::Expr {
10411040
kind: hir::ExprKind::Assign(..),
10421041
..
1043-
})) = self.tcx.hir().find(self.tcx.hir().get_parent_node(expr.hir_id))
1042+
})) = self.tcx.hir().find_parent(expr.hir_id)
10441043
{
10451044
if mutability.is_mut() {
10461045
// Suppressing this diagnostic, we'll properly print it in `check_expr_assign`
@@ -1267,9 +1266,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
12671266

12681267
let mut sugg = vec![];
12691268

1270-
if let Some(hir::Node::ExprField(field)) =
1271-
self.tcx.hir().find(self.tcx.hir().get_parent_node(expr.hir_id))
1272-
{
1269+
if let Some(hir::Node::ExprField(field)) = self.tcx.hir().find_parent(expr.hir_id) {
12731270
// `expr` is a literal field for a struct, only suggest if appropriate
12741271
if field.is_shorthand {
12751272
// This is a field literal
@@ -1625,7 +1622,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
16251622
[start, end],
16261623
_,
16271624
) = expr.kind else { return; };
1628-
let parent = self.tcx.hir().get_parent_node(expr.hir_id);
1625+
let parent = self.tcx.hir().parent_id(expr.hir_id);
16291626
if let Some(hir::Node::ExprField(_)) = self.tcx.hir().find(parent) {
16301627
// Ignore `Foo { field: a..Default::default() }`
16311628
return;

0 commit comments

Comments
 (0)