Guest User

Untitled

a guest
Jun 24th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. fn main() {
  2. println!("{:?}", {
  3. let _: Option<(usize, i32)> = vec![].iter().enumerate().next();
  4. });
  5. }
  6.  
  7.  
  8. /* ~~~~=== stderr ===~~~~
  9. Compiling playground v0.0.1 (file:///playground)
  10. error[E0308]: mismatched types
  11. --> src/main.rs:5:39
  12. |
  13. 5 | let _: Option<(usize, i32)> = vec![].iter().enumerate().next();
  14. | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected i32, found reference
  15. |
  16. = note: expected type `std::option::Option<(usize, i32)>`
  17. found type `std::option::Option<(usize, &_)>`
  18.  
  19. error: aborting due to previous error
  20.  
  21. For more information about this error, try `rustc --explain E0308`.
  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