-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
syntax: add debug_assert! that is only active with --cfg debug. #7869
Conversation
@thestinger has pointed out that this should probably Unless someone has better argument for not changing to |
@huonw: your example would still be relevant if it aborted, you could add a check you depend on and it would be still be gone with optimizations You can catch a failure at a task boundary though, so it means you could accidentally be silencing your debugging asserts, and it doesn't ever make sense to do that. |
@thestinger |
@huonw: I'll r+ if you switch it to printing out an error and then calling |
I don't understand how fail vs. abort figures into it. Doesn't it get compiled-out in all cases when you don't pass |
Can we get a |
@graydon: the issue is that it should be clearly for debugging, and if it fails you can accidentally catch the failure at a task boundary and miss it |
@huonw mind updating this? |
Closing this for now to remove from bors' queue; I'll try to get back to it soon (maybe, hopefully). |
I currently disagree that this should abort. |
…shearth Update `str` utils to prevent ICEs and FNs This PR reworks some string handling for lints regarding enum naming. I hope the refactoring will prevent future ICEs and help with new bug free implementations. It might be better to review this PR by going through the commits, as `clippy_utils::camel_case` was renamed to `clippy_utils::str_utils` and then changed further. GH sadly doesn't really make the changes that obvious 🙃 Not too much more to say. Have a nice day 🌞 --- Fixes: rust-lang/rust-clippy#7869 changelog: ICE Fix: [`enum_variant_names`] rust-lang#7869
No description provided.