]> git.proxmox.com Git - rustc.git/blob - vendor/syn/tests/test_pat.rs
New upstream version 1.41.1+dfsg1
[rustc.git] / vendor / syn / tests / test_pat.rs
1 mod features;
2
3 use quote::quote;
4 use syn::Pat;
5
6 #[test]
7 fn 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]
15 fn test_pat_path() {
16 match syn::parse2(quote!(self::CONST)).unwrap() {
17 Pat::Path(_) => (),
18 value => panic!("expected PatPath, got {:?}", value),
19 }
20 }