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

Why isn't indexing_slicing a restriction ? #2933

Closed
gnzlbg opened this issue Jul 18, 2018 · 5 comments
Closed

Why isn't indexing_slicing a restriction ? #2933

gnzlbg opened this issue Jul 18, 2018 · 5 comments

Comments

@gnzlbg
Copy link
Contributor

gnzlbg commented Jul 18, 2018

It enforces a coding style that does not make sense for every crate, and it should IMO be opt-in, even with -D clippy-pedantic.

@ghost
Copy link

ghost commented Jul 19, 2018

To me this lint is similar to integer_arithmetic. Both of these lints suggest that you forgo basic features of the language (i.e. indexing and arithmetic operators) in the name of safety. integer_arithmetic is in restriction.

@gnzlbg
Copy link
Contributor Author

gnzlbg commented Jul 19, 2018

The same applies to shadowing, for example.

@flip1995
Copy link
Member

This lint got moved to pedantic not long ago. Relevant issue: #2536, PR: #2790. I don't really have an opinion about restriction vs pedantic for this lint.

@Manishearth
Copy link
Member

That seems like that was to be in accordance with the issue, but this definitely looks like a restriction lint and is under restriction in the clippy rfc. I'm in favor of switching back

@oli-obk thoughts?

@oli-obk
Copy link
Contributor

oli-obk commented Aug 2, 2018

Yea... I guess I was confused. Restriction makes more sense

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants