Lines Matching refs:Ident
171 TokenTree::Ident(tt) => tt.inner.unwrap_nightly().into(),
346 proc_macro::TokenTree::Ident(s) => crate::Ident::_new(Ident::Compiler(s)).into(),
652 pub(crate) enum Ident {
653 Compiler(proc_macro::Ident),
654 Fallback(fallback::Ident),
657 impl Ident {
661 Span::Compiler(s) => Ident::Compiler(proc_macro::Ident::new(string, s)),
662 Span::Fallback(s) => Ident::Fallback(fallback::Ident::new_checked(string, s)),
667 Ident::Fallback(fallback::Ident::new_unchecked(string, span))
673 Span::Compiler(s) => Ident::Compiler(proc_macro::Ident::new_raw(string, s)),
674 Span::Fallback(s) => Ident::Fallback(fallback::Ident::new_raw_checked(string, s)),
679 Ident::Fallback(fallback::Ident::new_raw_unchecked(string, span))
684 Ident::Compiler(t) => Span::Compiler(t.span()),
685 Ident::Fallback(t) => Span::Fallback(t.span()),
691 (Ident::Compiler(t), Span::Compiler(s)) => t.set_span(s),
692 (Ident::Fallback(t), Span::Fallback(s)) => t.set_span(s),
693 (Ident::Compiler(_), Span::Fallback(_)) => mismatch(line!()),
694 (Ident::Fallback(_), Span::Compiler(_)) => mismatch(line!()),
698 fn unwrap_nightly(self) -> proc_macro::Ident {
700 Ident::Compiler(s) => s,
701 Ident::Fallback(_) => mismatch(line!()),
706 impl PartialEq for Ident {
707 fn eq(&self, other: &Ident) -> bool {
709 (Ident::Compiler(t), Ident::Compiler(o)) => t.to_string() == o.to_string(),
710 (Ident::Fallback(t), Ident::Fallback(o)) => t == o,
711 (Ident::Compiler(_), Ident::Fallback(_)) => mismatch(line!()),
712 (Ident::Fallback(_), Ident::Compiler(_)) => mismatch(line!()),
717 impl<T> PartialEq<T> for Ident
724 Ident::Compiler(t) => t.to_string() == other,
725 Ident::Fallback(t) => t == other,
730 impl Display for Ident {
733 Ident::Compiler(t) => Display::fmt(t, f),
734 Ident::Fallback(t) => Display::fmt(t, f),
739 impl Debug for Ident {
742 Ident::Compiler(t) => Debug::fmt(t, f),
743 Ident::Fallback(t) => Debug::fmt(t, f),