-
Notifications
You must be signed in to change notification settings - Fork 13k
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
unused variable / dead assignment warnings should have lint modes #3266
Comments
I did drop in some fixme's into the code. |
If we do this can we remove feature that allows the |
I was wondering whether that would be a good thing or not. Currently I think not for two reasons. First, the lint annotations are very chatty. Something like
is a lot less chatty than
of course maybe we should just disable this warning for function parameters. Most compilers do. Similarly, Second, I think right now they are too coarse-grained. We'd need them to be applicable at the level of individual statements. I guess both of these problems are fixable though. |
non-critical for 0.6, de-milestoning |
I would like this for Servo, specifically for the auto-generated bindings. I already use allow(unused_imports) now for similar reasons. think _ as a prefix suppression should also be kept. |
This leaves the default lint modes at `warn`, but now the unused variable and dead assignment warnings are configurable on a per-item basis. As described in #3266, this just involved carrying around a couple ids to pass over to `span_lint`. I personally would prefer to keep the `_` prefix as well. This closes #3266.
I think this can be closed now. |
An M1 (aarch64, Apple Silicon) runner is available on the free plan since January 2024 (see https://github.blog/changelog/2024-01-30-github-actions-introducing-the-new-m1-macos-runner-available-to-open-source/).
In rust-lang#3266 a job to build macOS ARM binaries was added, but the artifacts weren't yet propagated to the release. This PR adds this missing step.
RIght now, they are always issued as warnings without any control from the user. To hook into the lint system, the liveness code has to be modified to thread along an expr/item id. Not a huge deal but sufficiently annoying I didn't do it.
The text was updated successfully, but these errors were encountered: