Open
Description
In tests like:
- src/test/ui/regions/regions-close-object-into-object-5.rs
- src/test/ui/regions/regions-close-over-type-parameter-multiple.rs
Under NLL we rightfully suggest to add a lifetime bound:
|
LL | Box::new(B(&*v)) as Box<dyn X>
| ^^^^^^
|
= help: consider adding an explicit lifetime bound `T: 'static`...
but the actual span where the lifetime bound should be added is lost when we compare to non-nll mode:
LL | fn f<'a, T, U>(v: Box<A<T> + 'static>) -> Box<X + 'static> {
| - help: consider adding an explicit lifetime bound...: `T: 'static`
This is a diagnostic regression that should be fixed.
@rustbot label +A-NLL +NLL-diagnostics