Skip to content

Commit c28e303

Browse files
committed
Auto merge of #155552 - JonathanBrouwer:rollup-JKIpTuW, r=JonathanBrouwer
Rollup of 11 pull requests Successful merges: - #154654 (Move `std::io::ErrorKind` to `core::io`) - #145270 (Fix an ICE observed with an explicit tail-call in a default trait method) - #154895 (borrowck: Apply `user_arg_index` nomenclature more broadly) - #155213 (resolve: Make sure visibilities of import declarations make sense) - #155346 (`single_use_lifetimes`: respect `anonymous_lifetime_in_impl_trait`) - #155517 (Add a test for Mach-O `#[link_section]` API inherited from LLVM) - #155549 (Remove some unnecessary lifetimes.) - #154248 (resolve : mark repr_simd as internal) - #154772 (slightly optimize the `non-camel-case-types` lint) - #155541 (Add `#[rust_analyzer::prefer_underscore_import]` to the traits in `rustc_type_ir::inherent`) - #155544 (bootstrap: Make "detected modifications" for download-rustc less verbose)
2 parents 91367b0 + 02dda73 commit c28e303

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>>,
@@ -2629,7 +2629,7 @@ impl<'a, 'b, 'tcx> FnCallDiagCtxt<'a, 'b, 'tcx> {
26292629
(suggestions, labels, suggestion_text)
26302630
}
26312631

2632-
fn label_generic_mismatches(&self, err: &mut Diag<'b>) {
2632+
fn label_generic_mismatches(&self, err: &mut Diag<'a>) {
26332633
self.fn_ctxt.label_generic_mismatches(
26342634
err,
26352635
self.fn_def_id,
@@ -2805,22 +2805,22 @@ impl<'a, 'b, 'tcx> FnCallDiagCtxt<'a, 'b, 'tcx> {
28052805
}
28062806
}
28072807

2808-
struct ArgMatchingCtxt<'a, 'b, 'tcx> {
2809-
args_ctxt: ArgsCtxt<'a, 'b, 'tcx>,
2808+
struct ArgMatchingCtxt<'a, 'tcx> {
2809+
args_ctxt: ArgsCtxt<'a, 'tcx>,
28102810
provided_arg_tys: IndexVec<ProvidedIdx, (Ty<'tcx>, Span)>,
28112811
}
28122812

2813-
impl<'a, 'b, 'tcx> Deref for ArgMatchingCtxt<'a, 'b, 'tcx> {
2814-
type Target = ArgsCtxt<'a, 'b, 'tcx>;
2813+
impl<'a, 'tcx> Deref for ArgMatchingCtxt<'a, 'tcx> {
2814+
type Target = ArgsCtxt<'a, 'tcx>;
28152815

28162816
fn deref(&self) -> &Self::Target {
28172817
&self.args_ctxt
28182818
}
28192819
}
28202820

2821-
impl<'a, 'b, 'tcx> ArgMatchingCtxt<'a, 'b, 'tcx> {
2821+
impl<'a, 'tcx> ArgMatchingCtxt<'a, 'tcx> {
28222822
fn new(
2823-
arg: &'a FnCtxt<'b, 'tcx>,
2823+
arg: &'a FnCtxt<'a, 'tcx>,
28242824
compatibility_diagonal: IndexVec<ProvidedIdx, Compatibility<'tcx>>,
28252825
formal_and_expected_inputs: IndexVec<ExpectedIdx, (Ty<'tcx>, Ty<'tcx>)>,
28262826
provided_args: IndexVec<ProvidedIdx, &'tcx Expr<'tcx>>,
@@ -2951,23 +2951,23 @@ impl<'a, 'b, 'tcx> ArgMatchingCtxt<'a, 'b, 'tcx> {
29512951
}
29522952
}
29532953

2954-
struct ArgsCtxt<'a, 'b, 'tcx> {
2955-
call_ctxt: CallCtxt<'a, 'b, 'tcx>,
2954+
struct ArgsCtxt<'a, 'tcx> {
2955+
call_ctxt: CallCtxt<'a, 'tcx>,
29562956
call_metadata: CallMetadata,
29572957
args_span: Span,
29582958
}
29592959

2960-
impl<'a, 'b, 'tcx> Deref for ArgsCtxt<'a, 'b, 'tcx> {
2961-
type Target = CallCtxt<'a, 'b, 'tcx>;
2960+
impl<'a, 'tcx> Deref for ArgsCtxt<'a, 'tcx> {
2961+
type Target = CallCtxt<'a, 'tcx>;
29622962

29632963
fn deref(&self) -> &Self::Target {
29642964
&self.call_ctxt
29652965
}
29662966
}
29672967

2968-
impl<'a, 'b, 'tcx> ArgsCtxt<'a, 'b, 'tcx> {
2968+
impl<'a, 'tcx> ArgsCtxt<'a, 'tcx> {
29692969
fn new(
2970-
arg: &'a FnCtxt<'b, 'tcx>,
2970+
arg: &'a FnCtxt<'a, 'tcx>,
29712971
compatibility_diagonal: IndexVec<ProvidedIdx, Compatibility<'tcx>>,
29722972
formal_and_expected_inputs: IndexVec<ExpectedIdx, (Ty<'tcx>, Ty<'tcx>)>,
29732973
provided_args: IndexVec<ProvidedIdx, &'tcx Expr<'tcx>>,
@@ -2978,7 +2978,7 @@ impl<'a, 'b, 'tcx> ArgsCtxt<'a, 'b, 'tcx> {
29782978
call_expr: &'tcx Expr<'tcx>,
29792979
tuple_arguments: TupleArgumentsFlag,
29802980
) -> Self {
2981-
let call_ctxt: CallCtxt<'_, '_, '_> = CallCtxt::new(
2981+
let call_ctxt: CallCtxt<'_, '_> = CallCtxt::new(
29822982
arg,
29832983
compatibility_diagonal,
29842984
formal_and_expected_inputs,
@@ -3085,8 +3085,8 @@ struct CallMetadata {
30853085
is_method: bool,
30863086
}
30873087

3088-
struct CallCtxt<'a, 'b, 'tcx> {
3089-
fn_ctxt: &'a FnCtxt<'b, 'tcx>,
3088+
struct CallCtxt<'a, 'tcx> {
3089+
fn_ctxt: &'a FnCtxt<'a, 'tcx>,
30903090
compatibility_diagonal: IndexVec<ProvidedIdx, Compatibility<'tcx>>,
30913091
formal_and_expected_inputs: IndexVec<ExpectedIdx, (Ty<'tcx>, Ty<'tcx>)>,
30923092
provided_args: IndexVec<ProvidedIdx, &'tcx hir::Expr<'tcx>>,
@@ -3100,17 +3100,17 @@ struct CallCtxt<'a, 'b, 'tcx> {
31003100
callee_ty: Option<Ty<'tcx>>,
31013101
}
31023102

3103-
impl<'a, 'b, 'tcx> Deref for CallCtxt<'a, 'b, 'tcx> {
3104-
type Target = &'a FnCtxt<'b, 'tcx>;
3103+
impl<'a, 'tcx> Deref for CallCtxt<'a, 'tcx> {
3104+
type Target = &'a FnCtxt<'a, 'tcx>;
31053105

31063106
fn deref(&self) -> &Self::Target {
31073107
&self.fn_ctxt
31083108
}
31093109
}
31103110

3111-
impl<'a, 'b, 'tcx> CallCtxt<'a, 'b, 'tcx> {
3111+
impl<'a, 'tcx> CallCtxt<'a, 'tcx> {
31123112
fn new(
3113-
fn_ctxt: &'a FnCtxt<'b, 'tcx>,
3113+
fn_ctxt: &'a FnCtxt<'a, 'tcx>,
31143114
compatibility_diagonal: IndexVec<ProvidedIdx, Compatibility<'tcx>>,
31153115
formal_and_expected_inputs: IndexVec<ExpectedIdx, (Ty<'tcx>, Ty<'tcx>)>,
31163116
provided_args: IndexVec<ProvidedIdx, &'tcx hir::Expr<'tcx>>,
@@ -3120,7 +3120,7 @@ impl<'a, 'b, 'tcx> CallCtxt<'a, 'b, 'tcx> {
31203120
call_span: Span,
31213121
call_expr: &'tcx hir::Expr<'tcx>,
31223122
tuple_arguments: TupleArgumentsFlag,
3123-
) -> CallCtxt<'a, 'b, 'tcx> {
3123+
) -> CallCtxt<'a, 'tcx> {
31243124
let callee_expr = match &call_expr.peel_blocks().kind {
31253125
hir::ExprKind::Call(callee, _) => Some(*callee),
31263126
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)