Update clippy for latest rustc changes
Specifically, this revises the clippy integration to utilize a new
callback to register its lints, as the prior editing of lint store in
Session is no longer possible.
---
changelog: none
Specifically, this revises the clippy integration to utilize a new
callback to register its lints, as the prior editing of lint store in
Session is no longer possible.
build: improve script and travis config
* fix a diff failure on windows
See https://travis-ci.com/rust-lang/rust-clippy/jobs/245971932#L1625
for an example.
* use cmp instead of diff > /dev/null
* clone single branch instead of clone then checking out
* do not decrypt key if have no diff change
changelog: none
Add lint for debug_assert_with_mut_call
closes#1526
**What does not work:**
* detecting a mut call in the format string itself, e.g. `debug_assert!(false, "{}", vec![1].pop())`
* detecting `*mut T` usage (pointer)
---
changelog: add new lint `debug_assert_with_mut_call`
Fix suggestion of `explicit_counter_loop`
changelog: In the suggestion of `explicit_counter_loop`, if the `for` loop argument doesn't implement `Iterator`, then we suggest `x.into_iter().enumerate()` (or `x.iter{_mut}()` as appropriate). Also, the span of the suggestion has been corrected.
Fixes#4678
This lint will complain when you put a mutable function/method call
inside a `debug_assert` macro, because it will not be executed in
release mode, therefore it will change the execution flow, which is not
wanted.
Due to System Integrity Protection (SIP), exporting
LD_LIBRARY_PATH will not work on macOS systems.
Therefore, rather than disable SIP, we could symlink
those rust dev libs to /usr/local/bin.
I already tried install_name_tool(1) but couldn't make
clippy-driver work on CI for whatever reasons.
build: use release build of RTIM
rustup-toolchain-install-master on Travis Windows builds is
unexpectedly slower compared to when run on other OSes.
This commit tries to use release build of RTIM as a mean to
improve performance there.
changelog: none
rustup-toolchain-install-master on Travis Windows builds is
unexpectedly slower when it was running on other OSes.
This commit tries to use release build of RTIM as a mean to
improve performance there.
Add `inefficient_to_string` lint
Closes#4586
changelog: Add `inefficient_to_string` lint, which checks for calling `to_string` on `&&str`, which would bypass the `str`'s specialization