error[E0309]: the associated type `::Item` may not live long enough --> $DIR/projection-no-regions-fn.rs:13:5 | LL | fn no_region<'a, T>(mut x: T) -> Box | -- the associated type `::Item` must be valid for the lifetime `'a` as defined here... ... LL | Box::new(x.next()) | ^^^^^^^^^^^^^^^^^^ ...so that the type `::Item` will meet its required lifetime bounds | help: consider adding an explicit lifetime bound | LL | T: Iterator, ::Item: 'a | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ error[E0309]: the associated type `::Item` may not live long enough --> $DIR/projection-no-regions-fn.rs:28:5 | LL | fn wrong_region<'a, 'b, T>(mut x: T) -> Box | -- the associated type `::Item` must be valid for the lifetime `'a` as defined here... ... LL | Box::new(x.next()) | ^^^^^^^^^^^^^^^^^^ ...so that the type `::Item` will meet its required lifetime bounds | help: consider adding an explicit lifetime bound | LL | T: 'b + Iterator, ::Item: 'a | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0309`.