The update script now also generates the 'register_removed' section in
`clippy_lints/src/lib.rs`.
Also, instead of using `let mut store ...`, I added a new identifier
line so that the replacement will continue to work in case `let mut
store ...` ever changes.
3217: Fix string_lit_as_bytes lint for macros r=phansch a=yaahallo
Prior to this change, string_lit_as_bytes would trigger for constructs
like `include_str!("filename").as_bytes()` and would recommend fixing it
by rewriting as `binclude_str!("filename")`.
This change updates the lint to act as an EarlyLintPass lint. It then
differentiates between string literals and macros that have bytes
yielding alternatives.
Closes#3205
3366: Don't expand macros in some suggestions r=oli-obk a=phansch
Fixes#1148Fixes#1628Fixes#2455Fixes#3023Fixes#3333Fixes#3360
Co-authored-by: Jane Lusby <jlusby42@gmail.com>
Co-authored-by: Philipp Hansch <dev@phansch.net>
3364: simplify ci scripts r=phansch a=matthiaskrgr
This makes it easier to flip the switch on pedantic lints on the clippy codebase.
Co-authored-by: Matthias Krüger <matthias.krueger@famsik.de>
Prior to this change, string_lit_as_bytes would trigger for constructs
like `include_str!("filename").as_bytes()` and would recommend fixing it
by rewriting as `binclude_str!("filename")`.
This change updates the lint to act as an EarlyLintPass lint. It then
differentiates between string literals and macros that have bytes
yielding alternatives.
Closes#3205
3355: Lint to remove redundant `clone()`s r=oli-obk a=sinkuu
This PR adds lint `redundant_clone`. It suggests to remove redundant `clone()` that clones a owned value that will be dropped without any usage after that.
Real-world example: https://github.com/rust-lang/rust/compare/7b0735a..sinkuu:redundant_clone2
Co-authored-by: Shotaro Yamada <sinkuu@sinkuu.xyz>
3359: ci: allow all branches except trying.tmp and staging.tmp to be built r=phansch a=matthiaskrgr
r? @flip1995
The problem was that with the current configuration, if I made a branch `feature1` and pushed it to travis to have it checked before making a PR, travis would skip it because it only built the 3 branches that were specified when setting up bors.
The change allows all branch names to be build by default again, except for travis.tmp.
The gh-pages branch is skipped as per travis-ci defaults: https://docs.travis-ci.com/user/customizing-the-build/#safelisting-or-blocklisting-branches
Co-authored-by: Matthias Krüger <matthias.krueger@famsik.de>
3362: travis: work around temporary test failure due to rustc crashing on hyper r=phansch a=matthiaskrgr
Upstream ticket: https://github.com/rust-lang/rust/issues/55376
Co-authored-by: Matthias Krüger <matthias.krueger@famsik.de>
3358: Revert "new_ret_no_self: add sample from #3313 to Known Problems section." r=oli-obk a=matthiaskrgr
This reverts commit fd2f6dd382.
Issue #3313 has been fixed.
Co-authored-by: Matthias Krüger <matthias.krueger@famsik.de>
3331: Disable arithmetic lints in constant items r=oli-obk a=pengowen123
Currently this will not catch cases in associated constants. I'm not sure whether checking spans is the best way to solve this issue, but I don't think it will cause any problems.
Fixes#1858
Co-authored-by: Owen Sanchez <pengowen816@gmail.com>
3346: Add lint for calling `mem::discriminant` on a non-enum type r=flip1995 a=HMPerson1
Also, if the type is a reference to an enum, we suggest removing `&`s and/or dereferencing.
Fixes#3342
Co-authored-by: HMPerson1 <hmperson1@gmail.com>
Co-authored-by: Philipp Krones <hello@philkrones.com>