Skip to content

compiler panic impl Trait #43021

Description

@m4b

Trying to Compile

fn derp (cfg: &ControlFlowGraph) -> impl Iterator<Item = &ControlFlowTarget> {
    cfg.vertices().filter_map(|vx| cfg.vertex_label(vx))
}

Panic

-*- mode: compilation; default-directory: "~/projects/panopticon/core/src/" -*-
Compilation started at Sun Jul  2 21:45:03

cargo check
   Compiling panopticon-core v0.16.0 (file:///home/m4b/projects/panopticon/core)
error: internal compiler error: /checkout/src/librustc_typeck/check/mod.rs:614: escaping regions in predicate Obligation(predicate=Binder(ProjectionPredicate(ProjectionTy { trait_ref: <_ as std::iter::Iterator>, item_def_id: DefId { krate: CrateNum(2), node: DefIndex(1612) => core/640b678::iter[0]::iterator[0]::Iterator[0]::Item[0] } }, &function::ControlFlowTarget)),depth=0)
  --> function.rs:93:37
   |
93 | fn derp (cfg: &ControlFlowGraph) -> impl Iterator<Item = &ControlFlowTarget> {
   |                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

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.20.0-nightly (69c65d296 2017-06-28) running on x86_64-unknown-linux-gnu

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

error: Could not compile `panopticon-core`.

To learn more, run the command again with --verbose.

Compilation exited abnormally with code 101 at Sun Jul  2 21:45:05

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) ❄️

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions