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

no_effect lint should also lint calls to const_fn where the result is unused #2722

Open
oli-obk opened this issue May 3, 2018 · 2 comments
Labels
A-lint Area: New lints

Comments

@oli-obk
Copy link
Contributor

oli-obk commented May 3, 2018

Vec::new();

is an example (soon at least)

@oli-obk oli-obk added the A-lint Area: New lints label May 3, 2018
@clarfonthey
Copy link
Contributor

clarfonthey commented May 29, 2018

This is rust-lang/rust#50805.

Well, was, anyway. I think this should be done upstream.

@est31
Copy link
Member

est31 commented May 29, 2018

I too think it should be done in rustc. But in order to be in rustc, it may not have false positives. I closed the PR because I couldn't figure out a watertight check.

Thinking about it a bit more we could maybe only lint in non-generic code, aka where all the generic input types are known.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lint Area: New lints
Projects
None yet
Development

No branches or pull requests

3 participants