The #[diagnostic_source] attribute already worked for Box<dyn Diagnostic>, but not for the highly-related Box<dyn Diagnostic + Send> and Box<dyn Diagnostic + Send + Sync> types!
It looks like someone already solved this issue for std::error:Error with a macro_rules! implementation, so I've done the same here to let those new cases compile! Without those Borrow<dyn Diagnostic> impls, you end up with compiler errors coming from inside of the derive macro:
Let me know if you have any questions! I'll separately try to sort out those failing tests (unrelated to this change) in another PR :)
With some luck, #339 should fix the tests failing for everyone — I don't think there was a behavior change, I think the reference strings just got mangled somehow in a commit from three days ago.
Hello again! Nice and small change this time :)
The
#[diagnostic_source]
attribute already worked forBox<dyn Diagnostic>
, but not for the highly-relatedBox<dyn Diagnostic + Send>
andBox<dyn Diagnostic + Send + Sync>
types!It looks like someone already solved this issue for
std::error:Error
with amacro_rules!
implementation, so I've done the same here to let those new cases compile! Without thoseBorrow<dyn Diagnostic>
impls, you end up with compiler errors coming from inside of the derive macro:Let me know if you have any questions! I'll separately try to sort out those failing tests (unrelated to this change) in another PR :)