Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use std::convert::TryFrom as _;
- fn main() {
- // error[E0508]: cannot move out of type `[std::string::String]`, a non-copy slice
- let ss = vec!["foo".to_owned(), "bar".to_owned()];
- if let [s1, s2] = ss[..] {
- dbg!(s1);
- dbg!(s2);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement