struct Stu<'a> { name: &'a str, } fn main() { let n = String::from("root"); let s = Stu { name: n.as_str() }; println!("{}", s.name); }