blob: 835da34d1bbf922e95ecf930f5156ec24b75e63e [file] [log] [blame] [edit]
struct Hello<'a> {
value: Box<dyn std::any::Any + 'a>,
//~^ ERROR lifetime bound not satisfied
}
impl<'a> Hello<'a> {
fn new<T: 'a>(value: T) -> Self {
Self { value: Box::new(value) }
//~^ ERROR the parameter type `T` may not live long enough
}
}
fn main() {}