Borrow checker fails to pick up existing region bounds in the environment when aliases are given to assoicated types in trait bounds. #121601
Labels
A-borrow-checker
Area: The borrow checker
C-bug
Category: This is a bug.
T-types
Relevant to the types team, which will review and decide on the PR/issue.
Uh oh!
There was an error while loading. Please reload this page.
It occurs to me that adding named type terms to associated type of trait bounds can lead to borrow check failure, while the same code without "naming" the associated type passes the borrow check.
I tried this code:
I expected to see this happen:
It should compile just like the following rewrite, without naming the
Output1
toA
.Instead, this happened:
Mind that due to the trait definition, it is not possible to apply the suggestion that is emitted by
rustc
.Meta
This is found on the latest
master
, as of writing, and stable.rustc --version --verbose
:Backtrace
Not an ICE, so not applicable.
The text was updated successfully, but these errors were encountered: