Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check valid punctuation character in Punct::new
Valid punctuation characters generated by: use proc_macro::{Punct, Spacing, TokenStream}; use std::panic; #[proc_macro] pub fn punct_chars(_input: TokenStream) -> TokenStream { for ch in '\0'..=char::MAX { if let Ok(_) = panic::catch_unwind(|| { let _ = Punct::new(ch, Spacing::Alone); }) { eprintln!("{:?}", ch); } } TokenStream::new() }
- Loading branch information