Guest User

Untitled

a guest
Jun 21st, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.32 KB | None | 0 0
  1. fn main() {
  2. println!("{:?}", {
  3. struct S { i: i32 }; impl S { fn foo(&S { i }: Self) { print!("{} ", i); } (S { i: 5 }).foo()
  4. });
  5. }
  6.  
  7.  
  8. /* ~~~~=== stderr ===~~~~
  9. Compiling playground v0.0.1 (file:///playground)
  10. error: incorrect close delimiter: `)`
  11. --> src/main.rs:6:6
  12. |
  13. 6 | });
  14. | ^
  15. |
  16. note: unclosed delimiter
  17. --> src/main.rs:4:22
  18. |
  19. 4 | println!("{:?}", {
  20. | ^
  21.  
  22. error: expected one of `const`, `crate`, `default`, `extern`, `fn`, `pub`, `type`, `unsafe`, or `}`, found `(`
  23. --> src/main.rs:5:84
  24. |
  25. 5 | struct S { i: i32 }; impl S { fn foo(&S { i }: Self) { print!("{} ", i); } (S { i: 5 }).foo()
  26. | ^ expected one of 9 possible tokens here
  27.  
  28. error: expected one of `const`, `crate`, `default`, `extern`, `fn`, `pub`, `type`, `unsafe`, or `}`, found `)`
  29. --> src/main.rs:5:95
  30. |
  31. 5 | struct S { i: i32 }; impl S { fn foo(&S { i }: Self) { print!("{} ", i); } (S { i: 5 }).foo()
  32. | ^ expected one of 9 possible tokens here
  33.  
  34. error: aborting due to 3 previous errors
  35.  
  36. error: Could not compile `playground`.
  37.  
  38. To learn more, run the command again with --verbose.
  39.  
  40. */
  41.  
  42. /* ~~~~=== stdout ===~~~~
  43.  
  44. */
Add Comment
Please, Sign In to add comment