mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-24 05:33:27 +00:00
60a1759b5f
This closes #852 as I can't reproduce the original issue anymore.
22 lines
550 B
Rust
22 lines
550 B
Rust
// 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 {
|
|
// Shound not trigger `used_underscore_binding`
|
|
let _inside_derive = 1;
|
|
assert_eq!(_inside_derive, _inside_derive);
|
|
|
|
let output = quote! {
|
|
// Should not trigger `useless_attribute`
|
|
#[allow(dead_code)]
|
|
extern crate clippy_lints;
|
|
};
|
|
output
|
|
}
|