Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 869bd03

Browse files
committed
Simplify UnusedExterns lifetimes.
In practice, 'a and 'b and 'c are always the same. This change makes `UnusedExterns` more like `ArtifactNotification`, which uses a single lifetime 'a in multiple ways.
1 parent c1f0163 commit 869bd03

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

compiler/rustc_errors/src/json.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ enum EmitTyped<'a> {
162162
Diagnostic(Diagnostic),
163163
Artifact(ArtifactNotification<'a>),
164164
FutureIncompat(FutureIncompatReport<'a>),
165-
UnusedExtern(UnusedExterns<'a, 'a, 'a>),
165+
UnusedExtern(UnusedExterns<'a>),
166166
}
167167

168168
impl Translate for JsonEmitter {
@@ -332,11 +332,11 @@ struct FutureIncompatReport<'a> {
332332
// We could unify this struct the one in rustdoc but they have different
333333
// ownership semantics, so doing so would create wasteful allocations.
334334
#[derive(Serialize)]
335-
struct UnusedExterns<'a, 'b, 'c> {
335+
struct UnusedExterns<'a> {
336336
/// The severity level of the unused dependencies lint
337337
lint_level: &'a str,
338338
/// List of unused externs by their names.
339-
unused_extern_names: &'b [&'c str],
339+
unused_extern_names: &'a [&'a str],
340340
}
341341

342342
impl Diagnostic {

0 commit comments

Comments
 (0)