-
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
allow many_single_char_names is broken #3198
Comments
Applying the allow to a function does not change the behavior of the lint inside the function. This is weird, since the lint is produced through It works if you turn the Removing the |
I'm hitting this issue with other lints like pub fn append_to() {
#![cfg_attr(
feature = "cargo-clippy",
allow(clippy::many_single_char_names)
)]
let (a, b, c, d, e) = (0, 0, 0, 0, 0);
} |
Sure: Playground #![feature(tool_lints)]
#![cfg_attr(
feature = "cargo-clippy",
allow(clippy::many_single_char_names)
)]
#[allow(unused_variables)]
pub fn main() {
let (a, b, c, d, e) = (0, 0, 0, 0, 0);
} |
Hm maybe something changed how lint attributes are processed... Since when do you have these issues? |
Ah, you meant making it an inner attribute of the scope where the function is, yeah I'd prefer not to do that. I've just disabled the lint globally as a workaround for now.
I just started updating criterion to the latest clippy, and the last Rust nightly version criterion used was from june... so... I'd guess between june and today, which isn't probably very helpful. |
I'm looking into that! |
This error started with Repo: https://github.com/flip1995/test_allow_on_fn |
One of these commits are at fault here: rust-lang/rust@758239c |
This collapses both lint tests into one file. Somehow allowing the other lint in the respective files did not work correctly. Maybe that's fixed as part of fixing #3198.
This is no longer an issue: Playground |
Is there a test that prevents this from breaking again? |
Oh good point! |
Playground:
produces
That lint should not trigger, since it is allowed for the function.
The text was updated successfully, but these errors were encountered: