rust/compiler/rustc_typeck
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
..
src Auto merge of #87465 - audunhalland:refactor_typeck_primary_body_of, r=eddyb 2021-08-09 01:08:52 +00:00
Cargo.toml rfc3052: Remove authors field from Cargo manifests 2021-07-29 14:56:05 -07:00
README.md

For high-level intro to how type checking works in rustc, see the type checking chapter of the rustc dev guide.