rust/tests/ui/proc-macro/auxiliary/api/mod.rs
Emil Gardström 74f5261345
implement Literal::byte_character
without this, the only way to create a `LitKind::Byte` is by
doing `"b'a'".parse::<Literal>()`, this solves that by enabling
`Literal::byte_character(b'a')`
2023-09-23 23:29:47 +02:00

26 lines
472 B
Rust

// force-host
// no-prefer-dynamic
#![crate_type = "proc-macro"]
#![crate_name = "proc_macro_api_tests"]
#![feature(proc_macro_span)]
#![feature(proc_macro_byte_character)]
#![deny(dead_code)] // catch if a test function is never called
extern crate proc_macro;
mod cmp;
mod parse;
use proc_macro::TokenStream;
#[proc_macro]
pub fn run(input: TokenStream) -> TokenStream {
assert!(input.is_empty());
cmp::test();
parse::test();
TokenStream::new()
}