diff options
| author | bors <bors@rust-lang.org> | 2021-08-09 01:08:52 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-08-09 01:08:52 +0000 |
| commit | d3928b183db1023c023f8afb4f5dfbee34994051 (patch) | |
| tree | 7263a1ee859e0e265680158e9e35a8b733b04ec4 /src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha256.rs | |
| parent | 74a11c63f85c2b1796852f317358188f9cde236e (diff) | |
| parent | 855fa13463eea85cf91b37726c5d2e4351a6da6f (diff) | |
| download | rust-d3928b183db1023c023f8afb4f5dfbee34994051.tar.gz rust-d3928b183db1023c023f8afb4f5dfbee34994051.zip | |
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.
Diffstat (limited to 'src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha256.rs')
0 files changed, 0 insertions, 0 deletions
