-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Fix MIR inlining panic in generic function #45723
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
Conversation
r? @arielb1 (rust_highfive has picked a reviewer for you, use r? to override) |
It's not the right fix - instead, it needs to use a variant of |
Added |
You should just pass the param env to the variant of |
@bors r+ |
📌 Commit afb52e1 has been approved by |
Fix MIR inlining panic in generic function MIR inlining calls `Instance::resolve` with a substs containing param, and `trans_apply_param_substs` panics. ~~This PR fixes it by making `Instance::resolve` return `None` if `substs.has_param_types()`, though I'm not sure if this is a right fix.~~ Fixes #45493.
☀️ Test successful - status-appveyor, status-travis |
MIR inlining calls
Instance::resolve
with a substs containing param, andtrans_apply_param_substs
panics.This PR fixes it by makingInstance::resolve
returnNone
ifsubsts.has_param_types()
, though I'm not sure if this is a right fix.Fixes #45493.