Guest User

Untitled

a guest
Jun 18th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. fn main() {
  2. println!("{:?}", {
  3. assert_eq!(vec![b"1", b"two"], vec![b"1", b"two"])
  4. });
  5. }
  6.  
  7.  
  8. /* ~~~~=== stderr ===~~~~
  9. Compiling playground v0.0.1 (file:///playground)
  10. error[E0308]: mismatched types
  11. --> src/main.rs:5:31
  12. |
  13. 5 | assert_eq!(vec![b"1", b"two"], vec![b"1", b"two"])
  14. | ^^^^^^ expected an array with a fixed size of 1 elements, found one with 3 elements
  15. |
  16. = note: expected type `&[u8; 1]`
  17. found type `&'static [u8; 3]`
  18.  
  19. error[E0308]: mismatched types
  20. --> src/main.rs:5:51
  21. |
  22. 5 | assert_eq!(vec![b"1", b"two"], vec![b"1", b"two"])
  23. | ^^^^^^ expected an array with a fixed size of 1 elements, found one with 3 elements
  24. |
  25. = note: expected type `&[u8; 1]`
  26. found type `&'static [u8; 3]`
  27.  
  28. error: aborting due to 2 previous errors
  29.  
  30. For more information about this error, try `rustc --explain E0308`.
  31. error: Could not compile `playground`.
  32.  
  33. To learn more, run the command again with --verbose.
  34.  
  35. */
  36.  
  37. /* ~~~~=== stdout ===~~~~
  38.  
  39. */
Add Comment
Please, Sign In to add comment