mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-21 02:23:19 +00:00
42 lines
552 B
Rust
42 lines
552 B
Rust
//@aux-build:macros.rs
|
|
|
|
#![allow(unused)]
|
|
|
|
extern crate macros;
|
|
|
|
use serde::Serialize;
|
|
|
|
fn main() {
|
|
println!("one");
|
|
println!("two");
|
|
cfg!(unix);
|
|
vec![1, 2, 3];
|
|
|
|
#[derive(Serialize)]
|
|
struct Derive;
|
|
|
|
let _ = macros::expr!();
|
|
macros::stmt!();
|
|
let macros::pat!() = 1;
|
|
let _: macros::ty!() = "";
|
|
macros::item!();
|
|
let _ = macros::binop!(1);
|
|
|
|
eprintln!("allowed");
|
|
}
|
|
|
|
macros::attr! {
|
|
struct S;
|
|
}
|
|
|
|
impl S {
|
|
macros::item!();
|
|
}
|
|
|
|
trait Y {
|
|
macros::item!();
|
|
}
|
|
|
|
impl Y for S {
|
|
macros::item!();
|
|
}
|