Lines Matching refs:pat
106 let pat = match &self.pat { in to_path() localVariable
107 Pat::Or(pat) => pat.cases.iter().next().expect("at least one pat"), in to_path()
108 _ => &self.pat, in to_path()
111 let segments = match pat { in to_path()
112 Pat::Ident(pat) if is_just_ident(pat) => vec![pat.ident.clone()], in to_path()
113 Pat::Path(pat) => idents_of_path(&pat.path), in to_path()
114 Pat::Struct(pat) => idents_of_path(&pat.path), in to_path()
115 Pat::TupleStruct(pat) => idents_of_path(&pat.path), in to_path()
116 Pat::Wild(pat) => vec![Ident::from(pat.underscore_token)], in to_path()
134 fn is_just_ident(pat: &PatIdent) -> bool { in is_just_ident()
135 pat.by_ref.is_none() && pat.mutability.is_none() && pat.subpat.is_none() in is_just_ident()