-
Notifications
You must be signed in to change notification settings - Fork 1.7k
or-fun-call macro suggestion bug #1018
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
Labels
C-bug
Category: Clippy is not doing the correct thing
C-enhancement
Category: Enhancement of lints, like adding more cases or adding help messages
T-macros
Type: Issues with macros and macro expansion
Comments
The suggestion is badly formatted but |
Is this a problem with |
Yes, it's been there since #944 with some macro spans. |
Do you mean that .view_args
.get(name)
.ok_or_else(format!("{} not given", name)) is better here? |
.ok_or_else(|| format!("{} not given", name)) It avoids building the string when it is not necessary. |
ok, thanks |
phansch
added a commit
to phansch/rust-clippy
that referenced
this issue
Apr 24, 2019
bors
added a commit
that referenced
this issue
Apr 24, 2019
Add test for or_fun_call macro suggestion changelog: none Closes #1018
bors
added a commit
that referenced
this issue
Apr 24, 2019
Add test for or_fun_call macro suggestion changelog: none Closes #1018
bors
added a commit
that referenced
this issue
Apr 24, 2019
Add test for or_fun_call macro suggestion changelog: none Closes #1018
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
C-enhancement
Category: Enhancement of lints, like adding more cases or adding help messages
T-macros
Type: Issues with macros and macro expansion
I have this code:
Clippy reports:
Perhaps Clippy should ignore
.ok_or(macro!())
constructs?The text was updated successfully, but these errors were encountered: