mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
Deprecated proc_macro doesn't trigger warning on build library
Change-Id: Ib3a396e7334d209fe6c6ef425bbfc7b2ae471378
This commit is contained in:
parent
33910f9d86
commit
c027be0dd0
@ -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);
|
||||
|
@ -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()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user