Skip to content
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

False Positive: redundant_closure with macro #6732

Closed
TyPR124 opened this issue Feb 12, 2021 · 0 comments · Fixed by #6871
Closed

False Positive: redundant_closure with macro #6732

TyPR124 opened this issue Feb 12, 2021 · 0 comments · Fixed by #6871
Labels
C-bug Category: Clippy is not doing the correct thing good-first-issue These issues are a good way to get started with Clippy I-suggestion-causes-error Issue: The suggestions provided by this Lint cause an ICE/error when applied T-macros Type: Issues with macros and macro expansion

Comments

@TyPR124
Copy link

TyPR124 commented Feb 12, 2021

Lint name: redundant_closure

I tried this code:

use quote::quote;

fn _bar() {
    // Clippy suggests '||quote!()' => '$crate::__private::TokenStream::new'
    let _ = true.then(||quote!());
}

Playground

Meta

clippy 0.0.212 (cb75ad5d 2021-02-10)

rustc 1.50.0 (cb75ad5db 2021-02-10)
binary: rustc
commit-hash: cb75ad5db02783e8b0222fee363c5f63f7e2cf5b
commit-date: 2021-02-10
host: x86_64-pc-windows-msvc
release: 1.50.0
@TyPR124 TyPR124 changed the title False Positive: redundant_closure with empty macro False Positive: redundant_closure with macro Feb 12, 2021
@giraffate giraffate added C-bug Category: Clippy is not doing the correct thing good-first-issue These issues are a good way to get started with Clippy I-suggestion-causes-error Issue: The suggestions provided by this Lint cause an ICE/error when applied labels Feb 15, 2021
@phansch phansch added the T-macros Type: Issues with macros and macro expansion label Feb 16, 2021
@bors bors closed this as completed in 2cb5bbf Mar 8, 2021
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 good-first-issue These issues are a good way to get started with Clippy I-suggestion-causes-error Issue: The suggestions provided by this Lint cause an ICE/error when applied T-macros Type: Issues with macros and macro expansion
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants