#[plugin(...)]
at the top level should cause an error; #![plugin(...)]
is correct
#24213
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-plugins
Area: compiler plugins, doc.rust-lang.org/nightly/unstable-book/language-features/plugin.html
Right now if you write
#[plugin(...)]
to import some syntax extension, the import simply won't happen and other errors will occur. For example, if you write#[plugin(serde_macros)]
and then later do#[derive(Serialize)]
on a type you will get errors aboutSerialize
not being implemented, as though the derive had done nothing.This is extremely confusing since a user is basically being told "#derive had no effect" when the real problem is a missing exclamation mark in a totally different source file.
This should trigger an error to use
#![plugin(...)]
instead.cc @erickt
The text was updated successfully, but these errors were encountered: