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

lint uses of dynamic dispatch where static dispatch would be possible #892

Closed
oli-obk opened this issue May 2, 2016 · 1 comment
Closed

Comments

@oli-obk
Copy link
Contributor

oli-obk commented May 2, 2016

New users' code or refactored code might end up containing e.g. functions taking a &Fn() as an argument, when they could take a generic &T that has a T: Fn() trait bound instead.

Linting this in a "perfect" way is obviously (too?) hard. But simple cases could be caught for now and the lint could be replaced by a full blown proof $whenever_someone_is_highly_motivated

Related RFC: rust-lang/rfcs#1603 (comment)

@oli-obk
Copy link
Contributor Author

oli-obk commented May 12, 2016

duplicate of #14

@oli-obk oli-obk closed this as completed May 12, 2016
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

1 participant