mirror of
https://git.proxmox.com/git/rustc
synced 2025-08-15 15:39:20 +00:00
16 lines
330 B
Rust
16 lines
330 B
Rust
extern crate proc_macro;
|
|
use proc_macro::TokenStream;
|
|
|
|
#[proc_macro_derive(Deserialize)]
|
|
pub fn deserialize_derive(input: TokenStream) -> TokenStream {
|
|
"impl Build {
|
|
fn deserialize() -> Option<u64> {
|
|
let x: Option<u32> = Some(0);
|
|
Some(x? + 1)
|
|
}
|
|
}
|
|
"
|
|
.parse()
|
|
.unwrap()
|
|
}
|