Open gavrilikhin-d opened 11 months ago
I've accidentally asked the same in #366 ... It looks fundamentally like the ever-annoying coherence issue with impl From<T> for T
in the standard library...
I might be possible to remove the From
impl for Report
, meaning you also lose .into()
, but then there are a lot more internal challenges I can't particularly figure out... Tragically, this seems like a very very hard change to make...
Out of curiosity, why are you wanting Report
to impl Diagnostic
? Is it also for .report_err
, or for something else?
It looks like
Report
can be casted to diagnostic reference, since it implementsAsRef<dyn Diagnostic + Send + Sync>
. But I can't find an implementation ofDiagnostic
forReport
itself for some reason.It could help you remove special case
impl<C: SourceCode> Diagnostic for WithSourceCode<Report, C>