Skip to content

New ICE from old minimal example code: Uninferred types/regions in _ #36839

Closed
@solson

Description

@solson

I previously minimized the ICE-causing code in #27954, and the original code is now fixed, but my minimized code now ICEs with a new error.

Code:

playpen

pub trait Foo {
    type Bar;
}

pub trait Broken {
    type Assoc;
    fn broken(&self) where Self::Assoc: Foo;
}

impl<T> Broken for T {
    type Assoc = ();
    fn broken(&self) where Self::Assoc: Foo {
        let _x: <Self::Assoc as Foo>::Bar;
    }
}

fn main() { 
    let _m: &Broken<Assoc=()> = &();
}

Error:

rustc 1.13.0-nightly (a059cb2f3 2016-09-27)
error: internal compiler error: ../src/librustc/infer/mod.rs:697: Uninferred types/regions in `_`

Metadata

Metadata

Assignees

No one assigned

    Labels

    E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions