Guest User

Untitled

a guest
May 24th, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. fn main() {
  2. println!("{:?}", {
  3. fn foo() -> impl Copy { 1 }; let n = foo(); let y = n; let z = n; (n, y, z)
  4. });
  5. }
  6.  
  7.  
  8. /* ~~~~=== stderr ===~~~~
  9. Compiling playground v0.0.1 (file:///playground)
  10. error[E0277]: `impl std::marker::Copy` doesn't implement `std::fmt::Debug`
  11. --> src/main.rs:4:22
  12. |
  13. 4 | println!("{:?}", {
  14. | ______________________^
  15. 5 | | fn foo() -> impl Copy { 1 }; let n = foo(); let y = n; let z = n; (n, y, z)
  16. 6 | | });
  17. | |_____^ `impl std::marker::Copy` cannot be formatted using `:?` because it doesn't implement `std::fmt::Debug`
  18. |
  19. = help: the trait `std::fmt::Debug` is not implemented for `impl std::marker::Copy`
  20. = note: required because of the requirements on the impl of `std::fmt::Debug` for `(impl std::marker::Copy, impl std::marker::Copy, impl std::marker::Copy)`
  21. = note: required by `std::fmt::Debug::fmt`
  22.  
  23. error: aborting due to previous error
  24.  
  25. For more information about this error, try `rustc --explain E0277`.
  26. error: Could not compile `playground`.
  27.  
  28. To learn more, run the command again with --verbose.
  29.  
  30. */
  31.  
  32. /* ~~~~=== stdout ===~~~~
  33.  
  34. */
Add Comment
Please, Sign In to add comment