-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
unseparated_literal_suffix is very opinion oriented 0u8
versus 0_u8
#7658
Comments
As far as I can tell, #703 is the original issue for this lint and #1145 is the pull request that implemented it. This lint is more than 5 years old. You've probably never seen it because it's allow by default. So regarding complaints about "there is no talk about this". |
I said I never see
here ? |
No. You said you'd never see the lint before as well.
..
Well then this is discussion you're looking for. .. I don't have any more time for this issue. Good luck getting this lint changed/removed. |
Well you kill my wish to make thing better, don't be surprise when people complain about clippy more and more. |
You should reopen this issue as there may be interest in changing it from someone on the team. I wished you luck because I don't like this lint either. Maybe you thought I was being sarcastic. |
I agree - unseparated_literal_suffix is founded on a style assertion that is not well supported outside of Clippy, and one could reasonably have the opposite opinion. Such lints should be in the restriction category. I think the ability to separate the type with an underscore is an accidental consequence of a language feature intended for grouping like |
I think it would be better if Perhaps we can have a configuration for the lint that specifies said enforced style. |
I think this is an issue where multiple acceptable opinions exist, and therefore it needs to be a restriction lint. We should support the opposing opinion through a config option or another lint. Related: rust-lang/style-team#155. |
Makes sense. I will try to have a look on this. @rustbot claim |
I just found unseparated_literal_suffix with rust-bakery/nom#1387 and I believe this have never been talk about:
0 as u8
is very clear, clippy lint to just typed the0
make sense to me, but then advice to add an_
to make it more clear ? when the original code is very clear ?0u8
is used in a LOT in rust literature without any problem I don't think it's more unclear than0_u8
0_u8
is longer to write0u8
to0_u8
0_u8
anywhere beforeThus I don't understand the lint (and the consequence to other lint) come a little from nowhere in my opinion.
The text was updated successfully, but these errors were encountered: