]> git.lizzy.rs Git - rust.git/commitdiff
update test to reflect other sources of brokenness in it under new
authorFelix S. Klock II <pnkfelix@pnkfx.org>
Thu, 7 Jan 2016 23:36:09 +0000 (00:36 +0100)
committerFelix S. Klock II <pnkfelix@pnkfx.org>
Thu, 7 Jan 2016 23:36:09 +0000 (00:36 +0100)
macro future proofing rules.

(We may want to think about what this test was actually testing and
figure out a way to test it without running afoul of macro future
proofing.  I spent some time trying to do this, e.g. by inserting
parenthesis in the macro input pattern, but I could not quickly get it
working, so I took this tack instead.)

src/test/compile-fail/issue-30715.rs

index 16761905cb983bc518b53752eae0dc594f36e47b..7ad43954010b9b4333e422e3cdab9c47a16ceaad 100644 (file)
 
 macro_rules! parallel {
     (
-        for $id:ident in $iter:expr {
+        // If future has `pred`/`moelarry` fragments (where "pred" is
+        // "like expr, but with `{` in its FOLLOW set"), then could
+        // use `pred` instead of future-proof erroring here. See also:
+        //
+        // https://github.com/rust-lang/rfcs/pull/1384#issuecomment-160165525
+        for $id:ident in $iter:expr { //~ WARN `$iter:expr` is followed by `{`
             $( $inner:expr; )*
         }
     ) => {};