Skip to content

Commit e6ca958

Browse files
author
Keegan McAllister
committed
---
yaml --- r: 179772 b: refs/heads/tmp c: 1aedc45 h: refs/heads/master v: v3
1 parent d0e3cfa commit e6ca958

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
3434
refs/heads/beta: 44a287e6eb22ec3c2a687fc156813577464017f7
3535
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928
3636
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
37-
refs/heads/tmp: 93b642d9743edea728ef08b2d6fd17229caaad43
37+
refs/heads/tmp: 1aedc45f85fe9feb70971f9d0c743c4af550a080

branches/tmp/src/librustc/plugin/load.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,9 @@ impl<'a, 'v> Visitor<'v> for PluginLoader<'a> {
139139
}
140140
"plugin" => {
141141
self.sess.span_err(attr.span, "#[plugin] on `extern crate` is deprecated");
142+
self.sess.span_help(attr.span, &format!("use a crate attribute instead, \
143+
i.e. #![plugin({})]",
144+
item.ident.as_str())[]);
142145
}
143146
"macro_use" => {
144147
let names = attr.meta_item_list();

branches/tmp/src/test/compile-fail/plugin-extern-crate-attr-deprecated.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// except according to those terms.
1010

1111
#[plugin] //~ ERROR #[plugin] on `extern crate` is deprecated
12+
//~^ HELP use a crate attribute instead, i.e. #![plugin(std)]
1213
extern crate std;
1314

1415
fn main() {}

0 commit comments

Comments
 (0)