]> git.lizzy.rs Git - rust.git/commit
Rollup merge of #92695 - Swatinem:cover-nested, r=wesleywiser
authorMatthias Krüger <matthias.krueger@famsik.de>
Tue, 8 Feb 2022 05:47:32 +0000 (06:47 +0100)
committerGitHub <noreply@github.com>
Tue, 8 Feb 2022 05:47:32 +0000 (06:47 +0100)
commit6024426e86af6dbe3991901752d886e9d43efa2a
tree00a50a80ec652585efcc62c34a152c928c533c4a
parent1f841fc5fe4f7c6f6c73de93930c3ee38c5f814b
parentfe9271af22f4a24a3fb06336c2e38fa124158bc6
Rollup merge of #92695 - Swatinem:cover-nested, r=wesleywiser

Add `#[no_coverage]` tests for nested functions

I was playing around a bit trying to figure out how `#[no_coverage]` behaves for nested functions and thought I might as well add this as a testcase.

The "nesting covered fn inside not covered fn" case looks pretty much as expected.

The "nesting not covered fn inside a covered fn" case however seems a bit counterintuitive.
Essentially the region of the outer function "covers" its whole lexical range. And the inner function does not generate any region at all. 🤷🏻‍♂️

r? `@richkadel`