deprecation message for custom derive

This commit is contained in:
Nick Cameron 2016-10-12 08:38:35 +13:00
parent b7675cf04a
commit 9322332140
2 changed files with 4 additions and 2 deletions

View file

@ -175,7 +175,7 @@ pub fn expand_derive(cx: &mut ExtCtxt,
feature_gate::GateIssue::Language,
feature_gate::EXPLAIN_CUSTOM_DERIVE);
} else {
cx.span_warn(titem.span, EXPLAIN_DEPR_CUSTOM_DERIVE);
cx.span_warn(titem.span, feature_gate::EXPLAIN_DEPR_CUSTOM_DERIVE);
let name = intern_and_get_ident(&format!("derive_{}", tname));
let mitem = cx.meta_word(titem.span, name);
new_attributes.push(cx.attribute(mitem.span, mitem));

View file

@ -8,8 +8,10 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-tidy-linelength
#[derive(Eqr)]
//~^ ERROR `#[derive]` for custom traits is not stable enough for use and is subject to change
//~^ ERROR `#[derive]` for custom traits is not stable enough for use. It is deprecated and will be removed in v1.15 (see issue #29644)
struct Foo;
pub fn main() {}