2019-04-09 16:19:11 -05:00
|
|
|
// no-prefer-dynamic
|
|
|
|
|
|
|
|
#![crate_type = "proc-macro"]
|
|
|
|
#![feature(repr128, proc_macro_hygiene, proc_macro_quote)]
|
|
|
|
|
|
|
|
extern crate proc_macro;
|
|
|
|
|
|
|
|
use proc_macro::{quote, TokenStream};
|
|
|
|
|
|
|
|
#[proc_macro_derive(DeriveSomething)]
|
|
|
|
pub fn derive(_: TokenStream) -> TokenStream {
|
2019-04-20 02:33:13 -05:00
|
|
|
// Shound not trigger `used_underscore_binding`
|
|
|
|
let _inside_derive = 1;
|
|
|
|
assert_eq!(_inside_derive, _inside_derive);
|
|
|
|
|
2019-04-09 16:19:11 -05:00
|
|
|
let output = quote! {
|
2019-04-20 02:33:13 -05:00
|
|
|
// Should not trigger `useless_attribute`
|
2019-04-09 16:19:11 -05:00
|
|
|
#[allow(dead_code)]
|
2020-03-30 04:02:14 -05:00
|
|
|
extern crate rustc_middle;
|
2019-04-09 16:19:11 -05:00
|
|
|
};
|
|
|
|
output
|
|
|
|
}
|