Guest User

Untitled

a guest
Nov 12th, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. #![allow(unreachable_code)]
  2.  
  3.  
  4. fn main() {
  5. println!("{:?}", {
  6. let mut iter = (0..10); iter.next().filter(|item| iter.all(|x| *x == item))
  7. });
  8. }
  9.  
  10.  
  11. /* ~~~~=== stderr ===~~~~
  12. Compiling playground v0.0.1 (/playground)
  13. warning: unnecessary parentheses around assigned value
  14. --> src/main.rs:6:24
  15. |
  16. 6 | let mut iter = (0..10); iter.next().filter(|item| iter.all(|x| *x == item))
  17. | ^^^^^^^ help: remove these parentheses
  18. |
  19. = note: #[warn(unused_parens)] on by default
  20.  
  21. error[E0614]: type `{integer}` cannot be dereferenced
  22. --> src/main.rs:6:72
  23. |
  24. 6 | let mut iter = (0..10); iter.next().filter(|item| iter.all(|x| *x == item))
  25. | ^^
  26.  
  27. error: aborting due to previous error
  28.  
  29. For more information about this error, try `rustc --explain E0614`.
  30. error: Could not compile `playground`.
  31.  
  32. To learn more, run the command again with --verbose.
  33.  
  34. */
  35.  
  36. /* ~~~~=== stdout ===~~~~
  37.  
  38. */
Add Comment
Please, Sign In to add comment