-
Notifications
You must be signed in to change notification settings - Fork 13.8k
Cleanup FnDecl::inner_full_print
#146645
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
Cleanup FnDecl::inner_full_print
#146645
Conversation
6a962cd
to
90b964f
Compare
Thanks, that reads a lot better!
Personally speaking, I would be in favor. However, we have a bunch of other places in r=me with nit addressed @bors delegate+ |
✌️ @yotamofek, you can now approve this pull request! If @fmease told you to " |
90b964f
to
1d8971c
Compare
@bors rollup |
…full_print, r=fmease Cleanup `FnDecl::inner_full_print` `inner_full_print` was pretty hard to follow IMHO. Hopefully this cleans it up a little bit. Also, it was checking whether `self.inputs` is empty twice, and then handling an unreachable match arm: https://github.com/yotamofek/rust/blob/f836ae4e663b6e8938096b8559e094d18361be55/src/librustdoc/html/format.rs#L1368C1-L1368C33 `last_input_index` could only be `None` if the fn has no parameters, in which case the loop body would never run. r? `@GuillaumeGomez` if you have the capacity :) BTW, can we rename `FnDecl::inputs` to `parameters` or something? And `output` to `return_ty`?
Rollup of 5 pull requests Successful merges: - #146566 (Lint more overlapping assignments in MIR.) - #146645 (Cleanup `FnDecl::inner_full_print`) - #146664 (Clean up `ty::Dynamic`) - #146673 (cg_llvm: Replace some DIBuilder wrappers with LLVM-C API bindings (part 4)) - #146694 (Remove ImplSubject) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of #146645 - yotamofek:pr/rustdoc/fndecl_inner_full_print, r=fmease Cleanup `FnDecl::inner_full_print` `inner_full_print` was pretty hard to follow IMHO. Hopefully this cleans it up a little bit. Also, it was checking whether `self.inputs` is empty twice, and then handling an unreachable match arm: https://github.com/yotamofek/rust/blob/f836ae4e663b6e8938096b8559e094d18361be55/src/librustdoc/html/format.rs#L1368C1-L1368C33 `last_input_index` could only be `None` if the fn has no parameters, in which case the loop body would never run. r? ``@GuillaumeGomez`` if you have the capacity :) BTW, can we rename `FnDecl::inputs` to `parameters` or something? And `output` to `return_ty`?
inner_full_print
was pretty hard to follow IMHO.Hopefully this cleans it up a little bit.
Also, it was checking whether
self.inputs
is empty twice, and then handling an unreachable match arm:https://github.com/yotamofek/rust/blob/f836ae4e663b6e8938096b8559e094d18361be55/src/librustdoc/html/format.rs#L1368C1-L1368C33
last_input_index
could only beNone
if the fn has no parameters, in which case the loop body would never run.r? @GuillaumeGomez if you have the capacity :)
BTW, can we rename
FnDecl::inputs
toparameters
or something? Andoutput
toreturn_ty
?