Skip to content

unnecessary_lazy_evaluations gets triggered by a derive macro #9439

Closed
@griffi-gh

Description

@griffi-gh

Summary

unnecessary_lazy_evaluations gets triggered by a FromForm macro (rocket 0.5-rc.2)

Lint Name

unnecessary_lazy_evaluations

Reproducer

#[derive(FromForm)]
pub struct RegisterData<'a> {
  email: &'a str,
  username: &'a str,
  password: &'a str,
  repeat_password: Option<&'a str>,
}

...Or any other struct with #[derive(FromForm)]

VSCodium_Lxazpouwme

Version

rustc 1.65.0-nightly (29e4a9ee0 2022-08-10)
binary: rustc
commit-hash: 29e4a9ee0253cd39e552a77f51f11f9a5f1c41e6
commit-date: 2022-08-10
host: x86_64-pc-windows-msvc
release: 1.65.0-nightly
LLVM version: 14.0.6

Additional Labels

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: Clippy is not doing the correct thingI-false-positiveIssue: The lint was triggered on code it shouldn't have

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions