]> git.proxmox.com Git - rustc.git/blame - src/test/ui/proc-macro/auxiliary/negative-token.rs
New upstream version 1.67.1+dfsg1
[rustc.git] / src / test / ui / proc-macro / auxiliary / negative-token.rs
CommitLineData
a1dfa0c6 1// force-host
0531ce1d
XL
2// no-prefer-dynamic
3
0531ce1d
XL
4#![crate_type = "proc-macro"]
5
6extern crate proc_macro;
7
8use proc_macro::*;
9
10#[proc_macro]
11pub fn neg_one(_input: TokenStream) -> TokenStream {
83c7162d 12 TokenTree::Literal(Literal::i32_suffixed(-1)).into()
0531ce1d
XL
13}
14
15#[proc_macro]
16pub fn neg_one_float(_input: TokenStream) -> TokenStream {
83c7162d 17 TokenTree::Literal(Literal::f32_suffixed(-1.0)).into()
0531ce1d 18}