Skip to content

useless_if_let_seq should not warn for composite ifs #1089

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

Closed
Manishearth opened this issue Jul 12, 2016 · 1 comment
Closed

useless_if_let_seq should not warn for composite ifs #1089

Manishearth opened this issue Jul 12, 2016 · 1 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

Comments

@Manishearth
Copy link
Member

It warns on:

    let mut bubble_inline_sizes_separately = debug_options.bubble_widths;
    if debug_options.trace_layout {
        paint_threads = 1;
        layout_threads = 1;
        bubble_inline_sizes_separately = true;
    }

While this could be rewritten, I'm not sure if it should.

Additionally, we shouldn't use span_suggestion here since the suggestion isn't valid rust code.

@Manishearth Manishearth added the C-bug Category: Clippy is not doing the correct thing label Jul 12, 2016
@phansch phansch added the I-false-positive Issue: The lint was triggered on code it shouldn't have label Dec 21, 2020
@GnomedDev
Copy link
Contributor

GnomedDev commented Oct 16, 2024

useless_if_let_seq does not exist anymore, and the closest name useless_let_if_seq doesn't trigger for

#![allow(unused_assignments, unused_variables)]
#![warn(clippy::useless_if_let_seq)]

pub fn example(bubble_widths: bool, trace_layout: bool) {
    let paint_threads;
    let layout_threads;

    let mut bubble_inline_sizes_separately = bubble_widths;
    if trace_layout {
        paint_threads = 1;
        layout_threads = 1;
        bubble_inline_sizes_separately = true;
    }
}

Should this be closed?

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

No branches or pull requests

3 participants