Skip to content

Commit 0a8e76c

Browse files
committed
Auto merge of #155552 - JonathanBrouwer:rollup-JKIpTuW, r=<try>
Rollup of 11 pull requests try-job: dist-various-1 try-job: test-various try-job: x86_64-gnu-aux try-job: x86_64-gnu-llvm-21-3 try-job: x86_64-msvc-1 try-job: aarch64-apple try-job: x86_64-mingw-1 try-job: i686-msvc-2
2 parents e22c616 + 02dda73 commit 0a8e76c

55 files changed

Lines changed: 1142 additions & 605 deletions

File tree

Some content is hidden

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

compiler/rustc_borrowck/src/diagnostics/region_name.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -499,18 +499,18 @@ impl<'tcx> MirBorrowckCtxt<'_, '_, 'tcx> {
499499
fr: RegionVid,
500500
) -> Option<RegionName> {
501501
let implicit_inputs = self.regioncx.universal_regions().defining_ty.implicit_inputs();
502-
let argument_index = self.regioncx.get_argument_index_for_region(self.infcx.tcx, fr)?;
502+
let user_arg_index = self.regioncx.get_user_arg_index_for_region(self.infcx.tcx, fr)?;
503503

504504
let arg_ty = self.regioncx.universal_regions().unnormalized_input_tys
505-
[implicit_inputs + argument_index];
505+
[implicit_inputs + user_arg_index];
506506
let (_, span) = self.regioncx.get_argument_name_and_span_for_region(
507507
self.body,
508508
self.local_names(),
509-
argument_index,
509+
user_arg_index,
510510
);
511511

512512
let highlight = self
513-
.get_argument_hir_ty_for_highlighting(argument_index)
513+
.get_argument_hir_ty_for_highlighting(user_arg_index)
514514
.and_then(|arg_hir_ty| self.highlight_if_we_can_match_hir_ty(fr, arg_ty, arg_hir_ty))
515515
.unwrap_or_else(|| {
516516
// `highlight_if_we_cannot_match_hir_ty` needs to know the number we will give to
@@ -528,10 +528,11 @@ impl<'tcx> MirBorrowckCtxt<'_, '_, 'tcx> {
528528

529529
fn get_argument_hir_ty_for_highlighting(
530530
&self,
531-
argument_index: usize,
531+
user_arg_index: usize,
532532
) -> Option<&hir::Ty<'tcx>> {
533533
let fn_decl = self.infcx.tcx.hir_fn_decl_by_hir_id(self.mir_hir_id())?;
534-
let argument_hir_ty: &hir::Ty<'_> = fn_decl.inputs.get(argument_index)?;
534+
// Closures don't have implicit self arguments in HIR, so use `user_arg_index` directly.
535+
let argument_hir_ty: &hir::Ty<'_> = fn_decl.inputs.get(user_arg_index)?;
535536
match argument_hir_ty.kind {
536537
// This indicates a variable with no type annotation, like
537538
// `|x|`... in that case, we can't highlight the type but

compiler/rustc_borrowck/src/diagnostics/var_name.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
3131
})
3232
.or_else(|| {
3333
debug!("get_var_name_and_span_for_region: attempting argument");
34-
self.get_argument_index_for_region(tcx, fr).and_then(|index| {
34+
self.get_user_arg_index_for_region(tcx, fr).and_then(|index| {
3535
let local = self.user_arg_index_to_local(body, index);
3636
if body_uses_local(body, local) {
3737
Some(self.get_argument_name_and_span_for_region(body, local_names, index))
@@ -93,26 +93,26 @@ impl<'tcx> RegionInferenceContext<'tcx> {
9393
///
9494
/// N.B., in the case of a closure, the index is indexing into the signature as seen by the
9595
/// user - in particular, index 0 is not the implicit self parameter.
96-
pub(crate) fn get_argument_index_for_region(
96+
pub(crate) fn get_user_arg_index_for_region(
9797
&self,
9898
tcx: TyCtxt<'tcx>,
9999
fr: RegionVid,
100100
) -> Option<usize> {
101101
let implicit_inputs = self.universal_regions().defining_ty.implicit_inputs();
102-
let argument_index =
102+
let user_arg_index =
103103
self.universal_regions().unnormalized_input_tys.iter().skip(implicit_inputs).position(
104104
|arg_ty| {
105-
debug!("get_argument_index_for_region: arg_ty = {arg_ty:?}");
105+
debug!("get_user_arg_index_for_region: arg_ty = {arg_ty:?}");
106106
tcx.any_free_region_meets(arg_ty, |r| r.as_var() == fr)
107107
},
108108
)?;
109109

110110
debug!(
111-
"get_argument_index_for_region: found {fr:?} in argument {argument_index} which has type {:?}",
112-
self.universal_regions().unnormalized_input_tys[argument_index],
111+
"get_user_arg_index_for_region: found {fr:?} in argument {user_arg_index} which has type {:?}",
112+
self.universal_regions().unnormalized_input_tys[user_arg_index],
113113
);
114114

115-
Some(argument_index)
115+
Some(user_arg_index)
116116
}
117117

118118
/// Given the index of an argument as seen from the user (i.e. excluding
@@ -128,9 +128,9 @@ impl<'tcx> RegionInferenceContext<'tcx> {
128128
&self,
129129
body: &Body<'tcx>,
130130
local_names: &IndexSlice<Local, Option<Symbol>>,
131-
argument_index: usize,
131+
user_arg_index: usize,
132132
) -> (Option<Symbol>, Span) {
133-
let argument_local = self.user_arg_index_to_local(body, argument_index);
133+
let argument_local = self.user_arg_index_to_local(body, user_arg_index);
134134
debug!("get_argument_name_and_span_for_region: argument_local={argument_local:?}");
135135

136136
let argument_name = local_names[argument_local];

compiler/rustc_borrowck/src/polonius/dump.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ impl LocalizedConstraintGraphVisitor for LocalizedOutlivesConstraintCollector {
107107
/// - a mermaid graph of the NLL regions and the constraints between them
108108
/// - a mermaid graph of the NLL SCCs and the constraints between them
109109
fn emit_polonius_dump<'tcx>(
110-
dumper: &MirDumper<'_, '_, 'tcx>,
110+
dumper: &MirDumper<'_, 'tcx>,
111111
body: &Body<'tcx>,
112112
regioncx: &RegionInferenceContext<'tcx>,
113113
borrow_set: &BorrowSet<'tcx>,
@@ -186,7 +186,7 @@ fn emit_polonius_dump<'tcx>(
186186

187187
/// Emits the polonius MIR, as escaped HTML.
188188
fn emit_html_mir<'tcx>(
189-
dumper: &MirDumper<'_, '_, 'tcx>,
189+
dumper: &MirDumper<'_, 'tcx>,
190190
body: &Body<'tcx>,
191191
out: &mut dyn io::Write,
192192
) -> io::Result<()> {

compiler/rustc_borrowck/src/universal_regions.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ pub(crate) struct UniversalRegions<'tcx> {
7979
///
8080
/// N.B., associated types in these types have not been normalized,
8181
/// as the name suggests. =)
82+
///
83+
/// N.B., in the case of a closure, index 0 is the implicit self parameter,
84+
/// and not the first input as seen by the user.
8285
pub unnormalized_input_tys: &'tcx [Ty<'tcx>],
8386

8487
pub yield_ty: Option<Ty<'tcx>>,

compiler/rustc_feature/src/unstable.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,8 @@ declare_features! (
303303
(internal, panic_runtime, "1.10.0", Some(32837)),
304304
/// Allows using pattern types.
305305
(internal, pattern_types, "1.79.0", Some(123646)),
306+
/// Allows `repr(simd)` and importing the various simd intrinsics.
307+
(internal, repr_simd, "1.4.0", Some(27731)),
306308
/// Allows using compiler's own crates.
307309
(unstable, rustc_private, "1.0.0", Some(27812)),
308310
/// Allows using internal rustdoc features like `doc(keyword)`.
@@ -657,8 +659,6 @@ declare_features! (
657659
(incomplete, ref_pat_eat_one_layer_2024_structural, "1.81.0", Some(123076)),
658660
/// Allows using the `#[register_tool]` attribute.
659661
(unstable, register_tool, "1.41.0", Some(66079)),
660-
/// Allows `repr(simd)` and importing the various simd intrinsics.
661-
(unstable, repr_simd, "1.4.0", Some(27731)),
662662
/// Allows bounding the return type of AFIT/RPITIT.
663663
(unstable, return_type_notation, "1.70.0", Some(109417)),
664664
/// Target features on riscv.

compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1901,14 +1901,14 @@ impl FnParam<'_> {
19011901
}
19021902
}
19031903

1904-
struct FnCallDiagCtxt<'a, 'b, 'tcx> {
1905-
arg_matching_ctxt: ArgMatchingCtxt<'a, 'b, 'tcx>,
1904+
struct FnCallDiagCtxt<'a, 'tcx> {
1905+
arg_matching_ctxt: ArgMatchingCtxt<'a, 'tcx>,
19061906
errors: Vec<Error<'tcx>>,
19071907
matched_inputs: IndexVec<ExpectedIdx, Option<ProvidedIdx>>,
19081908
}
19091909

1910-
impl<'a, 'b, 'tcx> Deref for FnCallDiagCtxt<'a, 'b, 'tcx> {
1911-
type Target = ArgMatchingCtxt<'a, 'b, 'tcx>;
1910+
impl<'a, 'tcx> Deref for FnCallDiagCtxt<'a, 'tcx> {
1911+
type Target = ArgMatchingCtxt<'a, 'tcx>;
19121912

19131913
fn deref(&self) -> &Self::Target {
19141914
&self.arg_matching_ctxt
@@ -1921,9 +1921,9 @@ enum ArgumentsFormatting {
19211921
Multiline { fallback_indent: String, brace_indent: String },
19221922
}
19231923

1924-
impl<'a, 'b, 'tcx> FnCallDiagCtxt<'a, 'b, 'tcx> {
1924+
impl<'a, 'tcx> FnCallDiagCtxt<'a, 'tcx> {
19251925
fn new(
1926-
arg: &'a FnCtxt<'b, 'tcx>,
1926+
arg: &'a FnCtxt<'a, 'tcx>,
19271927
compatibility_diagonal: IndexVec<ProvidedIdx, Compatibility<'tcx>>,
19281928
formal_and_expected_inputs: IndexVec<ExpectedIdx, (Ty<'tcx>, Ty<'tcx>)>,
19291929
provided_args: IndexVec<ProvidedIdx, &'tcx Expr<'tcx>>,
@@ -2618,7 +2618,7 @@ impl<'a, 'b, 'tcx> FnCallDiagCtxt<'a, 'b, 'tcx> {
26182618
(suggestions, labels, suggestion_text)
26192619
}
26202620

2621-
fn label_generic_mismatches(&self, err: &mut Diag<'b>) {
2621+
fn label_generic_mismatches(&self, err: &mut Diag<'a>) {
26222622
self.fn_ctxt.label_generic_mismatches(
26232623
err,
26242624
self.fn_def_id,
@@ -2778,22 +2778,22 @@ impl<'a, 'b, 'tcx> FnCallDiagCtxt<'a, 'b, 'tcx> {
27782778
}
27792779
}
27802780

2781-
struct ArgMatchingCtxt<'a, 'b, 'tcx> {
2782-
args_ctxt: ArgsCtxt<'a, 'b, 'tcx>,
2781+
struct ArgMatchingCtxt<'a, 'tcx> {
2782+
args_ctxt: ArgsCtxt<'a, 'tcx>,
27832783
provided_arg_tys: IndexVec<ProvidedIdx, (Ty<'tcx>, Span)>,
27842784
}
27852785

2786-
impl<'a, 'b, 'tcx> Deref for ArgMatchingCtxt<'a, 'b, 'tcx> {
2787-
type Target = ArgsCtxt<'a, 'b, 'tcx>;
2786+
impl<'a, 'tcx> Deref for ArgMatchingCtxt<'a, 'tcx> {
2787+
type Target = ArgsCtxt<'a, 'tcx>;
27882788

27892789
fn deref(&self) -> &Self::Target {
27902790
&self.args_ctxt
27912791
}
27922792
}
27932793

2794-
impl<'a, 'b, 'tcx> ArgMatchingCtxt<'a, 'b, 'tcx> {
2794+
impl<'a, 'tcx> ArgMatchingCtxt<'a, 'tcx> {
27952795
fn new(
2796-
arg: &'a FnCtxt<'b, 'tcx>,
2796+
arg: &'a FnCtxt<'a, 'tcx>,
27972797
compatibility_diagonal: IndexVec<ProvidedIdx, Compatibility<'tcx>>,
27982798
formal_and_expected_inputs: IndexVec<ExpectedIdx, (Ty<'tcx>, Ty<'tcx>)>,
27992799
provided_args: IndexVec<ProvidedIdx, &'tcx Expr<'tcx>>,
@@ -2924,23 +2924,23 @@ impl<'a, 'b, 'tcx> ArgMatchingCtxt<'a, 'b, 'tcx> {
29242924
}
29252925
}
29262926

2927-
struct ArgsCtxt<'a, 'b, 'tcx> {
2928-
call_ctxt: CallCtxt<'a, 'b, 'tcx>,
2927+
struct ArgsCtxt<'a, 'tcx> {
2928+
call_ctxt: CallCtxt<'a, 'tcx>,
29292929
call_metadata: CallMetadata,
29302930
args_span: Span,
29312931
}
29322932

2933-
impl<'a, 'b, 'tcx> Deref for ArgsCtxt<'a, 'b, 'tcx> {
2934-
type Target = CallCtxt<'a, 'b, 'tcx>;
2933+
impl<'a, 'tcx> Deref for ArgsCtxt<'a, 'tcx> {
2934+
type Target = CallCtxt<'a, 'tcx>;
29352935

29362936
fn deref(&self) -> &Self::Target {
29372937
&self.call_ctxt
29382938
}
29392939
}
29402940

2941-
impl<'a, 'b, 'tcx> ArgsCtxt<'a, 'b, 'tcx> {
2941+
impl<'a, 'tcx> ArgsCtxt<'a, 'tcx> {
29422942
fn new(
2943-
arg: &'a FnCtxt<'b, 'tcx>,
2943+
arg: &'a FnCtxt<'a, 'tcx>,
29442944
compatibility_diagonal: IndexVec<ProvidedIdx, Compatibility<'tcx>>,
29452945
formal_and_expected_inputs: IndexVec<ExpectedIdx, (Ty<'tcx>, Ty<'tcx>)>,
29462946
provided_args: IndexVec<ProvidedIdx, &'tcx Expr<'tcx>>,
@@ -2951,7 +2951,7 @@ impl<'a, 'b, 'tcx> ArgsCtxt<'a, 'b, 'tcx> {
29512951
call_expr: &'tcx Expr<'tcx>,
29522952
tuple_arguments: TupleArgumentsFlag,
29532953
) -> Self {
2954-
let call_ctxt: CallCtxt<'_, '_, '_> = CallCtxt::new(
2954+
let call_ctxt: CallCtxt<'_, '_> = CallCtxt::new(
29552955
arg,
29562956
compatibility_diagonal,
29572957
formal_and_expected_inputs,
@@ -3058,8 +3058,8 @@ struct CallMetadata {
30583058
is_method: bool,
30593059
}
30603060

3061-
struct CallCtxt<'a, 'b, 'tcx> {
3062-
fn_ctxt: &'a FnCtxt<'b, 'tcx>,
3061+
struct CallCtxt<'a, 'tcx> {
3062+
fn_ctxt: &'a FnCtxt<'a, 'tcx>,
30633063
compatibility_diagonal: IndexVec<ProvidedIdx, Compatibility<'tcx>>,
30643064
formal_and_expected_inputs: IndexVec<ExpectedIdx, (Ty<'tcx>, Ty<'tcx>)>,
30653065
provided_args: IndexVec<ProvidedIdx, &'tcx hir::Expr<'tcx>>,
@@ -3073,17 +3073,17 @@ struct CallCtxt<'a, 'b, 'tcx> {
30733073
callee_ty: Option<Ty<'tcx>>,
30743074
}
30753075

3076-
impl<'a, 'b, 'tcx> Deref for CallCtxt<'a, 'b, 'tcx> {
3077-
type Target = &'a FnCtxt<'b, 'tcx>;
3076+
impl<'a, 'tcx> Deref for CallCtxt<'a, 'tcx> {
3077+
type Target = &'a FnCtxt<'a, 'tcx>;
30783078

30793079
fn deref(&self) -> &Self::Target {
30803080
&self.fn_ctxt
30813081
}
30823082
}
30833083

3084-
impl<'a, 'b, 'tcx> CallCtxt<'a, 'b, 'tcx> {
3084+
impl<'a, 'tcx> CallCtxt<'a, 'tcx> {
30853085
fn new(
3086-
fn_ctxt: &'a FnCtxt<'b, 'tcx>,
3086+
fn_ctxt: &'a FnCtxt<'a, 'tcx>,
30873087
compatibility_diagonal: IndexVec<ProvidedIdx, Compatibility<'tcx>>,
30883088
formal_and_expected_inputs: IndexVec<ExpectedIdx, (Ty<'tcx>, Ty<'tcx>)>,
30893089
provided_args: IndexVec<ProvidedIdx, &'tcx hir::Expr<'tcx>>,
@@ -3093,7 +3093,7 @@ impl<'a, 'b, 'tcx> CallCtxt<'a, 'b, 'tcx> {
30933093
call_span: Span,
30943094
call_expr: &'tcx hir::Expr<'tcx>,
30953095
tuple_arguments: TupleArgumentsFlag,
3096-
) -> CallCtxt<'a, 'b, 'tcx> {
3096+
) -> CallCtxt<'a, 'tcx> {
30973097
let callee_expr = match &call_expr.peel_blocks().kind {
30983098
hir::ExprKind::Call(callee, _) => Some(*callee),
30993099
hir::ExprKind::MethodCall(_, receiver, ..) => {

compiler/rustc_hir_typeck/src/method/prelude_edition_lints.rs

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ use tracing::debug;
1616
use crate::FnCtxt;
1717
use crate::method::probe::{self, Pick};
1818

19-
struct AmbiguousTraitMethodCall<'a, 'b, 'tcx> {
19+
struct AmbiguousTraitMethodCall<'a, 'tcx> {
2020
segment_name: Symbol,
2121
self_expr_span: Span,
2222
pick: &'a Pick<'tcx>,
2323
tcx: TyCtxt<'tcx>,
24-
edition: &'b str,
24+
edition: &'static str,
2525
}
2626

27-
impl<'a, 'b, 'c, 'tcx> Diagnostic<'a, ()> for AmbiguousTraitMethodCall<'b, 'c, 'tcx> {
27+
impl<'a, 'b, 'tcx> Diagnostic<'a, ()> for AmbiguousTraitMethodCall<'b, 'tcx> {
2828
fn into_diag(self, dcx: DiagCtxtHandle<'a>, level: Level) -> Diag<'a, ()> {
2929
let Self { segment_name, self_expr_span, pick, tcx, edition } = self;
3030
let mut lint = Diag::new(
@@ -80,20 +80,18 @@ impl<'a, 'b, 'c, 'tcx> Diagnostic<'a, ()> for AmbiguousTraitMethodCall<'b, 'c, '
8080
}
8181
}
8282

83-
struct AmbiguousTraitMethod<'a, 'b, 'tcx, 'pcx, 'fnctx> {
84-
segment: &'a hir::PathSegment<'pcx>,
83+
struct AmbiguousTraitMethod<'a, 'tcx, 'fnctx> {
84+
segment: &'a hir::PathSegment<'tcx>,
8585
call_expr: &'tcx hir::Expr<'tcx>,
8686
self_expr: &'tcx hir::Expr<'tcx>,
8787
pick: &'a Pick<'tcx>,
8888
args: &'tcx [hir::Expr<'tcx>],
89-
edition: &'b str,
89+
edition: &'static str,
9090
span: Span,
9191
this: &'a FnCtxt<'fnctx, 'tcx>,
9292
}
9393

94-
impl<'a, 'b, 'c, 'tcx, 'pcx, 'fnctx> Diagnostic<'a, ()>
95-
for AmbiguousTraitMethod<'b, 'c, 'tcx, 'pcx, 'fnctx>
96-
{
94+
impl<'a, 'c, 'tcx, 'fnctx> Diagnostic<'a, ()> for AmbiguousTraitMethod<'c, 'tcx, 'fnctx> {
9795
fn into_diag(self, dcx: DiagCtxtHandle<'a>, level: Level) -> Diag<'a, ()> {
9896
let Self { segment, call_expr, self_expr, pick, args, edition, span, this } = self;
9997
let mut lint = Diag::new(
@@ -158,7 +156,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
158156
pub(super) fn lint_edition_dependent_dot_call(
159157
&self,
160158
self_ty: Ty<'tcx>,
161-
segment: &hir::PathSegment<'_>,
159+
segment: &hir::PathSegment<'tcx>,
162160
span: Span,
163161
call_expr: &'tcx hir::Expr<'tcx>,
164162
self_expr: &'tcx hir::Expr<'tcx>,

compiler/rustc_hir_typeck/src/upvar.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -958,15 +958,15 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
958958
capture_clause: hir::CaptureBy,
959959
span: Span,
960960
) {
961-
struct MigrationLint<'a, 'b, 'tcx> {
961+
struct MigrationLint<'a, 'tcx> {
962962
closure_def_id: LocalDefId,
963-
this: &'a FnCtxt<'b, 'tcx>,
963+
this: &'a FnCtxt<'a, 'tcx>,
964964
body_id: hir::BodyId,
965965
need_migrations: Vec<NeededMigration>,
966966
migration_message: String,
967967
}
968968

969-
impl<'a, 'b, 'c, 'tcx> Diagnostic<'a, ()> for MigrationLint<'b, 'c, 'tcx> {
969+
impl<'a, 'b, 'tcx> Diagnostic<'a, ()> for MigrationLint<'b, 'tcx> {
970970
fn into_diag(self, dcx: DiagCtxtHandle<'a>, level: Level) -> Diag<'a, ()> {
971971
let Self { closure_def_id, this, body_id, need_migrations, migration_message } =
972972
self;
@@ -2084,8 +2084,8 @@ fn drop_location_span(tcx: TyCtxt<'_>, hir_id: HirId) -> Span {
20842084
tcx.sess.source_map().end_point(owner_span)
20852085
}
20862086

2087-
struct InferBorrowKind<'fcx, 'a, 'tcx> {
2088-
fcx: &'fcx FnCtxt<'a, 'tcx>,
2087+
struct InferBorrowKind<'a, 'tcx> {
2088+
fcx: &'a FnCtxt<'a, 'tcx>,
20892089
// The def-id of the closure whose kind and upvar accesses are being inferred.
20902090
closure_def_id: LocalDefId,
20912091

@@ -2119,7 +2119,7 @@ struct InferBorrowKind<'fcx, 'a, 'tcx> {
21192119
fake_reads: Vec<(Place<'tcx>, FakeReadCause, HirId)>,
21202120
}
21212121

2122-
impl<'fcx, 'a, 'tcx> euv::Delegate<'tcx> for InferBorrowKind<'fcx, 'a, 'tcx> {
2122+
impl<'a, 'tcx> euv::Delegate<'tcx> for InferBorrowKind<'a, 'tcx> {
21232123
#[instrument(skip(self), level = "debug")]
21242124
fn fake_read(
21252125
&mut self,

compiler/rustc_lint/src/default_could_be_derived.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,15 +156,15 @@ impl<'tcx> LateLintPass<'tcx> for DefaultCouldBeDerived {
156156
}
157157
}
158158

159-
struct WrongDefaultImpl<'a, 'hir, 'tcx> {
159+
struct WrongDefaultImpl<'a, 'tcx> {
160160
tcx: TyCtxt<'tcx>,
161161
type_def_id: DefId,
162-
orig_fields: FxHashMap<Symbol, &'a hir::FieldDef<'hir>>,
163-
fields: &'a [hir::ExprField<'hir>],
162+
orig_fields: FxHashMap<Symbol, &'a hir::FieldDef<'tcx>>,
163+
fields: &'a [hir::ExprField<'tcx>],
164164
impl_span: Span,
165165
}
166166

167-
impl<'a, 'b, 'hir, 'tcx> Diagnostic<'a, ()> for WrongDefaultImpl<'b, 'hir, 'tcx> {
167+
impl<'a, 'b, 'tcx> Diagnostic<'a, ()> for WrongDefaultImpl<'b, 'tcx> {
168168
fn into_diag(self, dcx: DiagCtxtHandle<'a>, level: Level) -> Diag<'a, ()> {
169169
let Self { tcx, type_def_id, orig_fields, fields, impl_span } = self;
170170
let mut diag =

0 commit comments

Comments
 (0)