Add a help message for deprecated #[plugin] extern crate
This commit is contained in:
parent
93b642d974
commit
1aedc45f85
|
@ -139,6 +139,9 @@ impl<'a, 'v> Visitor<'v> for PluginLoader<'a> {
|
|||
}
|
||||
"plugin" => {
|
||||
self.sess.span_err(attr.span, "#[plugin] on `extern crate` is deprecated");
|
||||
self.sess.span_help(attr.span, &format!("use a crate attribute instead, \
|
||||
i.e. #![plugin({})]",
|
||||
item.ident.as_str())[]);
|
||||
}
|
||||
"macro_use" => {
|
||||
let names = attr.meta_item_list();
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
#[plugin] //~ ERROR #[plugin] on `extern crate` is deprecated
|
||||
//~^ HELP use a crate attribute instead, i.e. #![plugin(std)]
|
||||
extern crate std;
|
||||
|
||||
fn main() {}
|
||||
|
|
Loading…
Reference in New Issue