Guest User

Untitled

a guest
May 22nd, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. fn main() {
  2. println!("{:?}", {
  3. #[derive(Debug)] struct Struct where Self: Debug {}
  4. });
  5. }
  6.  
  7.  
  8. /* ~~~~=== stderr ===~~~~
  9. Compiling playground v0.0.1 (file:///playground)
  10. error[E0411]: cannot find type `Self` in this scope
  11. --> src/main.rs:5:46
  12. |
  13. 5 | #[derive(Debug)] struct Struct where Self: Debug {}
  14. | ^^^^ `Self` is only available in traits and impls
  15.  
  16. error[E0405]: cannot find trait `Debug` in this scope
  17. --> src/main.rs:5:52
  18. |
  19. 5 | #[derive(Debug)] struct Struct where Self: Debug {}
  20. | ^^^^^ not found in this scope
  21. help: possible candidate is found in another module, you can import it into scope
  22. |
  23. 3 | use std::fmt::Debug;
  24. |
  25.  
  26. error: aborting due to 2 previous errors
  27.  
  28. Some errors occurred: E0405, E0411.
  29. For more information about an error, try `rustc --explain E0405`.
  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