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
The #[feature(quote)] offers a collection of macros like quote_expr! for turning inline code into AST's. Unfortunately, quote_pat! broken at some point (the interface to parse_pat seems like it probably changed), but we failed to notice because the test for quote macros was xfailed in 9c18510 (circa October 2013).
The test was xfailed because the test itself makes use of IO features (to pretty-print the results and then compare the pretty-print outputs), but this was not robust and according to @alexcrichton we were getting spurious failures.
Anyway, there are at least two action items for this ticket:
Make some new version of the tests that we can un-ignore. I would be happy with e.g. one file that just invokes the macros without checking the correctness of their results, and a second file (perhaps the current ignored one) that both invokes the macros and checks their outputs.
Fix quote_pat! and any other quote_foo! macros that have broken in the meantime.
Here is some sample code illustrating the issue. (Sorry about the length; we could also do more to ease using these macros. :) )
When attempting to compile the code below, I get the following error from rustc
% rustc --version
rustc 0.10-pre (58eeb07 2014-02-12 14:51:48 -0800)
host: x86_64-apple-darwin
% rustc /tmp/qp.rs
/tmp/qp.rs:15:15: 15:41 error: this function takes 0 parameters but 1 parameter was supplied
/tmp/qp.rs:15 let pat = quote_pat!(fake, Some(_));
^~~~~~~~~~~~~~~~~~~~~~~~~~
note: in expansion of quote_pat!
/tmp/qp.rs:15:15: 15:41 note: expansion site
error: aborting due to previous error
%
Triage: @goffrie 's comment and the length of time this has sat, plus changes in how we do syntax extensions, means I'm closing this. @pnkfelix if you think that's wrong let me know!
[`to_string_trait_impl`]: avoid linting if the impl is a specialization
Fixesrust-lang#12263
Oh well... rust-lang/rust-clippy#12122 (comment) 🙃
changelog: [`to_string_trait_impl`]: avoid linting if the impl is a specialization
The
#[feature(quote)]
offers a collection of macros likequote_expr!
for turning inline code into AST's. Unfortunately,quote_pat!
broken at some point (the interface toparse_pat
seems like it probably changed), but we failed to notice because the test for quote macros was xfailed in 9c18510 (circa October 2013).The test was xfailed because the test itself makes use of IO features (to pretty-print the results and then compare the pretty-print outputs), but this was not robust and according to @alexcrichton we were getting spurious failures.
Anyway, there are at least two action items for this ticket:
quote_pat!
and any otherquote_foo!
macros that have broken in the meantime.Here is some sample code illustrating the issue. (Sorry about the length; we could also do more to ease using these macros. :) )
When attempting to compile the code below, I get the following error from
rustc
Here's the aforementioned
/tmp/qp.rs
:The text was updated successfully, but these errors were encountered: