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

Suggest changing *x to x in toplevel_ref_arg #406

Open
llogiq opened this issue Oct 22, 2015 · 0 comments
Open

Suggest changing *x to x in toplevel_ref_arg #406

llogiq opened this issue Oct 22, 2015 · 0 comments
Labels
C-enhancement Category: Enhancement of lints, like adding more cases or adding help messages

Comments

@llogiq
Copy link
Contributor

llogiq commented Oct 22, 2015

If we have a toplevel ref argument, toplevel_ref_arg will suggest removing the ref (it should perhaps also propose removing mut if it's there). However, this will lead to error if the argument is dereferenced within the function.

At the very least, the message should note that dereferences can lead to errors. Better yet would be to find all those instances and suggest removing the *.

@Manishearth Manishearth added the C-enhancement Category: Enhancement of lints, like adding more cases or adding help messages label Oct 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: Enhancement of lints, like adding more cases or adding help messages
Projects
None yet
Development

No branches or pull requests

2 participants