-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Closure syntax sneaks associated type under HRTB past type checking #44005
Comments
triage: P-medium I've not dug too deeply here. I do expect this would be addressed by the work I'm doing on reworking normalization, which will enable (among other things) normalizing under binders. |
It seems like the test added in bbbbf2d is passing only because fn main() {
catalyst(&0);
} Here's the output from stable (1.42.0):
|
The following code is rejected with E0277, which I think is due to a known issue with unifying associated type projections under HRTBs:
"Eta-expanding"
f
inbroken
like so:allows the code to type check, but the compiler panics later with
expected: &i32, found: <&i32 as Foo<'_>>::Bar
:This output is from nightly:
I get a similar panic from 1.19, but not during trans
The text was updated successfully, but these errors were encountered: