rust/tests/ui/derives/auxiliary/derive-marker-tricky.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
337 B
Rust
Raw Normal View History

// force-host
// no-prefer-dynamic
#![crate_type = "proc-macro"]
extern crate proc_macro;
use proc_macro::*;
#[proc_macro_derive(NoMarker)]
pub fn f(input: TokenStream) -> TokenStream {
if input.to_string().contains("rustc_copy_clone_marker") {
panic!("found `#[rustc_copy_clone_marker]`");
}
TokenStream::new()
}