add lint on File::read_to_string and File::read_to_end
Adds lint `verbose_file_reads` which checks for use of File::read_to_end and File::read_to_string.
Closes https://github.com/rust-lang/rust-clippy/issues/4916
changelog: add lint on File::{read_to_end, read_to_string}
Use `edition:2018` flag more widely
Now we recommend using `// edition:2018`, so let's use it more widely.
Also replace a too old example with new one in the docs.
changelog: none
Update rustc-guide to rustc-dev-guide
The rustc-guide is being renamed to the rustc-dev-guide. The discussion is in rust-lang/rustc-guide#470.
This PR revises rustc-guide to rustc-dev-guide in the Readme Markdown file.
Transition tracker: rust-lang/rustc-guide#602
changelog: none
Improve placeholder in map_unit_fn
Instead of using `_` as a default placeholder use `a`.
fixes#5180
changelog: Improve default placeholder in map_unit_fn
redundant_pattern: take binding (ref, ref mut) into account in suggestion
fixes#5271
changelog: redundant_pattern: take binding (ref, ref mut) into account in suggestion (#5271)
Fix match single binding when in a let stmt
Fix bad suggestion when `match_single_binding` lints when inside a local (let) statement.
Fixes#5267
changelog: none
Improve error messages for {option,result}_map_unit_fn
Instead of saying "unit function", use the phrase the description uses: "function that returns the unit type".
Fixes#5180.
changelog: Improve error messages for {option,result}_map_unit_fn
Mention the setup instructions in CONTRIBUTING
Multiple people seem to have missed this based on questions asked in the Discord channel. Might as well mention it up front.
changelog: none
Rename macro_use_import -> macro_use_imports
I missed this during review of #5230. We can just do this, without deprecating the old name, since this lint didn't hit nightly rustc yet.
changelog: none
Fix deploy script for tag deploys
By hand updating the documentation for the `rust-1.41.1` release, I found, that the deploy script was buggy for tag deploys. Luckily we weren't affected yet (will only run if the commit of the tag already has the workflow config, so probably ~`rust-1.43.0`)
The bug:
When a tag was deployed, until now it also updated the master documentation to the state of the tag. This was because the `git add .` not only updated the files created or modified by the tag commit, but also the master lints.json file.
changelog: none
Resolve false positives of unnecessary_cast for non-decimal integers
This PR resolves false positives of `unnecessary_cast` for hexadecimal integers to floats and adds a corresponding test case.
Fixes: #5220
changelog: none