Merge commit '371120bdbf' into clippyup
This commit is contained in:
parent
8518391e72
commit
7e9abb311d
152 changed files with 2226 additions and 440 deletions
|
|
@ -40,7 +40,7 @@ pub fn check_fn(cx: &LateContext<'_>, kind: FnKind<'_>, decl: &FnDecl<'_>, body:
|
|||
};
|
||||
|
||||
// Body must be &(mut) <self_data>.name
|
||||
// self_data is not neccessarilly self, to also lint sub-getters, etc…
|
||||
// self_data is not necessarily self, to also lint sub-getters, etc…
|
||||
|
||||
let block_expr = if_chain! {
|
||||
if let ExprKind::Block(block,_) = body.value.kind;
|
||||
|
|
|
|||
|
|
@ -252,6 +252,11 @@ declare_clippy_lint! {
|
|||
/// A `Result` is at least as large as the `Err`-variant. While we
|
||||
/// expect that variant to be seldomly used, the compiler needs to reserve
|
||||
/// and move that much memory every single time.
|
||||
/// Furthermore, errors are often simply passed up the call-stack, making
|
||||
/// use of the `?`-operator and its type-conversion mechanics. If the
|
||||
/// `Err`-variant further up the call-stack stores the `Err`-variant in
|
||||
/// question (as library code often does), it itself needs to be at least
|
||||
/// as large, propagating the problem.
|
||||
///
|
||||
/// ### Known problems
|
||||
/// The size determined by Clippy is platform-dependent.
|
||||
|
|
@ -330,7 +335,7 @@ declare_clippy_lint! {
|
|||
|
||||
declare_clippy_lint! {
|
||||
/// ### What it does
|
||||
/// Lints when `impl Trait` is being used in a function's paremeters.
|
||||
/// Lints when `impl Trait` is being used in a function's parameters.
|
||||
/// ### Why is this bad?
|
||||
/// Turbofish syntax (`::<>`) cannot be used when `impl Trait` is being used, making `impl Trait` less powerful. Readability may also be a factor.
|
||||
///
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue