-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Pedantic lint against unreachable!()
#4959
Comments
Easy extension of #4657 |
I'd like to work on this issue |
I just realized, that this lint already exists, but is allow-by-default (and will stay that way). So you have to enable it with |
I think the opposite would be better, add a lint, that will warn if |
That lint already exists. But it warns regardless of if |
Just realized, that an issue exists for this (the lint doesn't trigger, when a message is passed) Duplicate of #3528 |
It would be nice to have a lint, that detects any use of the
unreachable!
macro without arguments.This is useful for procedural macros, where only the following is shown
This is fine, if you only have one or two uses of
unreachable
, but it becomes very difficult in larger codebases, because you have to check every occurrence ofunreachable
in the codebase.Adding some text to the macro will be a lot more helpful!
unreachable!("ident is neither enable nor disable")
I think
panic!
in a proc-macro has the same issue.The text was updated successfully, but these errors were encountered: