mirror of
https://git.proxmox.com/git/rustc
synced 2025-08-16 14:40:37 +00:00
21 lines
407 B
Rust
21 lines
407 B
Rust
mod features;
|
|
|
|
use quote::quote;
|
|
use syn::Pat;
|
|
|
|
#[test]
|
|
fn test_pat_ident() {
|
|
match syn::parse2(quote!(self)).unwrap() {
|
|
Pat::Ident(_) => (),
|
|
value => panic!("expected PatIdent, got {:?}", value),
|
|
}
|
|
}
|
|
|
|
#[test]
|
|
fn test_pat_path() {
|
|
match syn::parse2(quote!(self::CONST)).unwrap() {
|
|
Pat::Path(_) => (),
|
|
value => panic!("expected PatPath, got {:?}", value),
|
|
}
|
|
}
|