-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pluggable lints (and attributes) #12372
Comments
This is kinda-meaningless, since attributes are already arbitrary, and having truly "pluggable attributes" would essentially require being able to modify any part of the compilation process (since attributes can be read anywhere). Unless you just mean adding attribute to the list of known attributes for the 👍 to pluggable lints though. |
Yes, I basically just mean adding an attribute to the list of known attributes for |
This is now done, I think? |
Yes: #14067 |
…eykril Generate variant: insert code in file with enum definition Closes rust-lang#12372
…, r=Veykril Add test for rust-lang#12372 (generate enum variant in different file) The test currently fails but I'm not sure why. The "Right" output seems to contain only the contents of `foo.rs`, without the magic comments: <img width="967" alt="image" src="https://user-images.githubusercontent.com/7998310/170310707-e69b21eb-d4f8-46c1-8a0a-9b4071289e26.png"> cc `@Veykril`
…gression, r=flip1995 Fix `nonminimal_bool` lint regression Fixes rust-lang#12371. Fixes rust-lang#12369. cc `@RalfJung` The problem was an invalid condition. Shame on me... changelog: Fix `nonminimal_bool` lint regression
Just as we now support pluggable macros, I would love to see pluggable lints (with associated pluggable attributes). I'm thinking these lints/attributes could be scoped by the crate name, so something like
when loaded as
would add the attribute
#[foo::myattr]
and the lintfoo::mylint
.The motivating reason here for me is that I believe for my rust-lua project to be safe I need to have a lint to ensure that the functions exposed to Lua do not make any Lua calls when there is a value with a destructor on the stack. To that end I want to annotate my Lua methods with
#[lua::longjmp]
and have a lint that disallows calling any#[lua::longjmp]
method with destructors on the stack.The text was updated successfully, but these errors were encountered: