-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Add large-error-ignored config-knob
#15697
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
base: master
Are you sure you want to change the base?
Conversation
| if let ty::Adt(adt, _) = err_ty.kind() | ||
| && large_err_ignored.contains(&adt.did()) | ||
| { | ||
| return; | ||
| } | ||
| if let ty::Adt(adt, subst) = err_ty.kind() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe integrate this check into the let-chain?
if let ty::Adt(adt, subst) = err_ty.kind()
&& !large_err_ignored.contains(&adt.did())
&& /* rest of the let-chain.. */There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpicked about that, but that would complicate the else-clause
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I see what you mean. Then maybe put this check inside the then-block?
This doesn't really matter of course – it's just that it looks a bit strange to me to check for err_ty being an ADT twice
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, yet all variants come down to some duplication, so I'd rather leave it as it
|
r? clippy |
|
☔ The latest upstream changes (possibly a8d1258) made this pull request unmergeable. Please resolve the merge conflicts. |
Fixes #15404
changelog: [
result_large_err]: Addlarge_error_ignoredconfiguration