Skip to content

Commit c027be0

Browse files
committed
Deprecated proc_macro doesn't trigger warning on build library
Change-Id: Ib3a396e7334d209fe6c6ef425bbfc7b2ae471378
1 parent 33910f9 commit c027be0

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/libsyntax_ext/proc_macro_harness.rs

+1
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,7 @@ impl<'a> Visitor<'a> for CollectProcMacros<'a> {
337337
// use proc_macro::bridge::client::ProcMacro;
338338
//
339339
// #[rustc_proc_macro_decls]
340+
// #[allow(deprecated)]
340341
// static DECLS: &[ProcMacro] = &[
341342
// ProcMacro::custom_derive($name_trait1, &[], ::$name1);
342343
// ProcMacro::custom_derive($name_trait2, &["attribute_name"], ::$name2);
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
// build-pass
1+
// check-pass
2+
3+
#![deny(deprecated)]
24

35
#![crate_type = "proc-macro"]
46

@@ -8,8 +10,5 @@ use proc_macro::*;
810
#[proc_macro]
911
#[deprecated(since = "1.0.0", note = "test")]
1012
pub fn test_compile_without_warning_with_deprecated(_: TokenStream) -> TokenStream {
11-
"
12-
extern crate proc_macro;
13-
fn foo() { }
14-
".parse().unwrap()
13+
TokenStream::new()
1514
}

0 commit comments

Comments
 (0)