Add lint to detect floating point operations that can be computed more
accurately at the cost of performance. `cbrt`, `ln_1p` and `exp_m1`
library functions call their equivalent cmath implementations which is
slower but more accurate so moving checks for these under this new lint.
Merge the accuracy and efficiency lints into a single lint that
checks for improvements to accuracy, efficiency and readability
of floating-point expressions.
Prevent `missing_const_for_fn` on functions with const generic params
`const` functions cannot have const generic parameters so prevent the
`missing_const_for_fn` lint from firing in that case.
changelog: Fix false positive in `missing_const_for_fn`
Fixes#5192
New Lint: `wildcard imports`
Fixes#1228
### A few notes:
- I put this lint in the pedantic group, even though in the issue restriction was mentioned.
- Every fallout fix was automatically applied by `cargo fix` (This produced 3 `unused_imports` warnings) and are in commit 7e834c8. So reverting these changes wouldn't be a problem.
### A few ideas:
- A configuration to specify the amount of imported Items, where a `*` might be better.
- ~~A configuration to disable the lint for enums. Or just disable the lint for enums, since there is [`enum_glob_use`](https://rust-lang.github.io/rust-clippy/master/index.html#enum_glob_use)~~ I moved `enum_glob_use` into this lint in 12937f0
### A few quotes from the issue:
> Is there a way to ask the compiler about the modules or symbols that the current file is using?
Yes there is. I found it, once I was nearly finished implementing it myself. See 321d64a
> one hard optional feature would be to figure out what is currently used and add a suggestion to replace it with a full import list.
Yeah that was pretty hard, until I found the query for this. Queries are cool, but too hard to find.
> FWIW VS Code and Intellij IDEA both offer imports deglobbing which replace * with required imports.
And now, Clippy can do this too! 🎉
---
Your thoughts on the notes/ideas?
changelog: Add new lint [`wildcard imports`]. Add suggestion to [`enum_glob_use`]
Move check for lossy whole-number floats out of `excessive_precision`
changelog: Add new lint `lossy_float_literal` to detect lossy whole number float literals and move it out of `excessive_precision` again.
Fixes#5201
Update License
r? @Manishearth
I'm not sure if the Copyright claim was left out on purpose in the LICENSE-* files. I added them, because the official templates have them.
changelog: none
redundant_clone: Migrate to new dataflow framework
Migration to [the new dataflow framework](https://github.com/rust-lang/rust/pull/65672) is ongoing in rustc. This PR updates the dataflow impl in `redundant_clone` lint.
---
changelog: none