Skip to content

ICE with conservative_impl_trait #48140

@tower120

Description

@tower120
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-impl-traitArea: `impl Trait`. Universally / existentially quantified anonymous types with static dispatch.C-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions