Guest User

Untitled

a guest
May 26th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. fn main() {
  2. println!("{:?}", {
  3. macro_rules! m { ($b:block) => ( let a = 1; $block ) } m!({a})
  4. });
  5. }
  6.  
  7.  
  8. /* ~~~~=== stderr ===~~~~
  9. Compiling playground v0.0.1 (file:///playground)
  10. error: expected expression, found statement (`let`)
  11. --> src/main.rs:5:43
  12. |
  13. 5 | macro_rules! m { ($b:block) => ( let a = 1; $block ) } m!({a})
  14. | ^^^ ------- in this macro invocation
  15. | |
  16. | expected expression
  17. |
  18. = note: variable declaration using `let` is a statement
  19.  
  20. error: aborting due to previous error
  21.  
  22. error: Could not compile `playground`.
  23.  
  24. To learn more, run the command again with --verbose.
  25.  
  26. */
  27.  
  28. /* ~~~~=== stdout ===~~~~
  29.  
  30. */
Add Comment
Please, Sign In to add comment