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

New ICE from modified example code: Uninferred types/regions in _ #43478

Closed
kyleheadley opened this issue Jul 25, 2017 · 1 comment
Closed

New ICE from modified example code: Uninferred types/regions in _ #43478

kyleheadley opened this issue Jul 25, 2017 · 1 comment
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@kyleheadley
Copy link

I tried to instantiate the types in #36839 with a Vec and received the original ICE.

playground

pub trait Foo {
    type Bar;
}

pub trait Broken {
    type Assoc;
    fn broken(&self)->Vec<<Self::Assoc as Foo>::Bar> where Self::Assoc: Foo;
}

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

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

What's the expected behavior here? A compiler error on trait impl or a compiler error if the fn is called?

@Mark-Simulacrum Mark-Simulacrum added I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ C-bug Category: This is a bug. labels Jul 26, 2017
@estebank
Copy link
Contributor

No longer reproducible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

No branches or pull requests

3 participants