error[E0310]: the associated type `::Item` may not live long enough --> $DIR/regions-close-associated-type-into-object.rs:25:5 | LL | Box::new(item) //~ ERROR associated type `::Item` may not live long enough | ^^^^^^^^^^^^^^ | = help: consider adding an explicit lifetime bound `::Item: 'static`... note: ...so that the type `::Item` will meet its required lifetime bounds --> $DIR/regions-close-associated-type-into-object.rs:25:5 | LL | Box::new(item) //~ ERROR associated type `::Item` may not live long enough | ^^^^^^^^^^^^^^ error[E0310]: the associated type `::Item` may not live long enough --> $DIR/regions-close-associated-type-into-object.rs:32:5 | LL | Box::new(item) //~ ERROR associated type `::Item` may not live long enough | ^^^^^^^^^^^^^^ | = help: consider adding an explicit lifetime bound `::Item: 'static`... note: ...so that the type `std::boxed::Box<::Item>` will meet its required lifetime bounds --> $DIR/regions-close-associated-type-into-object.rs:32:5 | LL | Box::new(item) //~ ERROR associated type `::Item` may not live long enough | ^^^^^^^^^^^^^^ error[E0309]: the associated type `::Item` may not live long enough --> $DIR/regions-close-associated-type-into-object.rs:38:5 | LL | Box::new(item) //~ ERROR associated type `::Item` may not live long enough | ^^^^^^^^^^^^^^ | = help: consider adding an explicit lifetime bound `::Item: 'a`... note: ...so that the type `::Item` will meet its required lifetime bounds --> $DIR/regions-close-associated-type-into-object.rs:38:5 | LL | Box::new(item) //~ ERROR associated type `::Item` may not live long enough | ^^^^^^^^^^^^^^ error[E0309]: the associated type `::Item` may not live long enough --> $DIR/regions-close-associated-type-into-object.rs:45:5 | LL | Box::new(item) //~ ERROR associated type `::Item` may not live long enough | ^^^^^^^^^^^^^^ | = help: consider adding an explicit lifetime bound `::Item: 'a`... note: ...so that the type `std::boxed::Box<::Item>` will meet its required lifetime bounds --> $DIR/regions-close-associated-type-into-object.rs:45:5 | LL | Box::new(item) //~ ERROR associated type `::Item` may not live long enough | ^^^^^^^^^^^^^^ error: aborting due to 4 previous errors Some errors occurred: E0309, E0310. For more information about an error, try `rustc --explain E0309`.