mirror of
https://git.proxmox.com/git/rustc
synced 2025-08-15 17:14:50 +00:00
14 lines
307 B
Rust
14 lines
307 B
Rust
extern crate proc_macro;
|
|
|
|
use proc_macro::*;
|
|
|
|
#[proc_macro]
|
|
pub fn neg_one(_input: TokenStream) -> TokenStream {
|
|
TokenTree::Literal(Literal::i32_suffixed(-1)).into()
|
|
}
|
|
|
|
#[proc_macro]
|
|
pub fn neg_one_float(_input: TokenStream) -> TokenStream {
|
|
TokenTree::Literal(Literal::f32_suffixed(-1.0)).into()
|
|
}
|