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
I build syn with procmacro2_semver_exempt.
And for such wrong code (a: i32, <) -> i32; it reports span: 1:0 - 1:11, in other words (a: i32, <), but if print ParseStream I can see that it stops on <,
so there is information about exact wrong token,
thus is it possible somehow report where parser stops in case of parenthesized usage?
The error is being triggered on the close parenthesis. The matched set of parentheses carries only a single span covering the set of parentheses so that is where the error is reported.
I fixed this for proc macros in fe89fcc, so that errors can appear on just the opening or just the closing delimiter. When the Group::span_open and Group::span_close methods are stabilized (tracked in rust-lang/rust#54725) we will be able to carry this over to build.rs / main.rs based parsers as well.
I build
syn
withprocmacro2_semver_exempt
.And for such wrong code
(a: i32, <) -> i32;
it reports span: 1:0 - 1:11, in other words(a: i32, <)
, but if print ParseStream I can see that it stops on<
,so there is information about exact wrong token,
thus is it possible somehow report where parser stops in case of
parenthesized
usage?The text was updated successfully, but these errors were encountered: