Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
ac5e448
resolve : issue 154034
lms0806 Mar 23, 2026
a4e5f90
slightly optimize the `non-camel-case-types` lint
llogiq Apr 3, 2026
2d14e74
borrowck: Apply `user_arg_index` nomenclature more broadly
Enselic Apr 6, 2026
103923f
`single_use_lifetimes`: respect `anonymous_lifetime_in_impl_trait`
GrigorenkoPV Apr 15, 2026
3695fef
Add a test for Mach-O link_section API inherited from LLVM
madsmtm Apr 19, 2026
08bd077
Make documentation for `std::io::ErrorKind` `core::io` compatible
bushrat011899 Apr 1, 2026
6960e7c
Adjust usage of `std::io::ErrorKind` to be `core` compatible
bushrat011899 Apr 1, 2026
592c815
Add `#[rust_analyzer::prefer_underscore_import]` to the traits in `ru…
ChayimFriedman2 Apr 20, 2026
38debc3
bootstrap: Make "detected modifications" for download-rustc less verbose
jyn514 Apr 20, 2026
fe2b39f
Move `std::io::ErrorKind` to `core::io`
bushrat011899 Apr 14, 2026
5e00b8e
Remove some unnecessary lifetimes.
nnethercote Apr 20, 2026
ac5734a
Fix an ICE when using `become` in a default trait method
jakubadamw Aug 11, 2025
38c14f3
resolve: Do not create unnecessary `ParentScope` when building extern…
petrochenkov Feb 17, 2026
394c717
resolve: Make sure visibilities of import declarations make sense
petrochenkov Apr 12, 2026
3ca43dc
Rollup merge of #154654 - bushrat011899:core_io_error_kind, r=Mark-Si…
JonathanBrouwer Apr 20, 2026
3530d82
Rollup merge of #145270 - jakubadamw:issue-144985, r=WaffleLapkin
JonathanBrouwer Apr 20, 2026
6245e37
Rollup merge of #154895 - Enselic:user-arg-index, r=jdonszelmann
JonathanBrouwer Apr 20, 2026
d839949
Rollup merge of #155213 - petrochenkov:importvis, r=mu001999
JonathanBrouwer Apr 20, 2026
1d9b32a
Rollup merge of #155346 - GrigorenkoPV:single-use-lifetimes, r=jdonsz…
JonathanBrouwer Apr 20, 2026
356fdf0
Rollup merge of #155517 - madsmtm:test-macho-link-section-attrs, r=bj…
JonathanBrouwer Apr 20, 2026
eceed7c
Rollup merge of #155549 - nnethercote:rm-lifetimes, r=JohnTitor
JonathanBrouwer Apr 20, 2026
7162558
Rollup merge of #154248 - lms0806:issue_154034, r=TaKO8Ki
JonathanBrouwer Apr 20, 2026
c4f995c
Rollup merge of #154772 - llogiq:nonstandard-style-perf, r=adwinwhite
JonathanBrouwer Apr 20, 2026
26f457a
Rollup merge of #155541 - ChayimFriedman2:import-underscore, r=TaKO8Ki
JonathanBrouwer Apr 20, 2026
02dda73
Rollup merge of #155544 - jyn514:download-rustc-verbosity, r=jieyouxu
JonathanBrouwer Apr 20, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions compiler/rustc_borrowck/src/diagnostics/region_name.rs
Original file line number Diff line number Diff line change
Expand Up @@ -499,18 +499,18 @@ impl<'tcx> MirBorrowckCtxt<'_, '_, 'tcx> {
fr: RegionVid,
) -> Option<RegionName> {
let implicit_inputs = self.regioncx.universal_regions().defining_ty.implicit_inputs();
let argument_index = self.regioncx.get_argument_index_for_region(self.infcx.tcx, fr)?;
let user_arg_index = self.regioncx.get_user_arg_index_for_region(self.infcx.tcx, fr)?;

let arg_ty = self.regioncx.universal_regions().unnormalized_input_tys
[implicit_inputs + argument_index];
[implicit_inputs + user_arg_index];
let (_, span) = self.regioncx.get_argument_name_and_span_for_region(
self.body,
self.local_names(),
argument_index,
user_arg_index,
);

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

fn get_argument_hir_ty_for_highlighting(
&self,
argument_index: usize,
user_arg_index: usize,
) -> Option<&hir::Ty<'tcx>> {
let fn_decl = self.infcx.tcx.hir_fn_decl_by_hir_id(self.mir_hir_id())?;
let argument_hir_ty: &hir::Ty<'_> = fn_decl.inputs.get(argument_index)?;
// Closures don't have implicit self arguments in HIR, so use `user_arg_index` directly.
let argument_hir_ty: &hir::Ty<'_> = fn_decl.inputs.get(user_arg_index)?;
match argument_hir_ty.kind {
// This indicates a variable with no type annotation, like
// `|x|`... in that case, we can't highlight the type but
Expand Down
18 changes: 9 additions & 9 deletions compiler/rustc_borrowck/src/diagnostics/var_name.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
})
.or_else(|| {
debug!("get_var_name_and_span_for_region: attempting argument");
self.get_argument_index_for_region(tcx, fr).and_then(|index| {
self.get_user_arg_index_for_region(tcx, fr).and_then(|index| {
let local = self.user_arg_index_to_local(body, index);
if body_uses_local(body, local) {
Some(self.get_argument_name_and_span_for_region(body, local_names, index))
Expand Down Expand Up @@ -93,26 +93,26 @@ impl<'tcx> RegionInferenceContext<'tcx> {
///
/// N.B., in the case of a closure, the index is indexing into the signature as seen by the
/// user - in particular, index 0 is not the implicit self parameter.
pub(crate) fn get_argument_index_for_region(
pub(crate) fn get_user_arg_index_for_region(
&self,
tcx: TyCtxt<'tcx>,
fr: RegionVid,
) -> Option<usize> {
let implicit_inputs = self.universal_regions().defining_ty.implicit_inputs();
let argument_index =
let user_arg_index =
self.universal_regions().unnormalized_input_tys.iter().skip(implicit_inputs).position(
|arg_ty| {
debug!("get_argument_index_for_region: arg_ty = {arg_ty:?}");
debug!("get_user_arg_index_for_region: arg_ty = {arg_ty:?}");
tcx.any_free_region_meets(arg_ty, |r| r.as_var() == fr)
},
)?;

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

Some(argument_index)
Some(user_arg_index)
}

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

let argument_name = local_names[argument_local];
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_borrowck/src/polonius/dump.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ impl LocalizedConstraintGraphVisitor for LocalizedOutlivesConstraintCollector {
/// - a mermaid graph of the NLL regions and the constraints between them
/// - a mermaid graph of the NLL SCCs and the constraints between them
fn emit_polonius_dump<'tcx>(
dumper: &MirDumper<'_, '_, 'tcx>,
dumper: &MirDumper<'_, 'tcx>,
body: &Body<'tcx>,
regioncx: &RegionInferenceContext<'tcx>,
borrow_set: &BorrowSet<'tcx>,
Expand Down Expand Up @@ -186,7 +186,7 @@ fn emit_polonius_dump<'tcx>(

/// Emits the polonius MIR, as escaped HTML.
fn emit_html_mir<'tcx>(
dumper: &MirDumper<'_, '_, 'tcx>,
dumper: &MirDumper<'_, 'tcx>,
body: &Body<'tcx>,
out: &mut dyn io::Write,
) -> io::Result<()> {
Expand Down
3 changes: 3 additions & 0 deletions compiler/rustc_borrowck/src/universal_regions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ pub(crate) struct UniversalRegions<'tcx> {
///
/// N.B., associated types in these types have not been normalized,
/// as the name suggests. =)
///
/// N.B., in the case of a closure, index 0 is the implicit self parameter,
/// and not the first input as seen by the user.
pub unnormalized_input_tys: &'tcx [Ty<'tcx>],

pub yield_ty: Option<Ty<'tcx>>,
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_feature/src/unstable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,8 @@ declare_features! (
(internal, panic_runtime, "1.10.0", Some(32837)),
/// Allows using pattern types.
(internal, pattern_types, "1.79.0", Some(123646)),
/// Allows `repr(simd)` and importing the various simd intrinsics.
(internal, repr_simd, "1.4.0", Some(27731)),
/// Allows using compiler's own crates.
(unstable, rustc_private, "1.0.0", Some(27812)),
/// Allows using internal rustdoc features like `doc(keyword)`.
Expand Down Expand Up @@ -657,8 +659,6 @@ declare_features! (
(incomplete, ref_pat_eat_one_layer_2024_structural, "1.81.0", Some(123076)),
/// Allows using the `#[register_tool]` attribute.
(unstable, register_tool, "1.41.0", Some(66079)),
/// Allows `repr(simd)` and importing the various simd intrinsics.
(unstable, repr_simd, "1.4.0", Some(27731)),
/// Allows bounding the return type of AFIT/RPITIT.
(unstable, return_type_notation, "1.70.0", Some(109417)),
/// Target features on riscv.
Expand Down
54 changes: 27 additions & 27 deletions compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1901,14 +1901,14 @@ impl FnParam<'_> {
}
}

struct FnCallDiagCtxt<'a, 'b, 'tcx> {
arg_matching_ctxt: ArgMatchingCtxt<'a, 'b, 'tcx>,
struct FnCallDiagCtxt<'a, 'tcx> {
arg_matching_ctxt: ArgMatchingCtxt<'a, 'tcx>,
errors: Vec<Error<'tcx>>,
matched_inputs: IndexVec<ExpectedIdx, Option<ProvidedIdx>>,
}

impl<'a, 'b, 'tcx> Deref for FnCallDiagCtxt<'a, 'b, 'tcx> {
type Target = ArgMatchingCtxt<'a, 'b, 'tcx>;
impl<'a, 'tcx> Deref for FnCallDiagCtxt<'a, 'tcx> {
type Target = ArgMatchingCtxt<'a, 'tcx>;

fn deref(&self) -> &Self::Target {
&self.arg_matching_ctxt
Expand All @@ -1921,9 +1921,9 @@ enum ArgumentsFormatting {
Multiline { fallback_indent: String, brace_indent: String },
}

impl<'a, 'b, 'tcx> FnCallDiagCtxt<'a, 'b, 'tcx> {
impl<'a, 'tcx> FnCallDiagCtxt<'a, 'tcx> {
fn new(
arg: &'a FnCtxt<'b, 'tcx>,
arg: &'a FnCtxt<'a, 'tcx>,
compatibility_diagonal: IndexVec<ProvidedIdx, Compatibility<'tcx>>,
formal_and_expected_inputs: IndexVec<ExpectedIdx, (Ty<'tcx>, Ty<'tcx>)>,
provided_args: IndexVec<ProvidedIdx, &'tcx Expr<'tcx>>,
Expand Down Expand Up @@ -2618,7 +2618,7 @@ impl<'a, 'b, 'tcx> FnCallDiagCtxt<'a, 'b, 'tcx> {
(suggestions, labels, suggestion_text)
}

fn label_generic_mismatches(&self, err: &mut Diag<'b>) {
fn label_generic_mismatches(&self, err: &mut Diag<'a>) {
self.fn_ctxt.label_generic_mismatches(
err,
self.fn_def_id,
Expand Down Expand Up @@ -2778,22 +2778,22 @@ impl<'a, 'b, 'tcx> FnCallDiagCtxt<'a, 'b, 'tcx> {
}
}

struct ArgMatchingCtxt<'a, 'b, 'tcx> {
args_ctxt: ArgsCtxt<'a, 'b, 'tcx>,
struct ArgMatchingCtxt<'a, 'tcx> {
args_ctxt: ArgsCtxt<'a, 'tcx>,
provided_arg_tys: IndexVec<ProvidedIdx, (Ty<'tcx>, Span)>,
}

impl<'a, 'b, 'tcx> Deref for ArgMatchingCtxt<'a, 'b, 'tcx> {
type Target = ArgsCtxt<'a, 'b, 'tcx>;
impl<'a, 'tcx> Deref for ArgMatchingCtxt<'a, 'tcx> {
type Target = ArgsCtxt<'a, 'tcx>;

fn deref(&self) -> &Self::Target {
&self.args_ctxt
}
}

impl<'a, 'b, 'tcx> ArgMatchingCtxt<'a, 'b, 'tcx> {
impl<'a, 'tcx> ArgMatchingCtxt<'a, 'tcx> {
fn new(
arg: &'a FnCtxt<'b, 'tcx>,
arg: &'a FnCtxt<'a, 'tcx>,
compatibility_diagonal: IndexVec<ProvidedIdx, Compatibility<'tcx>>,
formal_and_expected_inputs: IndexVec<ExpectedIdx, (Ty<'tcx>, Ty<'tcx>)>,
provided_args: IndexVec<ProvidedIdx, &'tcx Expr<'tcx>>,
Expand Down Expand Up @@ -2924,23 +2924,23 @@ impl<'a, 'b, 'tcx> ArgMatchingCtxt<'a, 'b, 'tcx> {
}
}

struct ArgsCtxt<'a, 'b, 'tcx> {
call_ctxt: CallCtxt<'a, 'b, 'tcx>,
struct ArgsCtxt<'a, 'tcx> {
call_ctxt: CallCtxt<'a, 'tcx>,
call_metadata: CallMetadata,
args_span: Span,
}

impl<'a, 'b, 'tcx> Deref for ArgsCtxt<'a, 'b, 'tcx> {
type Target = CallCtxt<'a, 'b, 'tcx>;
impl<'a, 'tcx> Deref for ArgsCtxt<'a, 'tcx> {
type Target = CallCtxt<'a, 'tcx>;

fn deref(&self) -> &Self::Target {
&self.call_ctxt
}
}

impl<'a, 'b, 'tcx> ArgsCtxt<'a, 'b, 'tcx> {
impl<'a, 'tcx> ArgsCtxt<'a, 'tcx> {
fn new(
arg: &'a FnCtxt<'b, 'tcx>,
arg: &'a FnCtxt<'a, 'tcx>,
compatibility_diagonal: IndexVec<ProvidedIdx, Compatibility<'tcx>>,
formal_and_expected_inputs: IndexVec<ExpectedIdx, (Ty<'tcx>, Ty<'tcx>)>,
provided_args: IndexVec<ProvidedIdx, &'tcx Expr<'tcx>>,
Expand All @@ -2951,7 +2951,7 @@ impl<'a, 'b, 'tcx> ArgsCtxt<'a, 'b, 'tcx> {
call_expr: &'tcx Expr<'tcx>,
tuple_arguments: TupleArgumentsFlag,
) -> Self {
let call_ctxt: CallCtxt<'_, '_, '_> = CallCtxt::new(
let call_ctxt: CallCtxt<'_, '_> = CallCtxt::new(
arg,
compatibility_diagonal,
formal_and_expected_inputs,
Expand Down Expand Up @@ -3058,8 +3058,8 @@ struct CallMetadata {
is_method: bool,
}

struct CallCtxt<'a, 'b, 'tcx> {
fn_ctxt: &'a FnCtxt<'b, 'tcx>,
struct CallCtxt<'a, 'tcx> {
fn_ctxt: &'a FnCtxt<'a, 'tcx>,
compatibility_diagonal: IndexVec<ProvidedIdx, Compatibility<'tcx>>,
formal_and_expected_inputs: IndexVec<ExpectedIdx, (Ty<'tcx>, Ty<'tcx>)>,
provided_args: IndexVec<ProvidedIdx, &'tcx hir::Expr<'tcx>>,
Expand All @@ -3073,17 +3073,17 @@ struct CallCtxt<'a, 'b, 'tcx> {
callee_ty: Option<Ty<'tcx>>,
}

impl<'a, 'b, 'tcx> Deref for CallCtxt<'a, 'b, 'tcx> {
type Target = &'a FnCtxt<'b, 'tcx>;
impl<'a, 'tcx> Deref for CallCtxt<'a, 'tcx> {
type Target = &'a FnCtxt<'a, 'tcx>;

fn deref(&self) -> &Self::Target {
&self.fn_ctxt
}
}

impl<'a, 'b, 'tcx> CallCtxt<'a, 'b, 'tcx> {
impl<'a, 'tcx> CallCtxt<'a, 'tcx> {
fn new(
fn_ctxt: &'a FnCtxt<'b, 'tcx>,
fn_ctxt: &'a FnCtxt<'a, 'tcx>,
compatibility_diagonal: IndexVec<ProvidedIdx, Compatibility<'tcx>>,
formal_and_expected_inputs: IndexVec<ExpectedIdx, (Ty<'tcx>, Ty<'tcx>)>,
provided_args: IndexVec<ProvidedIdx, &'tcx hir::Expr<'tcx>>,
Expand All @@ -3093,7 +3093,7 @@ impl<'a, 'b, 'tcx> CallCtxt<'a, 'b, 'tcx> {
call_span: Span,
call_expr: &'tcx hir::Expr<'tcx>,
tuple_arguments: TupleArgumentsFlag,
) -> CallCtxt<'a, 'b, 'tcx> {
) -> CallCtxt<'a, 'tcx> {
let callee_expr = match &call_expr.peel_blocks().kind {
hir::ExprKind::Call(callee, _) => Some(*callee),
hir::ExprKind::MethodCall(_, receiver, ..) => {
Expand Down
18 changes: 8 additions & 10 deletions compiler/rustc_hir_typeck/src/method/prelude_edition_lints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ use tracing::debug;
use crate::FnCtxt;
use crate::method::probe::{self, Pick};

struct AmbiguousTraitMethodCall<'a, 'b, 'tcx> {
struct AmbiguousTraitMethodCall<'a, 'tcx> {
segment_name: Symbol,
self_expr_span: Span,
pick: &'a Pick<'tcx>,
tcx: TyCtxt<'tcx>,
edition: &'b str,
edition: &'static str,
}

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

struct AmbiguousTraitMethod<'a, 'b, 'tcx, 'pcx, 'fnctx> {
segment: &'a hir::PathSegment<'pcx>,
struct AmbiguousTraitMethod<'a, 'tcx, 'fnctx> {
segment: &'a hir::PathSegment<'tcx>,
call_expr: &'tcx hir::Expr<'tcx>,
self_expr: &'tcx hir::Expr<'tcx>,
pick: &'a Pick<'tcx>,
args: &'tcx [hir::Expr<'tcx>],
edition: &'b str,
edition: &'static str,
span: Span,
this: &'a FnCtxt<'fnctx, 'tcx>,
}

impl<'a, 'b, 'c, 'tcx, 'pcx, 'fnctx> Diagnostic<'a, ()>
for AmbiguousTraitMethod<'b, 'c, 'tcx, 'pcx, 'fnctx>
{
impl<'a, 'c, 'tcx, 'fnctx> Diagnostic<'a, ()> for AmbiguousTraitMethod<'c, 'tcx, 'fnctx> {
fn into_diag(self, dcx: DiagCtxtHandle<'a>, level: Level) -> Diag<'a, ()> {
let Self { segment, call_expr, self_expr, pick, args, edition, span, this } = self;
let mut lint = Diag::new(
Expand Down Expand Up @@ -158,7 +156,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
pub(super) fn lint_edition_dependent_dot_call(
&self,
self_ty: Ty<'tcx>,
segment: &hir::PathSegment<'_>,
segment: &hir::PathSegment<'tcx>,
span: Span,
call_expr: &'tcx hir::Expr<'tcx>,
self_expr: &'tcx hir::Expr<'tcx>,
Expand Down
12 changes: 6 additions & 6 deletions compiler/rustc_hir_typeck/src/upvar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -958,15 +958,15 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
capture_clause: hir::CaptureBy,
span: Span,
) {
struct MigrationLint<'a, 'b, 'tcx> {
struct MigrationLint<'a, 'tcx> {
closure_def_id: LocalDefId,
this: &'a FnCtxt<'b, 'tcx>,
this: &'a FnCtxt<'a, 'tcx>,
body_id: hir::BodyId,
need_migrations: Vec<NeededMigration>,
migration_message: String,
}

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

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

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

impl<'fcx, 'a, 'tcx> euv::Delegate<'tcx> for InferBorrowKind<'fcx, 'a, 'tcx> {
impl<'a, 'tcx> euv::Delegate<'tcx> for InferBorrowKind<'a, 'tcx> {
#[instrument(skip(self), level = "debug")]
fn fake_read(
&mut self,
Expand Down
8 changes: 4 additions & 4 deletions compiler/rustc_lint/src/default_could_be_derived.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,15 +156,15 @@ impl<'tcx> LateLintPass<'tcx> for DefaultCouldBeDerived {
}
}

struct WrongDefaultImpl<'a, 'hir, 'tcx> {
struct WrongDefaultImpl<'a, 'tcx> {
tcx: TyCtxt<'tcx>,
type_def_id: DefId,
orig_fields: FxHashMap<Symbol, &'a hir::FieldDef<'hir>>,
fields: &'a [hir::ExprField<'hir>],
orig_fields: FxHashMap<Symbol, &'a hir::FieldDef<'tcx>>,
fields: &'a [hir::ExprField<'tcx>],
impl_span: Span,
}

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