Skip to content

unresolved_assoc_item false positive #16327

Closed
@carllerche

Description

@carllerche

rust-analyzer version: 0.3.1799-standalone

rustc version: rustc 1.75.0 (82e1608df 2023-12-21)

relevant settings: N/A, as far as I know.

I am working on a large-ish project that is currently private. I see unresolved_assoc_item false positives, where the diagnostic reports an error, but cargo check completes without error or warning. Unfortunately, I cannot assemble a minimal repro that triggers the issue, so I am not 100% sure what the cause is.

I believe it is related to:

  • A proc macro that generates a struct with associated methods.
  • Calling the proc macro from within a fn body.
  • When referencing the associated methods from within the fn body, the unresolved_assoc_item diagnostic is triggered.

I can provide access to the private code to anybody who wishes to investigate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions