Skip to content
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
Closed

ICE with conservative_impl_trait #48140

tower120 opened this issue Feb 11, 2018 · 3 comments
Labels
A-impl-trait Area: impl Trait. Universally / existentially quantified anonymous types with static dispatch. C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@tower120
Copy link

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

@pietroalbini pietroalbini added I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ A-impl-trait Area: impl Trait. Universally / existentially quantified anonymous types with static dispatch. C-bug Category: This is a bug. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Feb 11, 2018
@cramertj
Copy link
Member

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
Copy link
Author

Yes, it is fixed in the latest nightly.

@cramertj
Copy link
Member

@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
Labels
A-impl-trait Area: impl Trait. Universally / existentially quantified anonymous types with static dispatch. C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants