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

let_and_return suggestion causes errors macro_rule #4997

Closed
elichai opened this issue Jan 5, 2020 · 1 comment · Fixed by #5008
Closed

let_and_return suggestion causes errors macro_rule #4997

elichai opened this issue Jan 5, 2020 · 1 comment · Fixed by #5008
Labels
C-bug Category: Clippy is not doing the correct thing I-suggestion-causes-error Issue: The suggestions provided by this Lint cause an ICE/error when applied L-suggestion Lint: Improving, adding or fixing lint suggestions T-macros Type: Issues with macros and macro expansion

Comments

@elichai
Copy link
Contributor

elichai commented Jan 5, 2020

Hi, the following code: https://play.rust-lang.org/?gist=0f26eb7594df37138a8ff964c50cc3ab
says the let binding is unnecessary but the suggestion causes the code to not compile with the following error:
error: attempted to repeat an expression containing no syntax variables matched as repeating at this depth

@JohnTitor JohnTitor added L-suggestion Lint: Improving, adding or fixing lint suggestions 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 labels Jan 5, 2020
@JohnTitor
Copy link
Member

Maybe we should not trigger this lint on macros.

@JohnTitor JohnTitor added the C-bug Category: Clippy is not doing the correct thing label Jan 5, 2020
@bors bors closed this as completed in 62ff639 Jan 6, 2020
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-suggestion-causes-error Issue: The suggestions provided by this Lint cause an ICE/error when applied L-suggestion Lint: Improving, adding or fixing lint suggestions T-macros Type: Issues with macros and macro expansion
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants