Unexpected E0271 while using Pointee trait #91446
Labels
A-inference
Area: Type inference
A-traits
Area: Trait system
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
I tried this code:
https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=53652794c179fb2128d73e2f11888a8a
I expected to see this happen:
The code compiles successfully
Instead, this happened:
There are two errors, despite the error sites apparently being no different from the successfully compiled ones, aside from the presence of generic type inference.
I couldn't get this to happen with a user-defined trait, so it may be related to
Pointee
's magic implementations. On the other hand, it may be possible to trigger via user code and I just couldn't find an example.Meta
Playground Nightly Version Used:
The text was updated successfully, but these errors were encountered: