From a728f72f62d35ec03c623fcb5244dff30b0fed84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20S=C3=A1=20de=20Mello?= Date: Mon, 18 Nov 2024 15:37:18 +0000 Subject: [PATCH] better generics --- src/diagnostic.rs | 110 +++++++++++++++++----------------------------- src/pointer.rs | 2 +- 2 files changed, 42 insertions(+), 70 deletions(-) diff --git a/src/diagnostic.rs b/src/diagnostic.rs index f49a6f8..445a8f4 100644 --- a/src/diagnostic.rs +++ b/src/diagnostic.rs @@ -8,7 +8,7 @@ pub trait Diagnostic<'s>: Sized + private::Sealed { type Subject: private::IntoOwned; /// Combine the error with its subject to generate a [`Report`]. - fn into_report(self, subject: impl Into) -> Report<'s, Self> { + fn into_report(self, subject: impl Into) -> Report { Report::new(self, subject) } @@ -42,15 +42,15 @@ impl From