blob: d838edbdd66169e74321ebf4e39ab87e89a3d20c [file] [log] [blame]
// run-pass
#![allow(dead_code)]
struct A<'a> {
a: &'a [String],
b: Option<&'a [String]>,
}
pub fn main() {
let b: &[String] = &["foo".to_string()];
let a = A {
a: &["test".to_string()],
b: Some(b),
};
assert_eq!(a.b.as_ref().unwrap()[0], "foo");
}