Skip to content
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

panic lints for debug_assert #7062

Closed
daxpedda opened this issue Apr 10, 2021 · 0 comments · Fixed by #7063
Closed

panic lints for debug_assert #7062

daxpedda opened this issue Apr 10, 2021 · 0 comments · Fixed by #7063
Labels
C-bug Category: Clippy is not doing the correct thing I-false-positive Issue: The lint was triggered on code it shouldn't have

Comments

@daxpedda
Copy link
Contributor

daxpedda commented Apr 10, 2021

Lint name: panic

I tried this code:

debug_assert!(true, "test");

I expected to see this happen: no warning

Instead, this happened: panic should not be present in production code

I am assuming that the error message is correct in saying that this lint is supposed to remove panics from production code, but debug_assert isn't present in debug code. So I consider this a false positive.

EDIT: there might be an issue here, my report might be incorrect, because I can't reproduce this in the Clippy tests, currently researching

This is a false-positive that get's triggered when adding a message to debug_assert.

@daxpedda daxpedda added C-bug Category: Clippy is not doing the correct thing I-false-positive Issue: The lint was triggered on code it shouldn't have labels Apr 10, 2021
@bors bors closed this as completed in 75e20ba Apr 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: Clippy is not doing the correct thing I-false-positive Issue: The lint was triggered on code it shouldn't have
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant