//! Regression test for https://github.com/rust-lang/rust/issues/2502 //@ check-pass #![allow(dead_code)] #![allow(non_camel_case_types)] struct font<'a> { fontbuf: &'a Vec, } impl<'a> font<'a> { pub fn buf(&self) -> &'a Vec { self.fontbuf } } fn font(fontbuf: &Vec) -> font<'_> { font { fontbuf } } pub fn main() {}