Skip to content

[unwrap_used], [expect_used] do not lint in test cfg #9686

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 23, 2022

Conversation

kraktus
Copy link
Contributor

@kraktus kraktus commented Oct 21, 2022

changelog: [unwrap_used], [expect_used] do not lint in test cfg

fix #9612

I've updated the doc and used cfg acronym, not sure if conditional compiler flag would have been better

@rust-highfive
Copy link

r? @flip1995

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Oct 21, 2022
@llogiq
Copy link
Contributor

llogiq commented Oct 22, 2022

I'd make the config docs more clear by just naming cfg(test) directly. Otherwise this looks good.

Co-authored-by: llogiq <bogusandre@gmail.com>
@flip1995
Copy link
Member

@bors r+

Thanks!

@bors
Copy link
Contributor

bors commented Oct 23, 2022

📌 Commit a0c82d2 has been approved by flip1995

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Oct 23, 2022

⌛ Testing commit a0c82d2 with merge a8a8fd7...

@bors
Copy link
Contributor

bors commented Oct 23, 2022

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: flip1995
Pushing a8a8fd7 to master...

@bors bors merged commit a8a8fd7 into rust-lang:master Oct 23, 2022
bors added a commit that referenced this pull request Feb 23, 2023
Fix test function checker in `unwrap_used`, `expect_used`

After #9686 , `unwrap` and `expect` in integration tests and raw test functions won't be allowed.

fixes #10011
fixes #10238
fixes #10264

---

changelog: Fix: [`expect_used`], [`unwrap_used`], [`dbg_macro`], [`print_stdout`], [`print_stderr`]: No longer lint in test functions, if the related configuration is set
[#10391](#10391)
<!-- changelog_checked -->
bors added a commit that referenced this pull request Feb 24, 2023
Fix test function checker in `unwrap_used`, `expect_used`

After #9686 , `unwrap` and `expect` in integration tests and raw test functions won't be allowed.

fixes #10011
fixes #10238
fixes #10264

---

changelog: Fix: [`expect_used`], [`unwrap_used`], [`dbg_macro`], [`print_stdout`], [`print_stderr`]: No longer lint in test functions, if the related configuration is set
[#10391](#10391)
<!-- changelog_checked -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

unwrap_used/expect_used fire in test module function regardless of allow-unwrap-in-tests/allow-expect-in-tests
5 participants