New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ICE: escaping regions in predicate Obligation(...) #43718

Manishearth opened this Issue Aug 7, 2017 · 2 comments


None yet
4 participants
Copy link

Manishearth commented Aug 7, 2017


fn iter_values(a: &[u32]) -> impl Iterator<Item=&u32>{
    a.iter().map(|a| &a)

(playpen )


   Compiling playground v0.0.1 (file:///playground)
error: internal compiler error: /checkout/src/librustc_typeck/check/ escaping regions in predicate Obligation(predicate=Binder(ProjectionPredicate(ProjectionTy { substs: Slice([_]), item_def_id: DefId { krate: CrateNum(2), node: DefIndex(1591) => core/e78183f::iter[0]::iterator[0]::Iterator[0]::Item[0] } }, &u32)),depth=0)
  --> src/
21 |     fn iter_values(&self) -> impl Iterator<Item=&u32>{
   |                              ^^^^^^^^^^^^^^^^^^^^^^^^

note: the compiler unexpectedly panicked. this is a bug.

This comment has been minimized.

Copy link
Member Author

Manishearth commented Aug 7, 2017


This comment has been minimized.

Copy link

kennytm commented Aug 20, 2017

Duplicate of #42479

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment