Skip to content

Should op_ref really recommend deref'ing string literals? #1664

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

Closed
birkenfeld opened this issue Apr 8, 2017 · 2 comments
Closed

Should op_ref really recommend deref'ing string literals? #1664

birkenfeld opened this issue Apr 8, 2017 · 2 comments
Assignees
Labels
C-bug Category: Clippy is not doing the correct thing good first issue These issues are a good way to get started with Clippy T-middle Type: Probably requires verifiying types

Comments

@birkenfeld
Copy link
Contributor

birkenfeld commented Apr 8, 2017

It recommends changing &val[0..1] == "str" into val[0..1] == *"str" which looks very uncomfortable to me...

@birkenfeld birkenfeld changed the title SHould op_ref Should op_ref really recommend deref'ing string literals? Apr 8, 2017
@oli-obk
Copy link
Contributor

oli-obk commented Apr 8, 2017

No it should not. I'll fix it.

@oli-obk oli-obk added good first issue These issues are a good way to get started with Clippy C-bug Category: Clippy is not doing the correct thing T-middle Type: Probably requires verifiying types labels Apr 8, 2017
@oli-obk oli-obk self-assigned this Apr 8, 2017
@oli-obk
Copy link
Contributor

oli-obk commented Apr 11, 2017

fixed in #1671

@oli-obk oli-obk closed this as completed Apr 11, 2017
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 good first issue These issues are a good way to get started with Clippy T-middle Type: Probably requires verifiying types
Projects
None yet
Development

No branches or pull requests

2 participants