]> git.proxmox.com Git - rustc.git/blame - vendor/syn/tests/test_pat.rs
New upstream version 1.45.0+dfsg1
[rustc.git] / vendor / syn / tests / test_pat.rs
CommitLineData
e74abb32
XL
1mod features;
2
3use quote::quote;
4use syn::Pat;
5
6#[test]
7fn test_pat_ident() {
8 match syn::parse2(quote!(self)).unwrap() {
9 Pat::Ident(_) => (),
10 value => panic!("expected PatIdent, got {:?}", value),
11 }
12}
13
14#[test]
15fn test_pat_path() {
16 match syn::parse2(quote!(self::CONST)).unwrap() {
17 Pat::Path(_) => (),
18 value => panic!("expected PatPath, got {:?}", value),
19 }
20}