-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
cleanup: move c-variadic arguments handling into compute_inputs_and_output #150454
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
base: main
Are you sure you want to change the base?
Conversation
|
rustbot has assigned @petrochenkov. Use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a nit, then r=me
|
|
||
| let inputs = sig.inputs(); | ||
| let va_list_and_output = | ||
| iter::once(va_list_ty).chain(iter::once(sig.output().skip_binder())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| iter::once(va_list_ty).chain(iter::once(sig.output().skip_binder())); | |
| [va_list_ty, sig.output().skip_binder()]; |
| iter::once(va_list_ty).chain(iter::once(sig.output().skip_binder())); | ||
|
|
||
| // The signature needs to follow the order [input_tys, va_list_ty, output_ty] | ||
| return inputs.map_bound(|input| { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe use inputs_and_output and avoid the skip_binder on the output by doing everything inside the map_bound closure
|
r? oli-obk |
5cf029e to
91b1fa1
Compare
91b1fa1 to
791fa37
Compare
Previously,
unnormalized_input_tysneeds to be mutable because the c_variadic arguments are added tounnormalized_input_tysoutside ofcompute_inputs_and_output. This could have been done together incompute_inputs_and_output.