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: find_associated_type_in_generics(): didn't find associated type anywhere in the generics list #17732

Closed
tikue opened this issue Oct 3, 2014 · 4 comments · Fixed by #20404
Labels
A-associated-items Area: Associated items (types, constants & functions) I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@tikue
Copy link
Contributor

tikue commented Oct 3, 2014

Possibly a dup of #17359. Minimal example to reproduce in play.rust-lang.org as of 10/2/2013:

#![feature(associated_types)]
trait Person {
    type string;
}

struct Someone<P: Person>;

fn main() {
}

<anon>:6:19: 6:25 error: internal compiler error: find_associated_type_in_generics(): didn't find associated type anywhere in the generics list
<anon>:6 struct Someone<P: Person>;
                           ^~~~~~
@tikue tikue changed the title ICE: didn't find associated type anywhere in the generics list ICE: find_associated_type_in_generics(): didn't find associated type anywhere in the generics list Oct 3, 2014
@huonw huonw added the I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ label Oct 3, 2014
@erickt
Copy link
Contributor

erickt commented Oct 12, 2014

cc-ing @aturon. Another variation of this bug:

#![feature(associated_types)]

trait Deserialize {
    type Visitor;
}

trait Deserializer {
    fn deserialize<D: Deserialize>();
}

fn main() { }

produces:

foo.rs:8:23: 8:34 error: internal compiler error: find_associated_type_in_generics(): didn't find associated type anywhere in the generics list
foo.rs:8     fn deserialize<D: Deserialize>();
                               ^~~~~~~~~~~
note: the compiler hit an unexpected failure path. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
task 'rustc' failed at 'Box<Any>', /Users/rustbuild/src/rust-buildbot/slave/nightly-mac/build/src/libsyntax/diagnostic.rs:113

@aturon
Copy link
Member

aturon commented Oct 13, 2014

cc @pcwalton

@nikomatsakis
Copy link
Contributor

Symptom of #18768

@retep998
Copy link
Member

Yet another variation

#![feature(associated_types)]
trait Bindable {
    type Ret;
}
trait Foo<A> where A: Bindable {
    fn func<B>(b: B) -> <A as Bindable>::Ret;
}
fn main() {}
<anon>:5:23: 5:31 error: internal compiler error: find_associated_type_in_generics(): didn't find associated type anywhere in the generics list
<anon>:5 trait Foo<A> where A: Bindable {
                               ^~~~~~~~
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
task 'rustc' panicked at 'Box<Any>', /build/rust-git/src/rust/src/libsyntax/diagnostic.rs:116

lnicola pushed a commit to lnicola/rust that referenced this issue Jul 28, 2024
RalfJung pushed a commit to RalfJung/rust that referenced this issue Aug 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-associated-items Area: Associated items (types, constants & functions) I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants