ICE on generic impl trait convergence #58344
Labels
A-impl-trait
Area: `impl Trait`. Universally / existentially quantified anonymous types with static dispatch.
A-MIR
Area: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.html
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) ❄️
P-medium
Medium priority
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Using a generic function to "converge" two
impl Trait<T>
intoT
when T is an associated type for another trait causes the following error:Example code (Playground link):
This may or may not be related to the compiler seemingly failing to assert that
<u32 as Add<u32>>::Output == u32
, an error that can be triggered by using the alternate signature foradd_one
at line 40 of the example.Meta
I tested this with the linked playground on the latest stable (1.32.0), as well as a recent nightly:
Compiling with
RUST_BACKTRACE=1
doesn't seem to yield a very useful stack but here it is:The text was updated successfully, but these errors were encountered: