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 with conservative_impl_trait #48140

Closed
tower120 opened this Issue Feb 11, 2018 · 3 comments

Comments

Projects
None yet
3 participants
@tower120
Copy link

tower120 commented Feb 11, 2018

error: internal compiler error: src\librustc_typeck\check\mod.rs:634: escaping regions in predicate Obligation(predicate=Binder(ProjectionPredicate(ProjectionTy { substs: Slice([_]), item_def_id: DefId { krate: CrateNum(2), index: DefIndex(0:1693) => core[c2b0]::iter[0]::iterator[0]::Iterator[0]::Item[0] } }, &std::rc::Rc<track::Track>)),depth=0)
  --> src\song.rs:21:38
   |
21 |     pub fn tracks_iter(&mut self) -> impl Iterator<Item = &Rc<Track>>{
   |                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

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

note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports

note: rustc 1.23.0 (766bd11c8 2018-01-01) running on x86_64-pc-windows-msvc

thread 'rustc' panicked at 'Box<Any>', src\librustc_errors\lib.rs:418:8
note: Run with `RUST_BACKTRACE=1` for a backtrace.

error: Could not compile `hello_world_1`.

Attaching project as-is.
RustHelloWorld1.zip

@cramertj

This comment has been minimized.

Copy link
Member

cramertj commented Feb 12, 2018

This looks like the old error from back before lifetime elision was implemented for impl Trait. I can't reproduce on the latest nightly. @tower120 can you confirm that your ICE is fixed by updating to the latest nightly release?

@tower120

This comment has been minimized.

Copy link
Author

tower120 commented Feb 12, 2018

Yes, it is fixed in the latest nightly.

@cramertj cramertj closed this Feb 12, 2018

@cramertj

This comment has been minimized.

Copy link
Member

cramertj commented Feb 12, 2018

@tower120 Great! Let me know if you run into any more ICEs using the feature.

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