Use LayoutError
's implementation of IntoDiagnostic
This commit is contained in:
parent
0381e51822
commit
a8a8055cc7
4 changed files with 7 additions and 18 deletions
|
@ -189,8 +189,8 @@ pub enum LayoutError<'tcx> {
|
|||
NormalizationFailure(Ty<'tcx>, NormalizationError<'tcx>),
|
||||
}
|
||||
|
||||
impl<'a> IntoDiagnostic<'a, !> for LayoutError<'a> {
|
||||
fn into_diagnostic(self, handler: &'a Handler) -> DiagnosticBuilder<'a, !> {
|
||||
impl IntoDiagnostic<'_, !> for LayoutError<'_> {
|
||||
fn into_diagnostic(self, handler: &Handler) -> DiagnosticBuilder<'_, !> {
|
||||
let mut diag = handler.struct_fatal("");
|
||||
|
||||
match self {
|
||||
|
@ -1126,8 +1126,8 @@ impl<'tcx> fmt::Display for FnAbiError<'tcx> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'tcx> IntoDiagnostic<'tcx, !> for FnAbiError<'tcx> {
|
||||
fn into_diagnostic(self, handler: &'tcx Handler) -> DiagnosticBuilder<'tcx, !> {
|
||||
impl IntoDiagnostic<'_, !> for FnAbiError<'_> {
|
||||
fn into_diagnostic(self, handler: &Handler) -> DiagnosticBuilder<'_, !> {
|
||||
handler.struct_fatal(self.to_string())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue