Skip to content

False positive diagnostic in proc-macro #17630

Closed
@laurmaedje

Description

@laurmaedje

On the Typst codebase, rust-analyzer raises a false positive diagnostic since a while. The concrete error message (typst: explicit parent type required (rust-analyzer macro-error)) is specific to the codebase since it stems from a proc macro, but the important part is that the command line compiler doesn't produce this diagnostic.

I'm not sure when exactly the diagnostic started, but it used to work and if I switch back to a ~2 months old rust-analyzer release, it works again.

rust-analyzer version: 0.3.2037-standalone (e9afba5 2024-07-14)

rustc version: rustc 1.79.0 (129f3b996 2024-06-10)

editor or extension: VSCode, extension version v0.3.2037

repository link: https://github.com/typst/typst

code snippet to reproduce: crates/typst/src/foundations/array.rs

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-nameresname, path and module resolutionC-bugCategory: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions