Skip to content

Can lints provide new annotations? #529

@jdm

Description

@jdm

I'm experimenting with migrating Servo away from deprecated compiler plugins to using dylint. It's almost working, but I haven't figured out how to support a lint that looks for the presence of an annotation on a type (example). The original plugin is here, and I've found the following:

  • #[cfg_attr(dylint_lib = "lint", unrooted_must_root_lint::must_root)] allows the non-dylint build to success
  • the dylint build fails with use of undeclared crate or module "unrooted_must_root_lint"
  • if I add an rlib output to the lint crate and add a dependency on it, I get could not find "unrooted_must_root_lint" in "lint" when I try lint::unrooted_must_root_lint::must_rot

I have pushed my reduced testcase to https://github.com/jdm/dylint-test. Am I missing something, or is this not something that dylint can support?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions