Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#55638 - pnkfelix:issue-55608-ice-reempty-ms…
…g_span_from_free_region, r=estebank Fix ICE in msg_span_from_free_region on ReEmpty On an example like this: ```rust #![feature(conservative_impl_trait)] fn server() -> impl FilterBase2 { segment2(|| { loop { } }).map2(|| "") } trait FilterBase2 { fn map2<F>(self, _fn: F) -> Map2<F> where Self: Sized { loop { } } } struct Map2<F> { _func: F } impl<F> FilterBase2 for Map2<F> { } fn segment2<F>(_fn: F) -> Map2<F> where F: Fn() -> Result<(), ()> { loop { } } ``` we now, instead of ICE'ing, get a diagnostic like: ``` error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds --> issue-55608.rs:3:16 | 3 | fn server() -> impl FilterBase2 { | ^^^^^^^^^^^^^^^^ | = note: hidden type `Map2<[closure@issue-55608.rs:4:36: 4:41]>` captures an empty lifetime ``` Fix rust-lang#55608
- Loading branch information