Skip to content

Commit 9bc2ced

Browse files
author
Keegan McAllister
committed
---
yaml --- r: 179578 b: refs/heads/master c: 1aedc45 h: refs/heads/master v: v3
1 parent 2586303 commit 9bc2ced

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
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 93b642d9743edea728ef08b2d6fd17229caaad43
2+
refs/heads/master: 1aedc45f85fe9feb70971f9d0c743c4af550a080
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 0ba9e1fa52627404a1e5b90f745f96a872a0c564
55
refs/heads/try: ccf8fedf1cffcb8f6f3581d53d220039e192fe77

trunk/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();

trunk/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)