Deprecated proc_macro doesn't trigger warning on build library

Change-Id: Ib3a396e7334d209fe6c6ef425bbfc7b2ae471378
This commit is contained in:
wangxiangqing 2019-10-22 00:08:14 +08:00
parent 33910f9d86
commit c027be0dd0
2 changed files with 5 additions and 5 deletions

View File

@ -337,6 +337,7 @@ impl<'a> Visitor<'a> for CollectProcMacros<'a> {
// use proc_macro::bridge::client::ProcMacro;
//
// #[rustc_proc_macro_decls]
// #[allow(deprecated)]
// static DECLS: &[ProcMacro] = &[
// ProcMacro::custom_derive($name_trait1, &[], ::$name1);
// ProcMacro::custom_derive($name_trait2, &["attribute_name"], ::$name2);

View File

@ -1,4 +1,6 @@
// build-pass
// check-pass
#![deny(deprecated)]
#![crate_type = "proc-macro"]
@ -8,8 +10,5 @@ use proc_macro::*;
#[proc_macro]
#[deprecated(since = "1.0.0", note = "test")]
pub fn test_compile_without_warning_with_deprecated(_: TokenStream) -> TokenStream {
"
extern crate proc_macro;
fn foo() { }
".parse().unwrap()
TokenStream::new()
}