Skip to content

Instantly share code, notes, and snippets.

@quux00
Last active August 29, 2015 13:57
Show Gist options
  • Save quux00/9435269 to your computer and use it in GitHub Desktop.
Save quux00/9435269 to your computer and use it in GitHub Desktop.
use std::str::StrVector;
struct A<'a> {
field: &'a StrVector
}
fn main() {
let vs = ~[~"one", ~"two", ~"three"];
let cc = vs.concat();
println!("{:?}", cc); // works
let a = A{field: & &vs}; // error: failed to find an implementation of
// trait std::str::StrVector for &~[~str]
println!("{:?}", a);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment