Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fn main() {
- println!("{:?}", {
- let vec = vec![0, 1, 2, 3]; match vec { [0, _, _, _] => true, _ => false }
- });
- }
- /* ~~~~=== stderr ===~~~~
- Compiling playground v0.0.1 (file:///playground)
- error[E0529]: expected an array or slice, found `std::vec::Vec<{integer}>`
- --> src/main.rs:5:49
- |
- 5 | let vec = vec![0, 1, 2, 3]; match vec { [0, _, _, _] => true, _ => false }
- | ^^^^^^^^^^^^ pattern cannot match with input type `std::vec::Vec<{integer}>`
- error: aborting due to previous error
- For more information about this error, try `rustc --explain E0529`.
- error: Could not compile `playground`.
- To learn more, run the command again with --verbose.
- */
- /* ~~~~=== stdout ===~~~~
- */
Add Comment
Please, Sign In to add comment