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
Fix ICE in `use_self` lint
The ICE is produced by building this span:
55e7818a06/clippy_lints/src/use_self.rs (L55-L60)
`span` can start in the file the macro is defined in and end where the macro is called.
changelog: Fix ICE in `use_self` lint
new lints around`#[must_use]`
changelog: Add `must_use_candidate` lint, add `must-use-unit` lint, add `double_must_use` lint
The first one checks if an public function or method has no mutable argument and mutates no non-local data and lints if it has no `#[must_use]` attribute. It will skip inner functions, because those are usually highly local and the attribute doesn't have as much benefit there.
The second lints `#[must_use]` attributes on functions and methods that return unit. Those attributes are likely a remnant from a refactoring that removed the return value.
The last one lints for `#[must_use]` attributrs without text on functions that return a type which is already marked `#[must_use]`. This has no auto-suggestion, because while it would be easy to do, there may be value in writing a detailed text for the attribute instead.
This fixes#4526
`must_use_unit` lints unit-returning functions with a `#[must_use]`
attribute, suggesting to remove it.
`double_must_use` lints functions with a plain `#[must_use]`
attribute, but which return a type which is already `#[must_use]`,
so the attribute has no benefit.
`must_use_candidate` is a pedantic lint that lints functions and
methods that return some non-unit type that is not already
`#[must_use]` and suggests to add the annotation.