Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. #![allow(unreachable_code)]
  2.  
  3.  
  4. fn main() {
  5. println!("{:?}", {
  6. "oop bad".into_iter().fold(|_| true)
  7. });
  8. }
  9.  
  10.  
  11. /* ~~~~=== stderr ===~~~~
  12. Compiling playground v0.0.1 (/playground)
  13. error[E0599]: no method named `into_iter` found for type `&'static str` in the current scope
  14. --> src/main.rs:6:19
  15. |
  16. 6 | "oop bad".into_iter().fold(|_| true)
  17. | ^^^^^^^^^
  18. |
  19. = note: the method `into_iter` exists but the following trait bounds were not satisfied:
  20. `&&str : std::iter::IntoIterator`
  21. `&mut &'static str : std::iter::IntoIterator`
  22. `&mut str : std::iter::IntoIterator`
  23. `&str : std::iter::IntoIterator`
  24. `str : std::iter::IntoIterator`
  25.  
  26. error: aborting due to previous error
  27.  
  28. For more information about this error, try `rustc --explain E0599`.
  29. error: Could not compile `playground`.
  30.  
  31. To learn more, run the command again with --verbose.
  32.  
  33. */
  34.  
  35. /* ~~~~=== stdout ===~~~~
  36.  
  37. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement