Skip to content

Add tests for the drop behavior of some control flow constructs#100526

Merged
bors merged 1 commit intorust-lang:masterfrom
Noratrieb:tests!
Aug 15, 2022
Merged

Add tests for the drop behavior of some control flow constructs#100526
bors merged 1 commit intorust-lang:masterfrom
Noratrieb:tests!

Conversation

@Noratrieb
Copy link
Member

@Noratrieb Noratrieb commented Aug 14, 2022

In #100513 it was shown that the drop behaviour of let_chains is not correct currently. Since drop behaviour is something pretty subtle, this adds explicit tests for the drop behavior of if, if let and match to make sure that it does not regress in the future.

The println!s were left in to make debugging easier in case something goes wrong, but they are not required for the test.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants