Internal compiler error: Encountered ambiguity during codegen #58022
Labels
C-bug
Category: This is a bug.
E-needs-test
Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
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.
I'm not exactly sure what's happening here, but It seems as though calling a trait as a function, with
Box<Any>
leads to a codegen bug.I tried this code (playground link):
I expected to see this happen:
That the compiler throws
error[E0423]: expected function, found trait Foo
, which it does, but without an internal compiler error.Instead, this happened:
Meta
note: rustc 1.32.0 (9fda7c223 2019-01-16) running on x86_64-unknown-linux-gnu
note: compiler flags: -C codegen-units=1 -C debuginfo=2 --crate-type bin
Backtrace:
The text was updated successfully, but these errors were encountered: