Skip to content
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

Check inlinee arity in mir inliner #133357

Closed
wants to merge 1 commit into from

Conversation

compiler-errors
Copy link
Member

Check the number of args we're inlining is actually the number of args in our call signature.

Fixes #121127
Fixes #129075
Fixes #129127
Fixes #131294

r? cjgillot or re-roll

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Nov 23, 2024
@rustbot
Copy link
Collaborator

rustbot commented Nov 23, 2024

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

if args.len() != callee_body.args_iter().len() {
return Err("arg arity mismatch");
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How can this even happen???
In the test, typeck gives an error. We bail out if the callee is tainted by errors, so we should have bailed out somewhere. Or are we missing tainting?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't taint a body if it's incompatible with its trait definition. But this PR is made obsolete by #133365, which does ensure we never resolve to an impl if it's incompatible with the definition of the trait.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
3 participants