-
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
Do not ICE when we have fn pointer Fn
obligations with bound vars in the self type
#108834
Conversation
r? @lcnr (rustbot has picked a reviewer for you, use r? to override) |
r? types (i've assigned lcnr a lot of prs already) |
I don't think (at the very least) this should close #108832. Just not ICEing doesn't mean that it's "fixed" - this should pass. So, I would instead make the test a known-bug test. That being said, why exactly doesn't this work? Do we not instantiate the predicate binder as placeholders when solving? |
No, this is something that we don't do during trait selection in the old solver -- at least not for |
@bors r+ |
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#106921 (Add documentation about the memory layout of `Cell`) - rust-lang#108828 (Emit alias-eq when equating numeric var and projection) - rust-lang#108834 (Do not ICE when we have fn pointer `Fn` obligations with bound vars in the self type) - rust-lang#108900 (fix(lexer): print whitespace warning for \x0c) - rust-lang#108930 (feat: implement better error for manual impl of `Fn*` traits) - rust-lang#108937 (improve readability of winnowing) - rust-lang#108947 (Don't even try to combine consts with incompatible types) - rust-lang#108976 (Update triagebot rust-analyzer team mention) - rust-lang#108983 (Forbid `#[target_feature]` on safe default implementations) Failed merges: - rust-lang#108950 (Directly construct Inherited in typeck.) r? `@ghost` `@rustbot` modify labels: rollup
We never supported solving
for<'a> fn(&'a ()): Fn(&'a ())
-- I tried to add that support in #104929, but iirc @lcnr wanted to support this more generally by eagerly instantiating trait predicate binders with placeholders. That never happened due to blockers in the old solver, but we probably shouldn't ICE in any case.On the bright side, this passes on the new solver :^)