You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since the SpanExt is in scope the intention was for .end() to return a Span object which works since it implements MultiSpan required by span_error. With span-locations enabled It returns a LineColumn which does not implement MultiSpan:
--> int-enum-1.0.0/src/ast.rs:120:36
|
120 | diag = diag.span_error(v.span().end(),"missing discriminant");
| ---------- ^^^^^^^^^^^^^^ the trait `proc_macro2_diagnostics::diagnostic::MultiSpan` is not implementedfor `LineColumn`
| |
| required by a bound introduced by this call
|
= help: the following other types implement trait `proc_macro2_diagnostics::diagnostic::MultiSpan`:
proc_macro2::SpanVec<proc_macro2::Span>
&'a [proc_macro2::Span]
note: required by a bound in `proc_macro2_diagnostics::Diagnostic::span_error`
The solution would be to refer to the trait explicitly:
SpanExt
defines a method:And implements it on
Span
. However,proc-marco2
with featurespan-locations
also defines a method onSpan
:When calling
end
on aSpan
object with that feature enabled the above method takes precedence. This breaks code in anast
module where it defines:Since the
SpanExt
is in scope the intention was for.end()
to return aSpan
object which works since it implementsMultiSpan
required byspan_error
. Withspan-locations
enabled It returns aLineColumn
which does not implementMultiSpan
:The solution would be to refer to the trait explicitly:
The text was updated successfully, but these errors were encountered: