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
Except for the case in #120, that #265 fixed, and a similar one with explicit dyn, there doesn't seem to be general support for trailing + in a type (after a path).
That is, Trait+, dyn Trait+ and impl Trait+ are all valid Rust types, but syn doesn't accept them.
This playground contains examples of the syntax being accepted by Rust, and also the failure of syn to parse the input.
This was discovered by creduce (likely) removing the RHS of the +, while doing an automated reduce (rust-lang/rust#89195 (comment)).
I tried using rust-reduce on the output of creduce (because of rust-lang/rust#89195 (comment)), and it failed with "expected identifier" (because it relies on syn). However, once rustfmt was ran on that file, rust-reduce was able to work again.
To track down the exact bug that was being found, creduce --not-c script.sh current.rs was used with:
I would be shocked if this is the only thing in the way of reliably parsing creduce-generated programs
Heh, I haven't ran into anything else yet. creduce likes to remove extraneous tokens, so I believe I only got into trouble with this because I had to stop creduce partway through (to change the script to cargo check).
(Of course there's still a concern for anything that uses synwhile the reduction is ongoing)
Except for the case in #120, that #265 fixed, and a similar one with explicit
dyn
, there doesn't seem to be general support for trailing+
in a type (after a path).That is,
Trait+
,dyn Trait+
andimpl Trait+
are all valid Rust types, butsyn
doesn't accept them.This playground contains examples of the syntax being accepted by Rust, and also the failure of
syn
to parse the input.This was discovered by
creduce
(likely) removing the RHS of the+
, while doing an automated reduce (rust-lang/rust#89195 (comment)).I tried using
rust-reduce
on the output ofcreduce
(because of rust-lang/rust#89195 (comment)), and it failed with "expected identifier" (because it relies onsyn
). However, oncerustfmt
was ran on that file,rust-reduce
was able to work again.To track down the exact bug that was being found,
creduce --not-c script.sh current.rs
was used with:as
script.sh
, resulting in this reduction, after 65 seconds (down from a 13856 byte file):The text was updated successfully, but these errors were encountered: