From 6eb3d2d8a63bc38a53a472932a476b78c4fdb34c Mon Sep 17 00:00:00 2001 From: Paul Colomiets Date: Sun, 20 Feb 2022 03:01:18 +0200 Subject: [PATCH] fix(derive): absolute path references to Diagnostic (#118) --- miette-derive/src/related.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/miette-derive/src/related.rs b/miette-derive/src/related.rs index b2342a3..b81df5f 100644 --- a/miette-derive/src/related.rs +++ b/miette-derive/src/related.rs @@ -56,7 +56,7 @@ impl Related { quote! { Self::#ident #display_pat => { std::option::Option::Some(std::boxed::Box::new( - #rel.iter().map(|x| -> &(dyn Diagnostic) { &*x }) + #rel.iter().map(|x| -> &(dyn miette::Diagnostic) { &*x }) )) } } @@ -69,7 +69,7 @@ impl Related { let rel = &self.0; Some(quote! { fn related<'a>(&'a self) -> std::option::Option + 'a>> { - std::option::Option::Some(std::boxed::Box::new(self.#rel.iter().map(|x| -> &(dyn Diagnostic) { &*x }))) + std::option::Option::Some(std::boxed::Box::new(self.#rel.iter().map(|x| -> &(dyn miette::Diagnostic) { &*x }))) } }) }