rust/compiler
bors d3928b183d Auto merge of #87465 - audunhalland:refactor_typeck_primary_body_of, r=eddyb
Simplify typeck/primary_body_of, fix comment to match return signature

Hi, new contributor here! I'm carefully reading through the various modules just to learn. I noticed this function, `primary_body_of`, which has gone through a couple of refactors over time, adding new `Option`s to its returned tuple. Observations:

1. the `fn`'s documentation was not all up to date with the the current return signature.
2. `FnHeader` and `FnDecl` are always both `Some` or `None`. So I figured it might just return a reference to the full `hir::FnSig`, for simplicity and more precise typing. It's a pure refactor.

I'm learning better by working with code than just reading it, so here goes! If you want to avoid pure refactor PRs that don't really fix anything, I can revert the code change to only update the comment instead.
2021-08-09 01:08:52 +00:00
..
rustc
rustc_apfloat
rustc_arena
rustc_ast Auto merge of #87535 - lf-:authors, r=Mark-Simulacrum 2021-08-02 05:49:17 +00:00
rustc_ast_lowering Rollup merge of #87687 - camsteffen:inline-macros, r=oli-obk 2021-08-02 09:36:54 -05:00
rustc_ast_passes
rustc_ast_pretty Auto merge of #87535 - lf-:authors, r=Mark-Simulacrum 2021-08-02 05:49:17 +00:00
rustc_attr rustc: Fill out remaining parts of C-unwind ABI 2021-08-03 07:06:19 -07:00
rustc_builtin_macros
rustc_codegen_cranelift Merge commit '05677b6bd6c938ed760835d9b1f6514992654ae3' into sync_cg_clif-2021-08-06 2021-08-06 16:26:56 +02:00
rustc_codegen_llvm Only allow LLVM element_type on Array and Vector 2021-08-05 11:06:32 -07:00
rustc_codegen_ssa Prepare call/invoke for opaque pointers 2021-08-05 10:58:55 -07:00
rustc_data_structures
rustc_driver Auto merge of #87535 - lf-:authors, r=Mark-Simulacrum 2021-08-02 05:49:17 +00:00
rustc_error_codes Auto merge of #87697 - GuillaumeGomez:add-e0784, r=nagisa 2021-08-08 16:40:14 +00:00
rustc_errors Remove warnings/errors from compiler when using typeck_body in rustdoc span map builder 2021-08-05 23:08:29 +02:00
rustc_expand Remove special case for statement NodeId assignment 2021-08-06 09:30:47 -05:00
rustc_feature rustc: Fill out remaining parts of C-unwind ABI 2021-08-03 07:06:19 -07:00
rustc_fs_util
rustc_graphviz
rustc_hir Auto merge of #87462 - ibraheemdev:tidy-file-length-ignore-comment, r=Mark-Simulacrum 2021-08-06 02:07:01 +00:00
rustc_hir_pretty Auto merge of #87535 - lf-:authors, r=Mark-Simulacrum 2021-08-02 05:49:17 +00:00
rustc_incremental
rustc_index
rustc_infer Do not suggest impl traits as type arguments 2021-08-03 20:05:50 +09:00
rustc_interface Add back -Zno-profiler-runtime 2021-08-04 10:47:59 +01:00
rustc_lexer Auto merge of #87535 - lf-:authors, r=Mark-Simulacrum 2021-08-02 05:49:17 +00:00
rustc_lint Auto merge of #87462 - ibraheemdev:tidy-file-length-ignore-comment, r=Mark-Simulacrum 2021-08-06 02:07:01 +00:00
rustc_lint_defs Auto merge of #87772 - npmccallum:naked_abi, r=Amanieu 2021-08-07 23:24:15 +00:00
rustc_llvm Auto merge of #87798 - durin42:llvm-14, r=nikic 2021-08-08 04:33:22 +00:00
rustc_macros Auto merge of #87535 - lf-:authors, r=Mark-Simulacrum 2021-08-02 05:49:17 +00:00
rustc_metadata encode generics_of of fields and ty params 2021-08-06 14:20:59 +01:00
rustc_middle Auto merge of #87408 - kornelski:try_reserve_error, r=yaahc 2021-08-07 01:26:15 +00:00
rustc_mir Auto merge of #87408 - kornelski:try_reserve_error, r=yaahc 2021-08-07 01:26:15 +00:00
rustc_mir_build Auto merge of #87737 - LeSeulArtichaut:unsafeck-less-freeze, r=oli-obk 2021-08-05 14:45:09 +00:00
rustc_parse Auto merge of #87235 - poliorcetics:issue-87217-fn-quali-order, r=nagisa 2021-08-08 22:28:01 +00:00
rustc_parse_format
rustc_passes Auto merge of #87772 - npmccallum:naked_abi, r=Amanieu 2021-08-07 23:24:15 +00:00
rustc_plugin_impl
rustc_privacy Auto merge of #87568 - petrochenkov:localevel, r=cjgillot 2021-08-04 02:04:04 +00:00
rustc_query_impl Auto merge of #87515 - crlf0710:trait_upcasting_part2, r=bjorn3 2021-08-03 16:58:56 +00:00
rustc_query_system Auto merge of #87535 - lf-:authors, r=Mark-Simulacrum 2021-08-02 05:49:17 +00:00
rustc_resolve Add hint for unresolved associated trait items if the trait has a single item 2021-08-06 11:31:52 +02:00
rustc_save_analysis Auto merge of #87568 - petrochenkov:localevel, r=cjgillot 2021-08-04 02:04:04 +00:00
rustc_serialize
rustc_session Rollup merge of #87761 - rusticstuff:rustc_error_overflow, r=Mark-Simulacrum 2021-08-07 01:46:32 +09:00
rustc_span Auto merge of #87262 - dtolnay:negative, r=Aaron1011 2021-08-03 04:50:28 +00:00
rustc_symbol_mangling Auto merge of #87535 - lf-:authors, r=Mark-Simulacrum 2021-08-02 05:49:17 +00:00
rustc_target Auto merge of #87535 - lf-:authors, r=Mark-Simulacrum 2021-08-02 05:49:17 +00:00
rustc_trait_selection Auto merge of #86400 - FabianWolff:issue-85735, r=estebank 2021-08-03 19:48:54 +00:00
rustc_traits Auto merge of #87535 - lf-:authors, r=Mark-Simulacrum 2021-08-02 05:49:17 +00:00
rustc_ty_utils
rustc_type_ir
rustc_typeck Auto merge of #87465 - audunhalland:refactor_typeck_primary_body_of, r=eddyb 2021-08-09 01:08:52 +00:00