rust/tests/ui/proc-macro/auxiliary/attributes-on-definitions.rs
2023-01-11 09:32:08 +00:00

24 lines
500 B
Rust

// force-host
// no-prefer-dynamic
#![feature(allow_internal_unsafe)]
#![feature(allow_internal_unstable)]
#![crate_type = "proc-macro"]
extern crate proc_macro;
use proc_macro::*;
#[proc_macro]
#[allow_internal_unstable(proc_macro_internals)]
#[allow_internal_unsafe]
#[deprecated(since = "1.0.0", note = "test")]
pub fn with_attrs(_: TokenStream) -> TokenStream {
"
extern crate proc_macro;
use ::proc_macro::bridge;
fn contains_unsafe() { unsafe {} }
".parse().unwrap()
}