summaryrefslogtreecommitdiff
path: root/src/diag.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2023-05-11 10:50:30 +0200
committerLaurenz <laurmaedje@gmail.com>2023-05-11 10:50:30 +0200
commit47dff3765de863554ca296448555599fc50d4a8a (patch)
treef632073bd800466d94dae7d19b1d4e28e80ff743 /src/diag.rs
parentd9ba84085e36036409c919cff2e3eb3d126e3bb3 (diff)
Remove 'static bound on `World`
Thanks to improvements in comemo, tracked types don't need to be 'static anymore. This means that the 'static bound on the `World` is now lifted and that the `Route` doesn't need to use unsafe code anymore to manage its lifetime.
Diffstat (limited to 'src/diag.rs')
-rw-r--r--src/diag.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/diag.rs b/src/diag.rs
index 556d3255..a122fe1f 100644
--- a/src/diag.rs
+++ b/src/diag.rs
@@ -130,13 +130,13 @@ impl Display for Tracepoint {
/// Enrich a [`SourceResult`] with a tracepoint.
pub trait Trace<T> {
/// Add the tracepoint to all errors that lie outside the `span`.
- fn trace<F>(self, world: Tracked<dyn World>, make_point: F, span: Span) -> Self
+ fn trace<F>(self, world: Tracked<dyn World + '_>, make_point: F, span: Span) -> Self
where
F: Fn() -> Tracepoint;
}
impl<T> Trace<T> for SourceResult<T> {
- fn trace<F>(self, world: Tracked<dyn World>, make_point: F, span: Span) -> Self
+ fn trace<F>(self, world: Tracked<dyn World + '_>, make_point: F, span: Span) -> Self
where
F: Fn() -> Tracepoint,
{