Skip to content

Commit

Permalink
Unrolled build for rust-lang#122503
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#122503 - compiler-errors:trait-alias-wf, r=Nilstrieb

Make `SubdiagMessageOp` well-formed

`WF(Diag<'_, G>)` requires `G: EmissionGuarantee`, but we don't currently check this is true due to limitations in the solver. Probably still worth enforcing.

r? `@nnethercote` (or anyone can r  this, really)
  • Loading branch information
rust-timer committed Mar 15, 2024
2 parents f4b771b 6e4cd8b commit 7f20300
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion compiler/rustc_errors/src/diagnostic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 189,8 @@ where
);
}

pub trait SubdiagMessageOp<G> = Fn(&mut Diag<'_, G>, SubdiagMessage) -> SubdiagMessage;
pub trait SubdiagMessageOp<G: EmissionGuarantee> =
Fn(&mut Diag<'_, G>, SubdiagMessage) -> SubdiagMessage;

/// Trait implemented by lint types. This should not be implemented manually. Instead, use
/// `#[derive(LintDiagnostic)]` -- see [rustc_macros::LintDiagnostic].
Expand Down

0 comments on commit 7f20300

Please sign in to comment.