-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Avoid crashing on variadic functions when producing arg-mismatch errors #130437
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
I think you may need to remove some |
Thanks, I will look. I also realized I should verify there isn't a separate issue here with delegation before we close the linked issue. |
This comment has been minimized.
This comment has been minimized.
I don't think |
Oh, yeah, the bless was just a reflex. The point was to test them. (Off-topic, but for the record, I would prefer if |
Thanks, I got rid of the now-not-crashing tests, all of which are the same issue as the new test I added. (Sorry for the noise, I swear next time I will remember that crashes are usually already checked in by the time I go to fix them.) |
This comment has been minimized.
This comment has been minimized.
thanks! @bors r+ rollup |
…iaskrgr Rollup of 3 pull requests Successful merges: - rust-lang#130033 (Don't call `fn_arg_names` query for non-`fn` foreign items in resolver) - rust-lang#130282 (Do not report an excessive number of overflow errors for an ever-growing deref impl) - rust-lang#130437 (Avoid crashing on variadic functions when producing arg-mismatch errors) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#130437 - jder:issue-130372, r=compiler-errors Avoid crashing on variadic functions when producing arg-mismatch errors Fixes rust-lang#130372 by accommodating how variadic functions change the argument list length between HIR body and FnDecls. Also degrades the zip_eq to a debug_assert! to match other asserts in the area to avoid being disruptive to users. There is at least one other crash in this area I am working on in rust-lang#130400 and also considering how we might refactor some of this code to hoist some of this logic up higher. r? `@compiler-errors`
Fixes #130372 by accommodating how variadic functions change the argument list length between HIR body and FnDecls.
Also degrades the zip_eq to a debug_assert! to match other asserts in the area to avoid being disruptive to users. There is at least one other crash in this area I am working on in #130400 and also considering how we might refactor some of this code to hoist some of this logic up higher.
r? @compiler-errors