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

error: internal compiler error: find_associated_type_in_generics() #19151

Closed
ZoeyR opened this issue Nov 20, 2014 · 2 comments
Closed

error: internal compiler error: find_associated_type_in_generics() #19151

ZoeyR opened this issue Nov 20, 2014 · 2 comments
Labels
A-associated-items Area: Associated items (types, constants & functions) I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@ZoeyR
Copy link

ZoeyR commented Nov 20, 2014

OS: Ubuntu 14.04 LTS
Rust version:

rustc 0.13.0-nightly (399ff259e 2014-11-20 00:27:07 +0000)
binary: rustc
commit-hash: 399ff259e18c1061aa4ea60856fcecb486d36624
commit-date: 2014-11-20 00:27:07 +0000
host: x86_64-unknown-linux-gnu
release: 0.13.0-nightly

Error:

cargo build
   Compiling rust-conway v0.0.1 (file:///home/ybilta/Development/rust/conway)
/home/ybilta/Development/rust/conway/src/world.rs:43:23: 43:39 error: ambiguous associated type; specify the type using the syntax `<Type as world::World>::WorldIter`
/home/ybilta/Development/rust/conway/src/world.rs:43     fn iter(&self) -> World::WorldIter;
                                                                           ^~~~~~~~~~~~~~~~
/home/ybilta/Development/rust/conway/src/world.rs:66:22: 66:58 error: wrong number of lifetime parameters: expected 1, found 0 [E0107]
/home/ybilta/Development/rust/conway/src/world.rs:66     type WorldIter = hash_map::Entries<(int, int), State>;
                                                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/ybilta/Development/rust/conway/src/engine.rs:12:16: 12:38 error: associated types may not be referenced here
/home/ybilta/Development/rust/conway/src/engine.rs:12     world: Box<world::World + 'static>
                                                                     ^~~~~~~~~~~~~~~~~~~~~~
/home/ybilta/Development/rust/conway/src/engine.rs:22:39: 22:51 error: internal compiler error: find_associated_type_in_generics(): no self type
/home/ybilta/Development/rust/conway/src/engine.rs:22     fn world_ref<'w>(&'w self) -> &'w world::World;
                                                                                            ^~~~~~~~~~~~
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>', /home/rustbuild/src/rust-buildbot/slave/nightly-linux/build/src/libsyntax/diagnostic.rs:121


Could not compile `rust-conway`.

Can be tested against this commit.
I realize the code is bad, but I felt I should report the error anyways

@quantheory
Copy link
Contributor

Possibly related: #18819

@huonw huonw added I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ A-associated-items Area: Associated items (types, constants & functions) labels Nov 21, 2014
@nikomatsakis
Copy link
Contributor

Everything has changed since this issue was filed. Going to close, feel free to re-open.

lnicola pushed a commit to lnicola/rust that referenced this issue Feb 24, 2025
…-macro

Use correct working directory for non-workspace proc-macro execution
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

No branches or pull requests

4 participants