Advertisement
Guest User

Untitled

a guest
Jun 15th, 2019
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. use std::convert::TryFrom as _;
  2.  
  3. fn main() {
  4. // error[E0508]: cannot move out of type `[std::string::String]`, a non-copy slice
  5. let ss = vec!["foo".to_owned(), "bar".to_owned()];
  6. if let [s1, s2] = ss[..] {
  7. dbg!(s1);
  8. dbg!(s2);
  9. }
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement