// the struct borrows text owned elsewhere, so it carries 'a
struct Token<'a> {
text: &'a str,
}
fn main() {
let src = String::from("let x = 1");
let t = Token { text: &src[0..3] };
println!("{}", t.text);
}a &str field needs a lifetime