Skip to content

Commit ec0e051

Browse files
committed
deprecation message for custom derive
1 parent 33e9bb3 commit ec0e051

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/libsyntax_ext/deriving/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ pub fn expand_derive(cx: &mut ExtCtxt,
175175
feature_gate::GateIssue::Language,
176176
feature_gate::EXPLAIN_CUSTOM_DERIVE);
177177
} else {
178-
cx.span_warn(titem.span, EXPLAIN_DEPR_CUSTOM_DERIVE);
178+
cx.span_warn(titem.span, feature_gate::EXPLAIN_DEPR_CUSTOM_DERIVE);
179179
let name = intern_and_get_ident(&format!("derive_{}", tname));
180180
let mitem = cx.meta_word(titem.span, name);
181181
new_attributes.push(cx.attribute(mitem.span, mitem));

src/test/compile-fail/deriving-meta-unknown-trait.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// ignore-tidy-linelength
12+
1113
#[derive(Eqr)]
12-
//~^ ERROR `#[derive]` for custom traits is not stable enough for use and is subject to change
14+
//~^ ERROR `#[derive]` for custom traits is not stable enough for use. It is deprecated and will be removed in v1.15 (see issue #29644)
1315
struct Foo;
1416

1517
pub fn main() {}

0 commit comments

Comments
 (0)