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: tuple_fields called on non-tuple #79929

Closed
lolgeny opened this issue Dec 11, 2020 · 3 comments
Closed

ICE: tuple_fields called on non-tuple #79929

lolgeny opened this issue Dec 11, 2020 · 3 comments
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@lolgeny
Copy link

lolgeny commented Dec 11, 2020

I was working on some procedural macros when I encountered

error: internal compiler error: compiler\rustc_middle\src\ty\sty.rs:2138:18: tuple_fields called on non-tuple

thread 'rustc' panicked at 'Box<Any>', compiler\rustc_errors\src\lib.rs:945:9
stack backtrace:
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.49.0-nightly (b1496c6e6 2020-10-18) running on x86_64-pc-windows-msvc

note: compiler flags: -Z macro-backtrace -C prefer-dynamic -C embed-bitcode=no -C debuginfo=2 -C incremental --crate-type proc-macro

note: some of the compiler flags provided by cargo are hidden

note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
query stack during panic:

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.49.0-nightly (b1496c6e6 2020-10-18) running on x86_64-pc-windows-msvc

note: compiler flags: -Z macro-backtrace -C prefer-dynamic -C embed-bitcode=no -C debuginfo=2 -C incremental

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
#0 [typeck] type-checking `cache`
#0 [typeck] type-checking `cache`
#1 [typeck_item_bodies] type-checking all item bodies
#1 [typeck_item_bodies] type-checking all item bodies
#2 [analysis] running analysis passes on this crate
#2 [analysis] running analysis passes on this crate
end of query stack
end of query stack

I'm not sure what caused it, probably generated incorrect code. I'm using the latest nightly compiler.

@lolgeny lolgeny added C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Dec 11, 2020
@camelid
Copy link
Member

camelid commented Dec 11, 2020

I'm using the latest nightly compiler.

Hmm, the rustc output you posted says that you're running a nightly compiler that's two months out-of-date (2020-10-18). I think this issue was fixed after then. Can you try with a recent nightly (e.g. 2020-12-10) and let us know if it works? Thanks.

@camelid camelid added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Dec 11, 2020
@camelid camelid changed the title Rustc panicked at Box<Any> ICE: tuple_fields called on non-tuple Dec 11, 2020
@camelid
Copy link
Member

camelid commented Dec 11, 2020

I think #77993 is the same underlying issue; it was fixed after the compiler version you're running.

@camelid
Copy link
Member

camelid commented Dec 14, 2020

@lolgeny Could you please try with a recent nightly (use rustup update nightly)?

@lolgeny lolgeny closed this as completed Dec 23, 2020
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) ❄️ S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

2 participants