Skip to main content

rustc_ast/
ast.rs

1//! The Rust abstract syntax tree module.
2//!
3//! This module contains common structures forming the language AST.
4//! Two main entities in the module are [`Item`] (which represents an AST element with
5//! additional metadata), and [`ItemKind`] (which represents a concrete type and contains
6//! information specific to the type of the item).
7//!
8//! Other module items worth mentioning:
9//! - [`Ty`] and [`TyKind`]: A parsed Rust type.
10//! - [`Expr`] and [`ExprKind`]: A parsed Rust expression.
11//! - [`Pat`] and [`PatKind`]: A parsed Rust pattern. Patterns are often dual to expressions.
12//! - [`Stmt`] and [`StmtKind`]: An executable action that does not return a value.
13//! - [`FnDecl`], [`FnHeader`] and [`Param`]: Metadata associated with a function declaration.
14//! - [`Generics`], [`GenericParam`], [`WhereClause`]: Metadata associated with generic parameters.
15//! - [`EnumDef`] and [`Variant`]: Enum declaration.
16//! - [`MetaItemLit`] and [`LitKind`]: Literal expressions.
17//! - [`MacroDef`], [`MacStmtStyle`], [`MacCall`]: Macro definition and invocation.
18//! - [`Attribute`]: Metadata associated with item.
19//! - [`UnOp`], [`BinOp`], and [`BinOpKind`]: Unary and binary operators.
20
21use std::borrow::{Borrow, Cow};
22use std::{cmp, fmt};
23
24pub use GenericArgs::*;
25pub use UnsafeSource::*;
26pub use rustc_ast_ir::{FloatTy, IntTy, Movability, Mutability, Pinnedness, UintTy};
27use rustc_data_structures::packed::Pu128;
28use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
29use rustc_data_structures::stack::ensure_sufficient_stack;
30use rustc_data_structures::tagged_ptr::Tag;
31use rustc_macros::{Decodable, Encodable, HashStable_Generic, Walkable};
32pub use rustc_span::AttrId;
33use rustc_span::{
34    ByteSymbol, DUMMY_SP, ErrorGuaranteed, HashStableContext, Ident, Span, Spanned, Symbol, kw,
35    respan, sym,
36};
37use thin_vec::{ThinVec, thin_vec};
38
39use crate::attr::data_structures::CfgEntry;
40pub use crate::format::*;
41use crate::token::{self, CommentKind, Delimiter};
42use crate::tokenstream::{DelimSpan, LazyAttrTokenStream, TokenStream};
43use crate::util::parser::{ExprPrecedence, Fixity};
44use crate::visit::{AssocCtxt, BoundKind, LifetimeCtxt};
45
46/// A "Label" is an identifier of some point in sources,
47/// e.g. in the following code:
48///
49/// ```rust
50/// 'outer: loop {
51///     break 'outer;
52/// }
53/// ```
54///
55/// `'outer` is a label.
56#[derive(#[automatically_derived]
impl ::core::clone::Clone for Label {
    #[inline]
    fn clone(&self) -> Label {
        let _: ::core::clone::AssertParamIsClone<Ident>;
        *self
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for Label {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    Label { ident: ref __binding_0 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for Label {
            fn decode(__decoder: &mut __D) -> Self {
                Label {
                    ident: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::marker::Copy for Label { }Copy, const _: () =
    {
        impl<__CTX> ::rustc_data_structures::stable_hasher::HashStable<__CTX>
            for Label where __CTX: ::rustc_span::HashStableContext {
            #[inline]
            fn hash_stable(&self, __hcx: &mut __CTX,
                __hasher:
                    &mut ::rustc_data_structures::stable_hasher::StableHasher) {
                match *self {
                    Label { ident: ref __binding_0 } => {
                        { __binding_0.hash_stable(__hcx, __hasher); }
                    }
                }
            }
        }
    };HashStable_Generic, #[automatically_derived]
impl ::core::cmp::Eq for Label {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<Ident>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::PartialEq for Label {
    #[inline]
    fn eq(&self, other: &Label) -> bool { self.ident == other.ident }
}PartialEq, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for Label where
            __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    Label { ident: ref __binding_0 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for Label where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    Label { ident: ref mut __binding_0 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
57pub struct Label {
58    pub ident: Ident,
59}
60
61impl fmt::Debug for Label {
62    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
63        f.write_fmt(format_args!("label({0:?})", self.ident))write!(f, "label({:?})", self.ident)
64    }
65}
66
67/// A "Lifetime" is an annotation of the scope in which variable
68/// can be used, e.g. `'a` in `&'a i32`.
69#[derive(#[automatically_derived]
impl ::core::clone::Clone for Lifetime {
    #[inline]
    fn clone(&self) -> Lifetime {
        let _: ::core::clone::AssertParamIsClone<NodeId>;
        let _: ::core::clone::AssertParamIsClone<Ident>;
        *self
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for Lifetime {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    Lifetime { id: ref __binding_0, ident: ref __binding_1 } =>
                        {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for Lifetime {
            fn decode(__decoder: &mut __D) -> Self {
                Lifetime {
                    id: ::rustc_serialize::Decodable::decode(__decoder),
                    ident: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::marker::Copy for Lifetime { }Copy, #[automatically_derived]
impl ::core::cmp::PartialEq for Lifetime {
    #[inline]
    fn eq(&self, other: &Lifetime) -> bool {
        self.id == other.id && self.ident == other.ident
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::Eq for Lifetime {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<NodeId>;
        let _: ::core::cmp::AssertParamIsEq<Ident>;
    }
}Eq, #[automatically_derived]
impl ::core::hash::Hash for Lifetime {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        ::core::hash::Hash::hash(&self.id, state);
        ::core::hash::Hash::hash(&self.ident, state)
    }
}Hash, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for Lifetime
            where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    Lifetime { id: ref __binding_0, ident: ref __binding_1 } =>
                        {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for Lifetime where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    Lifetime {
                        id: ref mut __binding_0, ident: ref mut __binding_1 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
70pub struct Lifetime {
71    pub id: NodeId,
72    pub ident: Ident,
73}
74
75impl fmt::Debug for Lifetime {
76    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
77        f.write_fmt(format_args!("lifetime({0}: {1})", self.id, self))write!(f, "lifetime({}: {})", self.id, self)
78    }
79}
80
81impl fmt::Display for Lifetime {
82    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
83        f.write_fmt(format_args!("{0}", self.ident.name))write!(f, "{}", self.ident.name)
84    }
85}
86
87/// A "Path" is essentially Rust's notion of a name.
88///
89/// It's represented as a sequence of identifiers,
90/// along with a bunch of supporting information.
91///
92/// E.g., `std::cmp::PartialEq`.
93#[derive(#[automatically_derived]
impl ::core::clone::Clone for Path {
    #[inline]
    fn clone(&self) -> Path {
        Path {
            span: ::core::clone::Clone::clone(&self.span),
            segments: ::core::clone::Clone::clone(&self.segments),
            tokens: ::core::clone::Clone::clone(&self.tokens),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for Path {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    Path {
                        span: ref __binding_0,
                        segments: ref __binding_1,
                        tokens: ref __binding_2 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for Path {
            fn decode(__decoder: &mut __D) -> Self {
                Path {
                    span: ::rustc_serialize::Decodable::decode(__decoder),
                    segments: ::rustc_serialize::Decodable::decode(__decoder),
                    tokens: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for Path {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field3_finish(f, "Path", "span",
            &self.span, "segments", &self.segments, "tokens", &&self.tokens)
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for Path where
            __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    Path {
                        span: ref __binding_0,
                        segments: ref __binding_1,
                        tokens: ref __binding_2 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_2,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for Path where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    Path {
                        span: ref mut __binding_0,
                        segments: ref mut __binding_1,
                        tokens: ref mut __binding_2 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_2,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
94pub struct Path {
95    pub span: Span,
96    /// The segments in the path: the things separated by `::`.
97    /// Global paths begin with `kw::PathRoot`.
98    pub segments: ThinVec<PathSegment>,
99    pub tokens: Option<LazyAttrTokenStream>,
100}
101
102// Succeeds if the path has a single segment that is arg-free and matches the given symbol.
103impl PartialEq<Symbol> for Path {
104    #[inline]
105    fn eq(&self, name: &Symbol) -> bool {
106        if let [segment] = self.segments.as_ref()
107            && segment == name
108        {
109            true
110        } else {
111            false
112        }
113    }
114}
115
116// Succeeds if the path has segments that are arg-free and match the given symbols.
117impl PartialEq<&[Symbol]> for Path {
118    #[inline]
119    fn eq(&self, names: &&[Symbol]) -> bool {
120        self.segments.iter().eq(*names)
121    }
122}
123
124impl<Hcx: HashStableContext> HashStable<Hcx> for Path {
125    fn hash_stable(&self, hcx: &mut Hcx, hasher: &mut StableHasher) {
126        self.segments.len().hash_stable(hcx, hasher);
127        for segment in &self.segments {
128            segment.ident.hash_stable(hcx, hasher);
129        }
130    }
131}
132
133impl Path {
134    /// Convert a span and an identifier to the corresponding
135    /// one-segment path.
136    pub fn from_ident(ident: Ident) -> Path {
137        Path { segments: {
    let len = [()].len();
    let mut vec = ::thin_vec::ThinVec::with_capacity(len);
    vec.push(PathSegment::from_ident(ident));
    vec
}thin_vec![PathSegment::from_ident(ident)], span: ident.span, tokens: None }
138    }
139
140    pub fn is_global(&self) -> bool {
141        self.segments.first().is_some_and(|segment| segment.ident.name == kw::PathRoot)
142    }
143
144    /// Check if this path is potentially a trivial const arg, i.e., one that can _potentially_
145    /// be represented without an anon const in the HIR.
146    ///
147    /// Returns true iff the path has exactly one segment, and it has no generic args
148    /// (i.e., it is _potentially_ a const parameter).
149    x;#[tracing::instrument(level = "debug", ret)]
150    pub fn is_potential_trivial_const_arg(&self) -> bool {
151        self.segments.len() == 1 && self.segments.iter().all(|seg| seg.args.is_none())
152    }
153}
154
155/// Joins multiple symbols with "::" into a path, e.g. "a::b::c". If the first
156/// segment is `kw::PathRoot` it will be printed as empty, e.g. "::b::c".
157///
158/// The generics on the `path` argument mean it can accept many forms, such as:
159/// - `&[Symbol]`
160/// - `Vec<Symbol>`
161/// - `Vec<&Symbol>`
162/// - `impl Iterator<Item = Symbol>`
163/// - `impl Iterator<Item = &Symbol>`
164///
165/// Panics if `path` is empty or a segment after the first is `kw::PathRoot`.
166pub fn join_path_syms(path: impl IntoIterator<Item = impl Borrow<Symbol>>) -> String {
167    // This is a guess at the needed capacity that works well in practice. It is slightly faster
168    // than (a) starting with an empty string, or (b) computing the exact capacity required.
169    // `8` works well because it's about the right size and jemalloc's size classes are all
170    // multiples of 8.
171    let mut iter = path.into_iter();
172    let len_hint = iter.size_hint().1.unwrap_or(1);
173    let mut s = String::with_capacity(len_hint * 8);
174
175    let first_sym = *iter.next().unwrap().borrow();
176    if first_sym != kw::PathRoot {
177        s.push_str(first_sym.as_str());
178    }
179    for sym in iter {
180        let sym = *sym.borrow();
181        if true {
    match (&sym, &kw::PathRoot) {
        (left_val, right_val) => {
            if *left_val == *right_val {
                let kind = ::core::panicking::AssertKind::Ne;
                ::core::panicking::assert_failed(kind, &*left_val,
                    &*right_val, ::core::option::Option::None);
            }
        }
    };
};debug_assert_ne!(sym, kw::PathRoot);
182        s.push_str("::");
183        s.push_str(sym.as_str());
184    }
185    s
186}
187
188/// Like `join_path_syms`, but for `Ident`s. This function is necessary because
189/// `Ident::to_string` does more than just print the symbol in the `name` field.
190pub fn join_path_idents(path: impl IntoIterator<Item = impl Borrow<Ident>>) -> String {
191    let mut iter = path.into_iter();
192    let len_hint = iter.size_hint().1.unwrap_or(1);
193    let mut s = String::with_capacity(len_hint * 8);
194
195    let first_ident = *iter.next().unwrap().borrow();
196    if first_ident.name != kw::PathRoot {
197        s.push_str(&first_ident.to_string());
198    }
199    for ident in iter {
200        let ident = *ident.borrow();
201        if true {
    match (&ident.name, &kw::PathRoot) {
        (left_val, right_val) => {
            if *left_val == *right_val {
                let kind = ::core::panicking::AssertKind::Ne;
                ::core::panicking::assert_failed(kind, &*left_val,
                    &*right_val, ::core::option::Option::None);
            }
        }
    };
};debug_assert_ne!(ident.name, kw::PathRoot);
202        s.push_str("::");
203        s.push_str(&ident.to_string());
204    }
205    s
206}
207
208/// A segment of a path: an identifier, an optional lifetime, and a set of types.
209///
210/// E.g., `std`, `String` or `Box<T>`.
211#[derive(#[automatically_derived]
impl ::core::clone::Clone for PathSegment {
    #[inline]
    fn clone(&self) -> PathSegment {
        PathSegment {
            ident: ::core::clone::Clone::clone(&self.ident),
            id: ::core::clone::Clone::clone(&self.id),
            args: ::core::clone::Clone::clone(&self.args),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for PathSegment {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    PathSegment {
                        ident: ref __binding_0,
                        id: ref __binding_1,
                        args: ref __binding_2 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for PathSegment {
            fn decode(__decoder: &mut __D) -> Self {
                PathSegment {
                    ident: ::rustc_serialize::Decodable::decode(__decoder),
                    id: ::rustc_serialize::Decodable::decode(__decoder),
                    args: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for PathSegment {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field3_finish(f, "PathSegment",
            "ident", &self.ident, "id", &self.id, "args", &&self.args)
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for PathSegment
            where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    PathSegment {
                        ident: ref __binding_0,
                        id: ref __binding_1,
                        args: ref __binding_2 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_2,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for PathSegment where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    PathSegment {
                        ident: ref mut __binding_0,
                        id: ref mut __binding_1,
                        args: ref mut __binding_2 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_2,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
212pub struct PathSegment {
213    /// The identifier portion of this path segment.
214    pub ident: Ident,
215
216    pub id: NodeId,
217
218    /// Type/lifetime parameters attached to this path. They come in
219    /// two flavors: `Path<A,B,C>` and `Path(A,B) -> C`.
220    /// `None` means that no parameter list is supplied (`Path`),
221    /// `Some` means that parameter list is supplied (`Path<X, Y>`)
222    /// but it can be empty (`Path<>`).
223    /// `P` is used as a size optimization for the common case with no parameters.
224    pub args: Option<Box<GenericArgs>>,
225}
226
227// Succeeds if the path segment is arg-free and matches the given symbol.
228impl PartialEq<Symbol> for PathSegment {
229    #[inline]
230    fn eq(&self, name: &Symbol) -> bool {
231        self.args.is_none() && self.ident.name == *name
232    }
233}
234
235impl PathSegment {
236    pub fn from_ident(ident: Ident) -> Self {
237        PathSegment { ident, id: DUMMY_NODE_ID, args: None }
238    }
239
240    pub fn path_root(span: Span) -> Self {
241        PathSegment::from_ident(Ident::new(kw::PathRoot, span))
242    }
243
244    pub fn span(&self) -> Span {
245        match &self.args {
246            Some(args) => self.ident.span.to(args.span()),
247            None => self.ident.span,
248        }
249    }
250}
251
252/// The generic arguments and associated item constraints of a path segment.
253///
254/// E.g., `<A, B>` as in `Foo<A, B>` or `(A, B)` as in `Foo(A, B)`.
255#[derive(#[automatically_derived]
impl ::core::clone::Clone for GenericArgs {
    #[inline]
    fn clone(&self) -> GenericArgs {
        match self {
            GenericArgs::AngleBracketed(__self_0) =>
                GenericArgs::AngleBracketed(::core::clone::Clone::clone(__self_0)),
            GenericArgs::Parenthesized(__self_0) =>
                GenericArgs::Parenthesized(::core::clone::Clone::clone(__self_0)),
            GenericArgs::ParenthesizedElided(__self_0) =>
                GenericArgs::ParenthesizedElided(::core::clone::Clone::clone(__self_0)),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for GenericArgs {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        GenericArgs::AngleBracketed(ref __binding_0) => { 0usize }
                        GenericArgs::Parenthesized(ref __binding_0) => { 1usize }
                        GenericArgs::ParenthesizedElided(ref __binding_0) => {
                            2usize
                        }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    GenericArgs::AngleBracketed(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    GenericArgs::Parenthesized(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    GenericArgs::ParenthesizedElided(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for GenericArgs {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => {
                        GenericArgs::AngleBracketed(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    1usize => {
                        GenericArgs::Parenthesized(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    2usize => {
                        GenericArgs::ParenthesizedElided(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `GenericArgs`, expected 0..3, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for GenericArgs {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            GenericArgs::AngleBracketed(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "AngleBracketed", &__self_0),
            GenericArgs::Parenthesized(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "Parenthesized", &__self_0),
            GenericArgs::ParenthesizedElided(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "ParenthesizedElided", &__self_0),
        }
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for GenericArgs
            where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    GenericArgs::AngleBracketed(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    GenericArgs::Parenthesized(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    GenericArgs::ParenthesizedElided(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for GenericArgs where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    GenericArgs::AngleBracketed(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                    GenericArgs::Parenthesized(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                    GenericArgs::ParenthesizedElided(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
256pub enum GenericArgs {
257    /// The `<'a, A, B, C>` in `foo::bar::baz::<'a, A, B, C>`.
258    AngleBracketed(AngleBracketedArgs),
259    /// The `(A, B)` and `C` in `Foo(A, B) -> C`.
260    Parenthesized(ParenthesizedArgs),
261    /// `(..)` in return type notation.
262    ParenthesizedElided(Span),
263}
264
265impl GenericArgs {
266    pub fn is_angle_bracketed(&self) -> bool {
267        #[allow(non_exhaustive_omitted_patterns)] match self {
    AngleBracketed(..) => true,
    _ => false,
}matches!(self, AngleBracketed(..))
268    }
269
270    pub fn span(&self) -> Span {
271        match self {
272            AngleBracketed(data) => data.span,
273            Parenthesized(data) => data.span,
274            ParenthesizedElided(span) => *span,
275        }
276    }
277}
278
279/// Concrete argument in the sequence of generic args.
280#[derive(#[automatically_derived]
impl ::core::clone::Clone for GenericArg {
    #[inline]
    fn clone(&self) -> GenericArg {
        match self {
            GenericArg::Lifetime(__self_0) =>
                GenericArg::Lifetime(::core::clone::Clone::clone(__self_0)),
            GenericArg::Type(__self_0) =>
                GenericArg::Type(::core::clone::Clone::clone(__self_0)),
            GenericArg::Const(__self_0) =>
                GenericArg::Const(::core::clone::Clone::clone(__self_0)),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for GenericArg {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        GenericArg::Lifetime(ref __binding_0) => { 0usize }
                        GenericArg::Type(ref __binding_0) => { 1usize }
                        GenericArg::Const(ref __binding_0) => { 2usize }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    GenericArg::Lifetime(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    GenericArg::Type(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    GenericArg::Const(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for GenericArg {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => {
                        GenericArg::Lifetime(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    1usize => {
                        GenericArg::Type(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    2usize => {
                        GenericArg::Const(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `GenericArg`, expected 0..3, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for GenericArg {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            GenericArg::Lifetime(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "Lifetime", &__self_0),
            GenericArg::Type(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Type",
                    &__self_0),
            GenericArg::Const(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Const",
                    &__self_0),
        }
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for GenericArg
            where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    GenericArg::Lifetime(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, (LifetimeCtxt::GenericArg))) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    GenericArg::Type(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    GenericArg::Const(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for GenericArg where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    GenericArg::Lifetime(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, (LifetimeCtxt::GenericArg))
                        }
                    }
                    GenericArg::Type(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                    GenericArg::Const(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
281pub enum GenericArg {
282    /// `'a` in `Foo<'a>`.
283    Lifetime(#[visitable(extra = LifetimeCtxt::GenericArg)] Lifetime),
284    /// `Bar` in `Foo<Bar>`.
285    Type(Box<Ty>),
286    /// `1` in `Foo<1>`.
287    Const(AnonConst),
288}
289
290impl GenericArg {
291    pub fn span(&self) -> Span {
292        match self {
293            GenericArg::Lifetime(lt) => lt.ident.span,
294            GenericArg::Type(ty) => ty.span,
295            GenericArg::Const(ct) => ct.value.span,
296        }
297    }
298}
299
300/// A path like `Foo<'a, T>`.
301#[derive(#[automatically_derived]
impl ::core::clone::Clone for AngleBracketedArgs {
    #[inline]
    fn clone(&self) -> AngleBracketedArgs {
        AngleBracketedArgs {
            span: ::core::clone::Clone::clone(&self.span),
            args: ::core::clone::Clone::clone(&self.args),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for AngleBracketedArgs {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    AngleBracketedArgs {
                        span: ref __binding_0, args: ref __binding_1 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for AngleBracketedArgs {
            fn decode(__decoder: &mut __D) -> Self {
                AngleBracketedArgs {
                    span: ::rustc_serialize::Decodable::decode(__decoder),
                    args: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for AngleBracketedArgs {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field2_finish(f,
            "AngleBracketedArgs", "span", &self.span, "args", &&self.args)
    }
}Debug, #[automatically_derived]
impl ::core::default::Default for AngleBracketedArgs {
    #[inline]
    fn default() -> AngleBracketedArgs {
        AngleBracketedArgs {
            span: ::core::default::Default::default(),
            args: ::core::default::Default::default(),
        }
    }
}Default, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for
            AngleBracketedArgs where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    AngleBracketedArgs {
                        span: ref __binding_0, args: ref __binding_1 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for AngleBracketedArgs
            where __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    AngleBracketedArgs {
                        span: ref mut __binding_0, args: ref mut __binding_1 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
302pub struct AngleBracketedArgs {
303    /// The overall span.
304    pub span: Span,
305    /// The comma separated parts in the `<...>`.
306    pub args: ThinVec<AngleBracketedArg>,
307}
308
309/// Either an argument for a generic parameter or a constraint on an associated item.
310#[derive(#[automatically_derived]
impl ::core::clone::Clone for AngleBracketedArg {
    #[inline]
    fn clone(&self) -> AngleBracketedArg {
        match self {
            AngleBracketedArg::Arg(__self_0) =>
                AngleBracketedArg::Arg(::core::clone::Clone::clone(__self_0)),
            AngleBracketedArg::Constraint(__self_0) =>
                AngleBracketedArg::Constraint(::core::clone::Clone::clone(__self_0)),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for AngleBracketedArg {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        AngleBracketedArg::Arg(ref __binding_0) => { 0usize }
                        AngleBracketedArg::Constraint(ref __binding_0) => { 1usize }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    AngleBracketedArg::Arg(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    AngleBracketedArg::Constraint(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for AngleBracketedArg {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => {
                        AngleBracketedArg::Arg(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    1usize => {
                        AngleBracketedArg::Constraint(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `AngleBracketedArg`, expected 0..2, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for AngleBracketedArg {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            AngleBracketedArg::Arg(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Arg",
                    &__self_0),
            AngleBracketedArg::Constraint(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "Constraint", &__self_0),
        }
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for
            AngleBracketedArg where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    AngleBracketedArg::Arg(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    AngleBracketedArg::Constraint(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for AngleBracketedArg
            where __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    AngleBracketedArg::Arg(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                    AngleBracketedArg::Constraint(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
311pub enum AngleBracketedArg {
312    /// A generic argument for a generic parameter.
313    Arg(GenericArg),
314    /// A constraint on an associated item.
315    Constraint(AssocItemConstraint),
316}
317
318impl AngleBracketedArg {
319    pub fn span(&self) -> Span {
320        match self {
321            AngleBracketedArg::Arg(arg) => arg.span(),
322            AngleBracketedArg::Constraint(constraint) => constraint.span,
323        }
324    }
325}
326
327impl From<AngleBracketedArgs> for Box<GenericArgs> {
328    fn from(val: AngleBracketedArgs) -> Self {
329        Box::new(GenericArgs::AngleBracketed(val))
330    }
331}
332
333impl From<ParenthesizedArgs> for Box<GenericArgs> {
334    fn from(val: ParenthesizedArgs) -> Self {
335        Box::new(GenericArgs::Parenthesized(val))
336    }
337}
338
339/// A path like `Foo(A, B) -> C`.
340#[derive(#[automatically_derived]
impl ::core::clone::Clone for ParenthesizedArgs {
    #[inline]
    fn clone(&self) -> ParenthesizedArgs {
        ParenthesizedArgs {
            span: ::core::clone::Clone::clone(&self.span),
            inputs: ::core::clone::Clone::clone(&self.inputs),
            inputs_span: ::core::clone::Clone::clone(&self.inputs_span),
            output: ::core::clone::Clone::clone(&self.output),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for ParenthesizedArgs {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    ParenthesizedArgs {
                        span: ref __binding_0,
                        inputs: ref __binding_1,
                        inputs_span: ref __binding_2,
                        output: ref __binding_3 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_3,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for ParenthesizedArgs {
            fn decode(__decoder: &mut __D) -> Self {
                ParenthesizedArgs {
                    span: ::rustc_serialize::Decodable::decode(__decoder),
                    inputs: ::rustc_serialize::Decodable::decode(__decoder),
                    inputs_span: ::rustc_serialize::Decodable::decode(__decoder),
                    output: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for ParenthesizedArgs {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field4_finish(f,
            "ParenthesizedArgs", "span", &self.span, "inputs", &self.inputs,
            "inputs_span", &self.inputs_span, "output", &&self.output)
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for
            ParenthesizedArgs where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    ParenthesizedArgs {
                        span: ref __binding_0,
                        inputs: ref __binding_1,
                        inputs_span: ref __binding_2,
                        output: ref __binding_3 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_2,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_3,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for ParenthesizedArgs
            where __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    ParenthesizedArgs {
                        span: ref mut __binding_0,
                        inputs: ref mut __binding_1,
                        inputs_span: ref mut __binding_2,
                        output: ref mut __binding_3 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_2,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_3,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
341pub struct ParenthesizedArgs {
342    /// ```text
343    /// Foo(A, B) -> C
344    /// ^^^^^^^^^^^^^^
345    /// ```
346    pub span: Span,
347
348    /// `(A, B)`
349    pub inputs: ThinVec<Box<Ty>>,
350
351    /// ```text
352    /// Foo(A, B) -> C
353    ///    ^^^^^^
354    /// ```
355    pub inputs_span: Span,
356
357    /// `C`
358    pub output: FnRetTy,
359}
360
361impl ParenthesizedArgs {
362    pub fn as_angle_bracketed_args(&self) -> AngleBracketedArgs {
363        let args = self
364            .inputs
365            .iter()
366            .cloned()
367            .map(|input| AngleBracketedArg::Arg(GenericArg::Type(input)))
368            .collect();
369        AngleBracketedArgs { span: self.inputs_span, args }
370    }
371}
372
373pub use crate::node_id::{CRATE_NODE_ID, DUMMY_NODE_ID, NodeId};
374
375/// Modifiers on a trait bound like `[const]`, `?` and `!`.
376#[derive(#[automatically_derived]
impl ::core::marker::Copy for TraitBoundModifiers { }Copy, #[automatically_derived]
impl ::core::clone::Clone for TraitBoundModifiers {
    #[inline]
    fn clone(&self) -> TraitBoundModifiers {
        let _: ::core::clone::AssertParamIsClone<BoundConstness>;
        let _: ::core::clone::AssertParamIsClone<BoundAsyncness>;
        let _: ::core::clone::AssertParamIsClone<BoundPolarity>;
        *self
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for TraitBoundModifiers {
    #[inline]
    fn eq(&self, other: &TraitBoundModifiers) -> bool {
        self.constness == other.constness && self.asyncness == other.asyncness
            && self.polarity == other.polarity
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::Eq for TraitBoundModifiers {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<BoundConstness>;
        let _: ::core::cmp::AssertParamIsEq<BoundAsyncness>;
        let _: ::core::cmp::AssertParamIsEq<BoundPolarity>;
    }
}Eq, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for TraitBoundModifiers {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    TraitBoundModifiers {
                        constness: ref __binding_0,
                        asyncness: ref __binding_1,
                        polarity: ref __binding_2 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for TraitBoundModifiers {
            fn decode(__decoder: &mut __D) -> Self {
                TraitBoundModifiers {
                    constness: ::rustc_serialize::Decodable::decode(__decoder),
                    asyncness: ::rustc_serialize::Decodable::decode(__decoder),
                    polarity: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for TraitBoundModifiers {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field3_finish(f,
            "TraitBoundModifiers", "constness", &self.constness, "asyncness",
            &self.asyncness, "polarity", &&self.polarity)
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for
            TraitBoundModifiers where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    TraitBoundModifiers {
                        constness: ref __binding_0,
                        asyncness: ref __binding_1,
                        polarity: ref __binding_2 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_2,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for TraitBoundModifiers
            where __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    TraitBoundModifiers {
                        constness: ref mut __binding_0,
                        asyncness: ref mut __binding_1,
                        polarity: ref mut __binding_2 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_2,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
377pub struct TraitBoundModifiers {
378    pub constness: BoundConstness,
379    pub asyncness: BoundAsyncness,
380    pub polarity: BoundPolarity,
381}
382
383impl TraitBoundModifiers {
384    pub const NONE: Self = Self {
385        constness: BoundConstness::Never,
386        asyncness: BoundAsyncness::Normal,
387        polarity: BoundPolarity::Positive,
388    };
389}
390
391#[derive(#[automatically_derived]
impl ::core::clone::Clone for GenericBound {
    #[inline]
    fn clone(&self) -> GenericBound {
        match self {
            GenericBound::Trait(__self_0) =>
                GenericBound::Trait(::core::clone::Clone::clone(__self_0)),
            GenericBound::Outlives(__self_0) =>
                GenericBound::Outlives(::core::clone::Clone::clone(__self_0)),
            GenericBound::Use(__self_0, __self_1) =>
                GenericBound::Use(::core::clone::Clone::clone(__self_0),
                    ::core::clone::Clone::clone(__self_1)),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for GenericBound {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        GenericBound::Trait(ref __binding_0) => { 0usize }
                        GenericBound::Outlives(ref __binding_0) => { 1usize }
                        GenericBound::Use(ref __binding_0, ref __binding_1) => {
                            2usize
                        }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    GenericBound::Trait(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    GenericBound::Outlives(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    GenericBound::Use(ref __binding_0, ref __binding_1) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for GenericBound {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => {
                        GenericBound::Trait(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    1usize => {
                        GenericBound::Outlives(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    2usize => {
                        GenericBound::Use(::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder))
                    }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `GenericBound`, expected 0..3, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for GenericBound {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            GenericBound::Trait(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Trait",
                    &__self_0),
            GenericBound::Outlives(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "Outlives", &__self_0),
            GenericBound::Use(__self_0, __self_1) =>
                ::core::fmt::Formatter::debug_tuple_field2_finish(f, "Use",
                    __self_0, &__self_1),
        }
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for GenericBound
            where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    GenericBound::Trait(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    GenericBound::Outlives(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, (LifetimeCtxt::Bound))) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    GenericBound::Use(ref __binding_0, ref __binding_1) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for GenericBound where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    GenericBound::Trait(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                    GenericBound::Outlives(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, (LifetimeCtxt::Bound))
                        }
                    }
                    GenericBound::Use(ref mut __binding_0, ref mut __binding_1)
                        => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
392pub enum GenericBound {
393    Trait(PolyTraitRef),
394    Outlives(#[visitable(extra = LifetimeCtxt::Bound)] Lifetime),
395    /// Precise capturing syntax: `impl Sized + use<'a>`
396    Use(ThinVec<PreciseCapturingArg>, Span),
397}
398
399impl GenericBound {
400    pub fn span(&self) -> Span {
401        match self {
402            GenericBound::Trait(t, ..) => t.span,
403            GenericBound::Outlives(l) => l.ident.span,
404            GenericBound::Use(_, span) => *span,
405        }
406    }
407}
408
409pub type GenericBounds = Vec<GenericBound>;
410
411/// Specifies the enforced ordering for generic parameters. In the future,
412/// if we wanted to relax this order, we could override `PartialEq` and
413/// `PartialOrd`, to allow the kinds to be unordered.
414#[derive(#[automatically_derived]
impl ::core::hash::Hash for ParamKindOrd {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        ::core::hash::Hash::hash(&__self_discr, state)
    }
}Hash, #[automatically_derived]
impl ::core::clone::Clone for ParamKindOrd {
    #[inline]
    fn clone(&self) -> ParamKindOrd { *self }
}Clone, #[automatically_derived]
impl ::core::marker::Copy for ParamKindOrd { }Copy, #[automatically_derived]
impl ::core::cmp::PartialEq for ParamKindOrd {
    #[inline]
    fn eq(&self, other: &ParamKindOrd) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::Eq for ParamKindOrd {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::PartialOrd for ParamKindOrd {
    #[inline]
    fn partial_cmp(&self, other: &ParamKindOrd)
        -> ::core::option::Option<::core::cmp::Ordering> {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        ::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Ord for ParamKindOrd {
    #[inline]
    fn cmp(&self, other: &ParamKindOrd) -> ::core::cmp::Ordering {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
    }
}Ord)]
415pub enum ParamKindOrd {
416    Lifetime,
417    TypeOrConst,
418}
419
420impl fmt::Display for ParamKindOrd {
421    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
422        match self {
423            ParamKindOrd::Lifetime => "lifetime".fmt(f),
424            ParamKindOrd::TypeOrConst => "type and const".fmt(f),
425        }
426    }
427}
428
429#[derive(#[automatically_derived]
impl ::core::clone::Clone for GenericParamKind {
    #[inline]
    fn clone(&self) -> GenericParamKind {
        match self {
            GenericParamKind::Lifetime => GenericParamKind::Lifetime,
            GenericParamKind::Type { default: __self_0 } =>
                GenericParamKind::Type {
                    default: ::core::clone::Clone::clone(__self_0),
                },
            GenericParamKind::Const {
                ty: __self_0, span: __self_1, default: __self_2 } =>
                GenericParamKind::Const {
                    ty: ::core::clone::Clone::clone(__self_0),
                    span: ::core::clone::Clone::clone(__self_1),
                    default: ::core::clone::Clone::clone(__self_2),
                },
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for GenericParamKind {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        GenericParamKind::Lifetime => { 0usize }
                        GenericParamKind::Type { default: ref __binding_0 } => {
                            1usize
                        }
                        GenericParamKind::Const {
                            ty: ref __binding_0,
                            span: ref __binding_1,
                            default: ref __binding_2 } => {
                            2usize
                        }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    GenericParamKind::Lifetime => {}
                    GenericParamKind::Type { default: ref __binding_0 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    GenericParamKind::Const {
                        ty: ref __binding_0,
                        span: ref __binding_1,
                        default: ref __binding_2 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for GenericParamKind {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => { GenericParamKind::Lifetime }
                    1usize => {
                        GenericParamKind::Type {
                            default: ::rustc_serialize::Decodable::decode(__decoder),
                        }
                    }
                    2usize => {
                        GenericParamKind::Const {
                            ty: ::rustc_serialize::Decodable::decode(__decoder),
                            span: ::rustc_serialize::Decodable::decode(__decoder),
                            default: ::rustc_serialize::Decodable::decode(__decoder),
                        }
                    }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `GenericParamKind`, expected 0..3, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for GenericParamKind {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            GenericParamKind::Lifetime =>
                ::core::fmt::Formatter::write_str(f, "Lifetime"),
            GenericParamKind::Type { default: __self_0 } =>
                ::core::fmt::Formatter::debug_struct_field1_finish(f, "Type",
                    "default", &__self_0),
            GenericParamKind::Const {
                ty: __self_0, span: __self_1, default: __self_2 } =>
                ::core::fmt::Formatter::debug_struct_field3_finish(f, "Const",
                    "ty", __self_0, "span", __self_1, "default", &__self_2),
        }
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for
            GenericParamKind where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    GenericParamKind::Lifetime => {}
                    GenericParamKind::Type { default: ref __binding_0 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    GenericParamKind::Const {
                        ty: ref __binding_0,
                        span: ref __binding_1,
                        default: ref __binding_2 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_2,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for GenericParamKind
            where __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    GenericParamKind::Lifetime => {}
                    GenericParamKind::Type { default: ref mut __binding_0 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                    GenericParamKind::Const {
                        ty: ref mut __binding_0,
                        span: ref mut __binding_1,
                        default: ref mut __binding_2 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_2,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
430pub enum GenericParamKind {
431    /// A lifetime definition (e.g., `'a: 'b + 'c + 'd`).
432    Lifetime,
433    Type {
434        default: Option<Box<Ty>>,
435    },
436    Const {
437        ty: Box<Ty>,
438        /// Span of the whole parameter definition, including default.
439        span: Span,
440        /// Optional default value for the const generic param.
441        default: Option<AnonConst>,
442    },
443}
444
445#[derive(#[automatically_derived]
impl ::core::clone::Clone for GenericParam {
    #[inline]
    fn clone(&self) -> GenericParam {
        GenericParam {
            id: ::core::clone::Clone::clone(&self.id),
            ident: ::core::clone::Clone::clone(&self.ident),
            attrs: ::core::clone::Clone::clone(&self.attrs),
            bounds: ::core::clone::Clone::clone(&self.bounds),
            is_placeholder: ::core::clone::Clone::clone(&self.is_placeholder),
            kind: ::core::clone::Clone::clone(&self.kind),
            colon_span: ::core::clone::Clone::clone(&self.colon_span),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for GenericParam {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    GenericParam {
                        id: ref __binding_0,
                        ident: ref __binding_1,
                        attrs: ref __binding_2,
                        bounds: ref __binding_3,
                        is_placeholder: ref __binding_4,
                        kind: ref __binding_5,
                        colon_span: ref __binding_6 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_3,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_4,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_5,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_6,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for GenericParam {
            fn decode(__decoder: &mut __D) -> Self {
                GenericParam {
                    id: ::rustc_serialize::Decodable::decode(__decoder),
                    ident: ::rustc_serialize::Decodable::decode(__decoder),
                    attrs: ::rustc_serialize::Decodable::decode(__decoder),
                    bounds: ::rustc_serialize::Decodable::decode(__decoder),
                    is_placeholder: ::rustc_serialize::Decodable::decode(__decoder),
                    kind: ::rustc_serialize::Decodable::decode(__decoder),
                    colon_span: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for GenericParam {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["id", "ident", "attrs", "bounds", "is_placeholder", "kind",
                        "colon_span"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.id, &self.ident, &self.attrs, &self.bounds,
                        &self.is_placeholder, &self.kind, &&self.colon_span];
        ::core::fmt::Formatter::debug_struct_fields_finish(f, "GenericParam",
            names, values)
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for GenericParam
            where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    GenericParam {
                        id: ref __binding_0,
                        ident: ref __binding_1,
                        attrs: ref __binding_2,
                        bounds: ref __binding_3,
                        is_placeholder: ref __binding_4,
                        kind: ref __binding_5,
                        colon_span: ref __binding_6 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_2,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_3,
                                        __visitor, (BoundKind::Bound))) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_4,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_5,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_6,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for GenericParam where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    GenericParam {
                        id: ref mut __binding_0,
                        ident: ref mut __binding_1,
                        attrs: ref mut __binding_2,
                        bounds: ref mut __binding_3,
                        is_placeholder: ref mut __binding_4,
                        kind: ref mut __binding_5,
                        colon_span: ref mut __binding_6 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_2,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_3,
                                __visitor, (BoundKind::Bound))
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_4,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_5,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_6,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
446pub struct GenericParam {
447    pub id: NodeId,
448    pub ident: Ident,
449    pub attrs: AttrVec,
450    #[visitable(extra = BoundKind::Bound)]
451    pub bounds: GenericBounds,
452    pub is_placeholder: bool,
453    pub kind: GenericParamKind,
454    pub colon_span: Option<Span>,
455}
456
457impl GenericParam {
458    pub fn span(&self) -> Span {
459        match &self.kind {
460            GenericParamKind::Lifetime | GenericParamKind::Type { default: None } => {
461                self.ident.span
462            }
463            GenericParamKind::Type { default: Some(ty) } => self.ident.span.to(ty.span),
464            GenericParamKind::Const { span, .. } => *span,
465        }
466    }
467}
468
469/// Represents lifetime, type and const parameters attached to a declaration of
470/// a function, enum, trait, etc.
471#[derive(#[automatically_derived]
impl ::core::clone::Clone for Generics {
    #[inline]
    fn clone(&self) -> Generics {
        Generics {
            params: ::core::clone::Clone::clone(&self.params),
            where_clause: ::core::clone::Clone::clone(&self.where_clause),
            span: ::core::clone::Clone::clone(&self.span),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for Generics {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    Generics {
                        params: ref __binding_0,
                        where_clause: ref __binding_1,
                        span: ref __binding_2 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for Generics {
            fn decode(__decoder: &mut __D) -> Self {
                Generics {
                    params: ::rustc_serialize::Decodable::decode(__decoder),
                    where_clause: ::rustc_serialize::Decodable::decode(__decoder),
                    span: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for Generics {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field3_finish(f, "Generics",
            "params", &self.params, "where_clause", &self.where_clause,
            "span", &&self.span)
    }
}Debug, #[automatically_derived]
impl ::core::default::Default for Generics {
    #[inline]
    fn default() -> Generics {
        Generics {
            params: ::core::default::Default::default(),
            where_clause: ::core::default::Default::default(),
            span: ::core::default::Default::default(),
        }
    }
}Default, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for Generics
            where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    Generics {
                        params: ref __binding_0,
                        where_clause: ref __binding_1,
                        span: ref __binding_2 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_2,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for Generics where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    Generics {
                        params: ref mut __binding_0,
                        where_clause: ref mut __binding_1,
                        span: ref mut __binding_2 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_2,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
472pub struct Generics {
473    pub params: ThinVec<GenericParam>,
474    pub where_clause: WhereClause,
475    pub span: Span,
476}
477
478/// A where-clause in a definition.
479#[derive(#[automatically_derived]
impl ::core::clone::Clone for WhereClause {
    #[inline]
    fn clone(&self) -> WhereClause {
        WhereClause {
            has_where_token: ::core::clone::Clone::clone(&self.has_where_token),
            predicates: ::core::clone::Clone::clone(&self.predicates),
            span: ::core::clone::Clone::clone(&self.span),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for WhereClause {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    WhereClause {
                        has_where_token: ref __binding_0,
                        predicates: ref __binding_1,
                        span: ref __binding_2 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for WhereClause {
            fn decode(__decoder: &mut __D) -> Self {
                WhereClause {
                    has_where_token: ::rustc_serialize::Decodable::decode(__decoder),
                    predicates: ::rustc_serialize::Decodable::decode(__decoder),
                    span: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for WhereClause {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field3_finish(f, "WhereClause",
            "has_where_token", &self.has_where_token, "predicates",
            &self.predicates, "span", &&self.span)
    }
}Debug, #[automatically_derived]
impl ::core::default::Default for WhereClause {
    #[inline]
    fn default() -> WhereClause {
        WhereClause {
            has_where_token: ::core::default::Default::default(),
            predicates: ::core::default::Default::default(),
            span: ::core::default::Default::default(),
        }
    }
}Default, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for WhereClause
            where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    WhereClause {
                        has_where_token: ref __binding_0,
                        predicates: ref __binding_1,
                        span: ref __binding_2 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_2,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for WhereClause where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    WhereClause {
                        has_where_token: ref mut __binding_0,
                        predicates: ref mut __binding_1,
                        span: ref mut __binding_2 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_2,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
480pub struct WhereClause {
481    /// `true` if we ate a `where` token.
482    ///
483    /// This can happen if we parsed no predicates, e.g., `struct Foo where {}`.
484    /// This allows us to pretty-print accurately and provide correct suggestion diagnostics.
485    pub has_where_token: bool,
486    pub predicates: ThinVec<WherePredicate>,
487    pub span: Span,
488}
489
490impl WhereClause {
491    pub fn is_empty(&self) -> bool {
492        !self.has_where_token && self.predicates.is_empty()
493    }
494}
495
496/// A single predicate in a where-clause.
497#[derive(#[automatically_derived]
impl ::core::clone::Clone for WherePredicate {
    #[inline]
    fn clone(&self) -> WherePredicate {
        WherePredicate {
            attrs: ::core::clone::Clone::clone(&self.attrs),
            kind: ::core::clone::Clone::clone(&self.kind),
            id: ::core::clone::Clone::clone(&self.id),
            span: ::core::clone::Clone::clone(&self.span),
            is_placeholder: ::core::clone::Clone::clone(&self.is_placeholder),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for WherePredicate {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    WherePredicate {
                        attrs: ref __binding_0,
                        kind: ref __binding_1,
                        id: ref __binding_2,
                        span: ref __binding_3,
                        is_placeholder: ref __binding_4 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_3,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_4,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for WherePredicate {
            fn decode(__decoder: &mut __D) -> Self {
                WherePredicate {
                    attrs: ::rustc_serialize::Decodable::decode(__decoder),
                    kind: ::rustc_serialize::Decodable::decode(__decoder),
                    id: ::rustc_serialize::Decodable::decode(__decoder),
                    span: ::rustc_serialize::Decodable::decode(__decoder),
                    is_placeholder: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for WherePredicate {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field5_finish(f,
            "WherePredicate", "attrs", &self.attrs, "kind", &self.kind, "id",
            &self.id, "span", &self.span, "is_placeholder",
            &&self.is_placeholder)
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for
            WherePredicate where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    WherePredicate {
                        attrs: ref __binding_0,
                        kind: ref __binding_1,
                        id: ref __binding_2,
                        span: ref __binding_3,
                        is_placeholder: ref __binding_4 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_2,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_3,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_4,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for WherePredicate where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    WherePredicate {
                        attrs: ref mut __binding_0,
                        kind: ref mut __binding_1,
                        id: ref mut __binding_2,
                        span: ref mut __binding_3,
                        is_placeholder: ref mut __binding_4 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_2,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_3,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_4,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
498pub struct WherePredicate {
499    pub attrs: AttrVec,
500    pub kind: WherePredicateKind,
501    pub id: NodeId,
502    pub span: Span,
503    pub is_placeholder: bool,
504}
505
506/// Predicate kind in where-clause.
507#[derive(#[automatically_derived]
impl ::core::clone::Clone for WherePredicateKind {
    #[inline]
    fn clone(&self) -> WherePredicateKind {
        match self {
            WherePredicateKind::BoundPredicate(__self_0) =>
                WherePredicateKind::BoundPredicate(::core::clone::Clone::clone(__self_0)),
            WherePredicateKind::RegionPredicate(__self_0) =>
                WherePredicateKind::RegionPredicate(::core::clone::Clone::clone(__self_0)),
            WherePredicateKind::EqPredicate(__self_0) =>
                WherePredicateKind::EqPredicate(::core::clone::Clone::clone(__self_0)),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for WherePredicateKind {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        WherePredicateKind::BoundPredicate(ref __binding_0) => {
                            0usize
                        }
                        WherePredicateKind::RegionPredicate(ref __binding_0) => {
                            1usize
                        }
                        WherePredicateKind::EqPredicate(ref __binding_0) => {
                            2usize
                        }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    WherePredicateKind::BoundPredicate(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    WherePredicateKind::RegionPredicate(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    WherePredicateKind::EqPredicate(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for WherePredicateKind {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => {
                        WherePredicateKind::BoundPredicate(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    1usize => {
                        WherePredicateKind::RegionPredicate(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    2usize => {
                        WherePredicateKind::EqPredicate(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `WherePredicateKind`, expected 0..3, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for WherePredicateKind {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            WherePredicateKind::BoundPredicate(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "BoundPredicate", &__self_0),
            WherePredicateKind::RegionPredicate(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "RegionPredicate", &__self_0),
            WherePredicateKind::EqPredicate(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "EqPredicate", &__self_0),
        }
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for
            WherePredicateKind where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    WherePredicateKind::BoundPredicate(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    WherePredicateKind::RegionPredicate(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    WherePredicateKind::EqPredicate(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for WherePredicateKind
            where __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    WherePredicateKind::BoundPredicate(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                    WherePredicateKind::RegionPredicate(ref mut __binding_0) =>
                        {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                    WherePredicateKind::EqPredicate(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
508pub enum WherePredicateKind {
509    /// A type bound (e.g., `for<'c> Foo: Send + Clone + 'c`).
510    BoundPredicate(WhereBoundPredicate),
511    /// A lifetime predicate (e.g., `'a: 'b + 'c`).
512    RegionPredicate(WhereRegionPredicate),
513    /// An equality predicate (unsupported).
514    EqPredicate(WhereEqPredicate),
515}
516
517/// A type bound.
518///
519/// E.g., `for<'c> Foo: Send + Clone + 'c`.
520#[derive(#[automatically_derived]
impl ::core::clone::Clone for WhereBoundPredicate {
    #[inline]
    fn clone(&self) -> WhereBoundPredicate {
        WhereBoundPredicate {
            bound_generic_params: ::core::clone::Clone::clone(&self.bound_generic_params),
            bounded_ty: ::core::clone::Clone::clone(&self.bounded_ty),
            bounds: ::core::clone::Clone::clone(&self.bounds),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for WhereBoundPredicate {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    WhereBoundPredicate {
                        bound_generic_params: ref __binding_0,
                        bounded_ty: ref __binding_1,
                        bounds: ref __binding_2 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for WhereBoundPredicate {
            fn decode(__decoder: &mut __D) -> Self {
                WhereBoundPredicate {
                    bound_generic_params: ::rustc_serialize::Decodable::decode(__decoder),
                    bounded_ty: ::rustc_serialize::Decodable::decode(__decoder),
                    bounds: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for WhereBoundPredicate {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field3_finish(f,
            "WhereBoundPredicate", "bound_generic_params",
            &self.bound_generic_params, "bounded_ty", &self.bounded_ty,
            "bounds", &&self.bounds)
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for
            WhereBoundPredicate where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    WhereBoundPredicate {
                        bound_generic_params: ref __binding_0,
                        bounded_ty: ref __binding_1,
                        bounds: ref __binding_2 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_2,
                                        __visitor, (BoundKind::Bound))) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for WhereBoundPredicate
            where __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    WhereBoundPredicate {
                        bound_generic_params: ref mut __binding_0,
                        bounded_ty: ref mut __binding_1,
                        bounds: ref mut __binding_2 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_2,
                                __visitor, (BoundKind::Bound))
                        }
                    }
                }
            }
        }
    };Walkable)]
521pub struct WhereBoundPredicate {
522    /// Any generics from a `for` binding.
523    pub bound_generic_params: ThinVec<GenericParam>,
524    /// The type being bounded.
525    pub bounded_ty: Box<Ty>,
526    /// Trait and lifetime bounds (`Clone + Send + 'static`).
527    #[visitable(extra = BoundKind::Bound)]
528    pub bounds: GenericBounds,
529}
530
531/// A lifetime predicate.
532///
533/// E.g., `'a: 'b + 'c`.
534#[derive(#[automatically_derived]
impl ::core::clone::Clone for WhereRegionPredicate {
    #[inline]
    fn clone(&self) -> WhereRegionPredicate {
        WhereRegionPredicate {
            lifetime: ::core::clone::Clone::clone(&self.lifetime),
            bounds: ::core::clone::Clone::clone(&self.bounds),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for WhereRegionPredicate {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    WhereRegionPredicate {
                        lifetime: ref __binding_0, bounds: ref __binding_1 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for WhereRegionPredicate {
            fn decode(__decoder: &mut __D) -> Self {
                WhereRegionPredicate {
                    lifetime: ::rustc_serialize::Decodable::decode(__decoder),
                    bounds: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for WhereRegionPredicate {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field2_finish(f,
            "WhereRegionPredicate", "lifetime", &self.lifetime, "bounds",
            &&self.bounds)
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for
            WhereRegionPredicate where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    WhereRegionPredicate {
                        lifetime: ref __binding_0, bounds: ref __binding_1 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, (LifetimeCtxt::Bound))) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, (BoundKind::Bound))) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for WhereRegionPredicate
            where __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    WhereRegionPredicate {
                        lifetime: ref mut __binding_0, bounds: ref mut __binding_1 }
                        => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, (LifetimeCtxt::Bound))
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, (BoundKind::Bound))
                        }
                    }
                }
            }
        }
    };Walkable)]
535pub struct WhereRegionPredicate {
536    #[visitable(extra = LifetimeCtxt::Bound)]
537    pub lifetime: Lifetime,
538    #[visitable(extra = BoundKind::Bound)]
539    pub bounds: GenericBounds,
540}
541
542/// An equality predicate (unsupported).
543///
544/// E.g., `T = int`.
545#[derive(#[automatically_derived]
impl ::core::clone::Clone for WhereEqPredicate {
    #[inline]
    fn clone(&self) -> WhereEqPredicate {
        WhereEqPredicate {
            lhs_ty: ::core::clone::Clone::clone(&self.lhs_ty),
            rhs_ty: ::core::clone::Clone::clone(&self.rhs_ty),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for WhereEqPredicate {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    WhereEqPredicate {
                        lhs_ty: ref __binding_0, rhs_ty: ref __binding_1 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for WhereEqPredicate {
            fn decode(__decoder: &mut __D) -> Self {
                WhereEqPredicate {
                    lhs_ty: ::rustc_serialize::Decodable::decode(__decoder),
                    rhs_ty: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for WhereEqPredicate {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field2_finish(f,
            "WhereEqPredicate", "lhs_ty", &self.lhs_ty, "rhs_ty",
            &&self.rhs_ty)
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for
            WhereEqPredicate where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    WhereEqPredicate {
                        lhs_ty: ref __binding_0, rhs_ty: ref __binding_1 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for WhereEqPredicate
            where __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    WhereEqPredicate {
                        lhs_ty: ref mut __binding_0, rhs_ty: ref mut __binding_1 }
                        => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
546pub struct WhereEqPredicate {
547    pub lhs_ty: Box<Ty>,
548    pub rhs_ty: Box<Ty>,
549}
550
551#[derive(#[automatically_derived]
impl ::core::clone::Clone for Crate {
    #[inline]
    fn clone(&self) -> Crate {
        Crate {
            id: ::core::clone::Clone::clone(&self.id),
            attrs: ::core::clone::Clone::clone(&self.attrs),
            items: ::core::clone::Clone::clone(&self.items),
            spans: ::core::clone::Clone::clone(&self.spans),
            is_placeholder: ::core::clone::Clone::clone(&self.is_placeholder),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for Crate {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    Crate {
                        id: ref __binding_0,
                        attrs: ref __binding_1,
                        items: ref __binding_2,
                        spans: ref __binding_3,
                        is_placeholder: ref __binding_4 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_3,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_4,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for Crate {
            fn decode(__decoder: &mut __D) -> Self {
                Crate {
                    id: ::rustc_serialize::Decodable::decode(__decoder),
                    attrs: ::rustc_serialize::Decodable::decode(__decoder),
                    items: ::rustc_serialize::Decodable::decode(__decoder),
                    spans: ::rustc_serialize::Decodable::decode(__decoder),
                    is_placeholder: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for Crate {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field5_finish(f, "Crate", "id",
            &self.id, "attrs", &self.attrs, "items", &self.items, "spans",
            &self.spans, "is_placeholder", &&self.is_placeholder)
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for Crate where
            __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    Crate {
                        id: ref __binding_0,
                        attrs: ref __binding_1,
                        items: ref __binding_2,
                        spans: ref __binding_3,
                        is_placeholder: ref __binding_4 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_2,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_3,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_4,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for Crate where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    Crate {
                        id: ref mut __binding_0,
                        attrs: ref mut __binding_1,
                        items: ref mut __binding_2,
                        spans: ref mut __binding_3,
                        is_placeholder: ref mut __binding_4 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_2,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_3,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_4,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
552pub struct Crate {
553    /// Must be equal to `CRATE_NODE_ID` after the crate root is expanded, but may hold
554    /// expansion placeholders or an unassigned value (`DUMMY_NODE_ID`) before that.
555    pub id: NodeId,
556    pub attrs: AttrVec,
557    pub items: ThinVec<Box<Item>>,
558    pub spans: ModSpans,
559    pub is_placeholder: bool,
560}
561
562/// A semantic representation of a meta item. A meta item is a slightly
563/// restricted form of an attribute -- it can only contain expressions in
564/// certain leaf positions, rather than arbitrary token streams -- that is used
565/// for most built-in attributes.
566///
567/// E.g., `#[test]`, `#[derive(..)]`, `#[rustfmt::skip]` or `#[feature = "foo"]`.
568#[derive(#[automatically_derived]
impl ::core::clone::Clone for MetaItem {
    #[inline]
    fn clone(&self) -> MetaItem {
        MetaItem {
            unsafety: ::core::clone::Clone::clone(&self.unsafety),
            path: ::core::clone::Clone::clone(&self.path),
            kind: ::core::clone::Clone::clone(&self.kind),
            span: ::core::clone::Clone::clone(&self.span),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for MetaItem {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    MetaItem {
                        unsafety: ref __binding_0,
                        path: ref __binding_1,
                        kind: ref __binding_2,
                        span: ref __binding_3 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_3,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for MetaItem {
            fn decode(__decoder: &mut __D) -> Self {
                MetaItem {
                    unsafety: ::rustc_serialize::Decodable::decode(__decoder),
                    path: ::rustc_serialize::Decodable::decode(__decoder),
                    kind: ::rustc_serialize::Decodable::decode(__decoder),
                    span: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for MetaItem {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field4_finish(f, "MetaItem",
            "unsafety", &self.unsafety, "path", &self.path, "kind",
            &self.kind, "span", &&self.span)
    }
}Debug, const _: () =
    {
        impl<__CTX> ::rustc_data_structures::stable_hasher::HashStable<__CTX>
            for MetaItem where __CTX: ::rustc_span::HashStableContext {
            #[inline]
            fn hash_stable(&self, __hcx: &mut __CTX,
                __hasher:
                    &mut ::rustc_data_structures::stable_hasher::StableHasher) {
                match *self {
                    MetaItem {
                        unsafety: ref __binding_0,
                        path: ref __binding_1,
                        kind: ref __binding_2,
                        span: ref __binding_3 } => {
                        { __binding_0.hash_stable(__hcx, __hasher); }
                        { __binding_1.hash_stable(__hcx, __hasher); }
                        { __binding_2.hash_stable(__hcx, __hasher); }
                        { __binding_3.hash_stable(__hcx, __hasher); }
                    }
                }
            }
        }
    };HashStable_Generic)]
569pub struct MetaItem {
570    pub unsafety: Safety,
571    pub path: Path,
572    pub kind: MetaItemKind,
573    pub span: Span,
574}
575
576/// The meta item kind, containing the data after the initial path.
577#[derive(#[automatically_derived]
impl ::core::clone::Clone for MetaItemKind {
    #[inline]
    fn clone(&self) -> MetaItemKind {
        match self {
            MetaItemKind::Word => MetaItemKind::Word,
            MetaItemKind::List(__self_0) =>
                MetaItemKind::List(::core::clone::Clone::clone(__self_0)),
            MetaItemKind::NameValue(__self_0) =>
                MetaItemKind::NameValue(::core::clone::Clone::clone(__self_0)),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for MetaItemKind {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        MetaItemKind::Word => { 0usize }
                        MetaItemKind::List(ref __binding_0) => { 1usize }
                        MetaItemKind::NameValue(ref __binding_0) => { 2usize }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    MetaItemKind::Word => {}
                    MetaItemKind::List(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    MetaItemKind::NameValue(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for MetaItemKind {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => { MetaItemKind::Word }
                    1usize => {
                        MetaItemKind::List(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    2usize => {
                        MetaItemKind::NameValue(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `MetaItemKind`, expected 0..3, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for MetaItemKind {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            MetaItemKind::Word =>
                ::core::fmt::Formatter::write_str(f, "Word"),
            MetaItemKind::List(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "List",
                    &__self_0),
            MetaItemKind::NameValue(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "NameValue", &__self_0),
        }
    }
}Debug, const _: () =
    {
        impl<__CTX> ::rustc_data_structures::stable_hasher::HashStable<__CTX>
            for MetaItemKind where __CTX: ::rustc_span::HashStableContext {
            #[inline]
            fn hash_stable(&self, __hcx: &mut __CTX,
                __hasher:
                    &mut ::rustc_data_structures::stable_hasher::StableHasher) {
                ::std::mem::discriminant(self).hash_stable(__hcx, __hasher);
                match *self {
                    MetaItemKind::Word => {}
                    MetaItemKind::List(ref __binding_0) => {
                        { __binding_0.hash_stable(__hcx, __hasher); }
                    }
                    MetaItemKind::NameValue(ref __binding_0) => {
                        { __binding_0.hash_stable(__hcx, __hasher); }
                    }
                }
            }
        }
    };HashStable_Generic)]
578pub enum MetaItemKind {
579    /// Word meta item.
580    ///
581    /// E.g., `#[test]`, which lacks any arguments after `test`.
582    Word,
583
584    /// List meta item.
585    ///
586    /// E.g., `#[derive(..)]`, where the field represents the `..`.
587    List(ThinVec<MetaItemInner>),
588
589    /// Name value meta item.
590    ///
591    /// E.g., `#[feature = "foo"]`, where the field represents the `"foo"`.
592    NameValue(MetaItemLit),
593}
594
595/// Values inside meta item lists.
596///
597/// E.g., each of `Clone`, `Copy` in `#[derive(Clone, Copy)]`.
598#[derive(#[automatically_derived]
impl ::core::clone::Clone for MetaItemInner {
    #[inline]
    fn clone(&self) -> MetaItemInner {
        match self {
            MetaItemInner::MetaItem(__self_0) =>
                MetaItemInner::MetaItem(::core::clone::Clone::clone(__self_0)),
            MetaItemInner::Lit(__self_0) =>
                MetaItemInner::Lit(::core::clone::Clone::clone(__self_0)),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for MetaItemInner {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        MetaItemInner::MetaItem(ref __binding_0) => { 0usize }
                        MetaItemInner::Lit(ref __binding_0) => { 1usize }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    MetaItemInner::MetaItem(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    MetaItemInner::Lit(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for MetaItemInner {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => {
                        MetaItemInner::MetaItem(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    1usize => {
                        MetaItemInner::Lit(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `MetaItemInner`, expected 0..2, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for MetaItemInner {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            MetaItemInner::MetaItem(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "MetaItem", &__self_0),
            MetaItemInner::Lit(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Lit",
                    &__self_0),
        }
    }
}Debug, const _: () =
    {
        impl<__CTX> ::rustc_data_structures::stable_hasher::HashStable<__CTX>
            for MetaItemInner where __CTX: ::rustc_span::HashStableContext {
            #[inline]
            fn hash_stable(&self, __hcx: &mut __CTX,
                __hasher:
                    &mut ::rustc_data_structures::stable_hasher::StableHasher) {
                ::std::mem::discriminant(self).hash_stable(__hcx, __hasher);
                match *self {
                    MetaItemInner::MetaItem(ref __binding_0) => {
                        { __binding_0.hash_stable(__hcx, __hasher); }
                    }
                    MetaItemInner::Lit(ref __binding_0) => {
                        { __binding_0.hash_stable(__hcx, __hasher); }
                    }
                }
            }
        }
    };HashStable_Generic)]
599pub enum MetaItemInner {
600    /// A full MetaItem, for recursive meta items.
601    MetaItem(MetaItem),
602
603    /// A literal.
604    ///
605    /// E.g., `"foo"`, `64`, `true`.
606    Lit(MetaItemLit),
607}
608
609/// A block (`{ .. }`).
610///
611/// E.g., `{ .. }` as in `fn foo() { .. }`.
612#[derive(#[automatically_derived]
impl ::core::clone::Clone for Block {
    #[inline]
    fn clone(&self) -> Block {
        Block {
            stmts: ::core::clone::Clone::clone(&self.stmts),
            id: ::core::clone::Clone::clone(&self.id),
            rules: ::core::clone::Clone::clone(&self.rules),
            span: ::core::clone::Clone::clone(&self.span),
            tokens: ::core::clone::Clone::clone(&self.tokens),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for Block {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    Block {
                        stmts: ref __binding_0,
                        id: ref __binding_1,
                        rules: ref __binding_2,
                        span: ref __binding_3,
                        tokens: ref __binding_4 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_3,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_4,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for Block {
            fn decode(__decoder: &mut __D) -> Self {
                Block {
                    stmts: ::rustc_serialize::Decodable::decode(__decoder),
                    id: ::rustc_serialize::Decodable::decode(__decoder),
                    rules: ::rustc_serialize::Decodable::decode(__decoder),
                    span: ::rustc_serialize::Decodable::decode(__decoder),
                    tokens: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for Block {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field5_finish(f, "Block",
            "stmts", &self.stmts, "id", &self.id, "rules", &self.rules,
            "span", &self.span, "tokens", &&self.tokens)
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for Block where
            __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    Block {
                        stmts: ref __binding_0,
                        id: ref __binding_1,
                        rules: ref __binding_2,
                        span: ref __binding_3,
                        tokens: ref __binding_4 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_2,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_3,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_4,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for Block where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    Block {
                        stmts: ref mut __binding_0,
                        id: ref mut __binding_1,
                        rules: ref mut __binding_2,
                        span: ref mut __binding_3,
                        tokens: ref mut __binding_4 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_2,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_3,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_4,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
613pub struct Block {
614    /// The statements in the block.
615    pub stmts: ThinVec<Stmt>,
616    pub id: NodeId,
617    /// Distinguishes between `unsafe { ... }` and `{ ... }`.
618    pub rules: BlockCheckMode,
619    pub span: Span,
620    pub tokens: Option<LazyAttrTokenStream>,
621}
622
623/// A match pattern.
624///
625/// Patterns appear in match statements and some other contexts, such as `let` and `if let`.
626#[derive(#[automatically_derived]
impl ::core::clone::Clone for Pat {
    #[inline]
    fn clone(&self) -> Pat {
        Pat {
            id: ::core::clone::Clone::clone(&self.id),
            kind: ::core::clone::Clone::clone(&self.kind),
            span: ::core::clone::Clone::clone(&self.span),
            tokens: ::core::clone::Clone::clone(&self.tokens),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for Pat {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    Pat {
                        id: ref __binding_0,
                        kind: ref __binding_1,
                        span: ref __binding_2,
                        tokens: ref __binding_3 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_3,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for Pat {
            fn decode(__decoder: &mut __D) -> Self {
                Pat {
                    id: ::rustc_serialize::Decodable::decode(__decoder),
                    kind: ::rustc_serialize::Decodable::decode(__decoder),
                    span: ::rustc_serialize::Decodable::decode(__decoder),
                    tokens: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for Pat {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field4_finish(f, "Pat", "id",
            &self.id, "kind", &self.kind, "span", &self.span, "tokens",
            &&self.tokens)
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for Pat where
            __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    Pat {
                        id: ref __binding_0,
                        kind: ref __binding_1,
                        span: ref __binding_2,
                        tokens: ref __binding_3 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_2,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_3,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for Pat where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    Pat {
                        id: ref mut __binding_0,
                        kind: ref mut __binding_1,
                        span: ref mut __binding_2,
                        tokens: ref mut __binding_3 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_2,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_3,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
627pub struct Pat {
628    pub id: NodeId,
629    pub kind: PatKind,
630    pub span: Span,
631    pub tokens: Option<LazyAttrTokenStream>,
632}
633
634impl Pat {
635    /// Attempt reparsing the pattern as a type.
636    /// This is intended for use by diagnostics.
637    pub fn to_ty(&self) -> Option<Box<Ty>> {
638        let kind = match &self.kind {
639            PatKind::Missing => ::core::panicking::panic("internal error: entered unreachable code")unreachable!(),
640            // In a type expression `_` is an inference variable.
641            PatKind::Wild => TyKind::Infer,
642            // An IDENT pattern with no binding mode would be valid as path to a type. E.g. `u32`.
643            PatKind::Ident(BindingMode::NONE, ident, None) => {
644                TyKind::Path(None, Path::from_ident(*ident))
645            }
646            PatKind::Path(qself, path) => TyKind::Path(qself.clone(), path.clone()),
647            PatKind::MacCall(mac) => TyKind::MacCall(mac.clone()),
648            // `&mut? P` can be reinterpreted as `&mut? T` where `T` is `P` reparsed as a type.
649            PatKind::Ref(pat, pinned, mutbl) => pat.to_ty().map(|ty| match pinned {
650                Pinnedness::Not => TyKind::Ref(None, MutTy { ty, mutbl: *mutbl }),
651                Pinnedness::Pinned => TyKind::PinnedRef(None, MutTy { ty, mutbl: *mutbl }),
652            })?,
653            // A slice/array pattern `[P]` can be reparsed as `[T]`, an unsized array,
654            // when `P` can be reparsed as a type `T`.
655            PatKind::Slice(pats) if let [pat] = pats.as_slice() => {
656                pat.to_ty().map(TyKind::Slice)?
657            }
658            // A tuple pattern `(P0, .., Pn)` can be reparsed as `(T0, .., Tn)`
659            // assuming `T0` to `Tn` are all syntactically valid as types.
660            PatKind::Tuple(pats) => {
661                let tys = pats.iter().map(|pat| pat.to_ty()).collect::<Option<ThinVec<_>>>()?;
662                TyKind::Tup(tys)
663            }
664            _ => return None,
665        };
666
667        Some(Box::new(Ty { kind, id: self.id, span: self.span, tokens: None }))
668    }
669
670    /// Walk top-down and call `it` in each place where a pattern occurs
671    /// starting with the root pattern `walk` is called on. If `it` returns
672    /// false then we will descend no further but siblings will be processed.
673    pub fn walk<'ast>(&'ast self, it: &mut impl FnMut(&'ast Pat) -> bool) {
674        if !it(self) {
675            return;
676        }
677
678        match &self.kind {
679            // Walk into the pattern associated with `Ident` (if any).
680            PatKind::Ident(_, _, Some(p)) => p.walk(it),
681
682            // Walk into each field of struct.
683            PatKind::Struct(_, _, fields, _) => fields.iter().for_each(|field| field.pat.walk(it)),
684
685            // Sequence of patterns.
686            PatKind::TupleStruct(_, _, s)
687            | PatKind::Tuple(s)
688            | PatKind::Slice(s)
689            | PatKind::Or(s) => s.iter().for_each(|p| p.walk(it)),
690
691            // Trivial wrappers over inner patterns.
692            PatKind::Box(s)
693            | PatKind::Deref(s)
694            | PatKind::Ref(s, _, _)
695            | PatKind::Paren(s)
696            | PatKind::Guard(s, _) => s.walk(it),
697
698            // These patterns do not contain subpatterns, skip.
699            PatKind::Missing
700            | PatKind::Wild
701            | PatKind::Rest
702            | PatKind::Never
703            | PatKind::Expr(_)
704            | PatKind::Range(..)
705            | PatKind::Ident(..)
706            | PatKind::Path(..)
707            | PatKind::MacCall(_)
708            | PatKind::Err(_) => {}
709        }
710    }
711
712    /// Strip off all reference patterns (`&`, `&mut`) and return the inner pattern.
713    pub fn peel_refs(&self) -> &Pat {
714        let mut current = self;
715        while let PatKind::Ref(inner, _, _) = &current.kind {
716            current = inner;
717        }
718        current
719    }
720
721    /// Is this a `..` pattern?
722    pub fn is_rest(&self) -> bool {
723        #[allow(non_exhaustive_omitted_patterns)] match self.kind {
    PatKind::Rest => true,
    _ => false,
}matches!(self.kind, PatKind::Rest)
724    }
725
726    /// Whether this could be a never pattern, taking into account that a macro invocation can
727    /// return a never pattern. Used to inform errors during parsing.
728    pub fn could_be_never_pattern(&self) -> bool {
729        let mut could_be_never_pattern = false;
730        self.walk(&mut |pat| match &pat.kind {
731            PatKind::Never | PatKind::MacCall(_) => {
732                could_be_never_pattern = true;
733                false
734            }
735            PatKind::Or(s) => {
736                could_be_never_pattern = s.iter().all(|p| p.could_be_never_pattern());
737                false
738            }
739            _ => true,
740        });
741        could_be_never_pattern
742    }
743
744    /// Whether this contains a `!` pattern. This in particular means that a feature gate error will
745    /// be raised if the feature is off. Used to avoid gating the feature twice.
746    pub fn contains_never_pattern(&self) -> bool {
747        let mut contains_never_pattern = false;
748        self.walk(&mut |pat| {
749            if #[allow(non_exhaustive_omitted_patterns)] match pat.kind {
    PatKind::Never => true,
    _ => false,
}matches!(pat.kind, PatKind::Never) {
750                contains_never_pattern = true;
751            }
752            true
753        });
754        contains_never_pattern
755    }
756
757    /// Return a name suitable for diagnostics.
758    pub fn descr(&self) -> Option<String> {
759        match &self.kind {
760            PatKind::Missing => ::core::panicking::panic("internal error: entered unreachable code")unreachable!(),
761            PatKind::Wild => Some("_".to_string()),
762            PatKind::Ident(BindingMode::NONE, ident, None) => Some(::alloc::__export::must_use({
        ::alloc::fmt::format(format_args!("{0}", ident))
    })format!("{ident}")),
763            PatKind::Ref(pat, pinned, mutbl) => {
764                pat.descr().map(|d| ::alloc::__export::must_use({
        ::alloc::fmt::format(format_args!("&{0}{1}",
                pinned.prefix_str(*mutbl), d))
    })format!("&{}{d}", pinned.prefix_str(*mutbl)))
765            }
766            _ => None,
767        }
768    }
769}
770
771impl From<Box<Pat>> for Pat {
772    fn from(value: Box<Pat>) -> Self {
773        *value
774    }
775}
776
777/// A single field in a struct pattern.
778///
779/// Patterns like the fields of `Foo { x, ref y, ref mut z }`
780/// are treated the same as `x: x, y: ref y, z: ref mut z`,
781/// except when `is_shorthand` is true.
782#[derive(#[automatically_derived]
impl ::core::clone::Clone for PatField {
    #[inline]
    fn clone(&self) -> PatField {
        PatField {
            ident: ::core::clone::Clone::clone(&self.ident),
            pat: ::core::clone::Clone::clone(&self.pat),
            is_shorthand: ::core::clone::Clone::clone(&self.is_shorthand),
            attrs: ::core::clone::Clone::clone(&self.attrs),
            id: ::core::clone::Clone::clone(&self.id),
            span: ::core::clone::Clone::clone(&self.span),
            is_placeholder: ::core::clone::Clone::clone(&self.is_placeholder),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for PatField {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    PatField {
                        ident: ref __binding_0,
                        pat: ref __binding_1,
                        is_shorthand: ref __binding_2,
                        attrs: ref __binding_3,
                        id: ref __binding_4,
                        span: ref __binding_5,
                        is_placeholder: ref __binding_6 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_3,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_4,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_5,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_6,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for PatField {
            fn decode(__decoder: &mut __D) -> Self {
                PatField {
                    ident: ::rustc_serialize::Decodable::decode(__decoder),
                    pat: ::rustc_serialize::Decodable::decode(__decoder),
                    is_shorthand: ::rustc_serialize::Decodable::decode(__decoder),
                    attrs: ::rustc_serialize::Decodable::decode(__decoder),
                    id: ::rustc_serialize::Decodable::decode(__decoder),
                    span: ::rustc_serialize::Decodable::decode(__decoder),
                    is_placeholder: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for PatField {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["ident", "pat", "is_shorthand", "attrs", "id", "span",
                        "is_placeholder"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.ident, &self.pat, &self.is_shorthand, &self.attrs,
                        &self.id, &self.span, &&self.is_placeholder];
        ::core::fmt::Formatter::debug_struct_fields_finish(f, "PatField",
            names, values)
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for PatField
            where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    PatField {
                        ident: ref __binding_0,
                        pat: ref __binding_1,
                        is_shorthand: ref __binding_2,
                        attrs: ref __binding_3,
                        id: ref __binding_4,
                        span: ref __binding_5,
                        is_placeholder: ref __binding_6 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_2,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_3,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_4,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_5,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_6,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for PatField where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    PatField {
                        ident: ref mut __binding_0,
                        pat: ref mut __binding_1,
                        is_shorthand: ref mut __binding_2,
                        attrs: ref mut __binding_3,
                        id: ref mut __binding_4,
                        span: ref mut __binding_5,
                        is_placeholder: ref mut __binding_6 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_2,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_3,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_4,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_5,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_6,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
783pub struct PatField {
784    /// The identifier for the field.
785    pub ident: Ident,
786    /// The pattern the field is destructured to.
787    pub pat: Box<Pat>,
788    pub is_shorthand: bool,
789    pub attrs: AttrVec,
790    pub id: NodeId,
791    pub span: Span,
792    pub is_placeholder: bool,
793}
794
795#[derive(#[automatically_derived]
impl ::core::clone::Clone for ByRef {
    #[inline]
    fn clone(&self) -> ByRef {
        let _: ::core::clone::AssertParamIsClone<Pinnedness>;
        let _: ::core::clone::AssertParamIsClone<Mutability>;
        *self
    }
}Clone, #[automatically_derived]
impl ::core::marker::Copy for ByRef { }Copy, #[automatically_derived]
impl ::core::fmt::Debug for ByRef {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            ByRef::Yes(__self_0, __self_1) =>
                ::core::fmt::Formatter::debug_tuple_field2_finish(f, "Yes",
                    __self_0, &__self_1),
            ByRef::No => ::core::fmt::Formatter::write_str(f, "No"),
        }
    }
}Debug, #[automatically_derived]
impl ::core::cmp::Eq for ByRef {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<Pinnedness>;
        let _: ::core::cmp::AssertParamIsEq<Mutability>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::PartialEq for ByRef {
    #[inline]
    fn eq(&self, other: &ByRef) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr &&
            match (self, other) {
                (ByRef::Yes(__self_0, __self_1),
                    ByRef::Yes(__arg1_0, __arg1_1)) =>
                    __self_0 == __arg1_0 && __self_1 == __arg1_1,
                _ => true,
            }
    }
}PartialEq)]
796#[derive(const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for ByRef {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        ByRef::Yes(ref __binding_0, ref __binding_1) => { 0usize }
                        ByRef::No => { 1usize }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    ByRef::Yes(ref __binding_0, ref __binding_1) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                    }
                    ByRef::No => {}
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for ByRef {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => {
                        ByRef::Yes(::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder))
                    }
                    1usize => { ByRef::No }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `ByRef`, expected 0..2, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, const _: () =
    {
        impl<__CTX> ::rustc_data_structures::stable_hasher::HashStable<__CTX>
            for ByRef where __CTX: ::rustc_span::HashStableContext {
            #[inline]
            fn hash_stable(&self, __hcx: &mut __CTX,
                __hasher:
                    &mut ::rustc_data_structures::stable_hasher::StableHasher) {
                ::std::mem::discriminant(self).hash_stable(__hcx, __hasher);
                match *self {
                    ByRef::Yes(ref __binding_0, ref __binding_1) => {
                        { __binding_0.hash_stable(__hcx, __hasher); }
                        { __binding_1.hash_stable(__hcx, __hasher); }
                    }
                    ByRef::No => {}
                }
            }
        }
    };HashStable_Generic, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for ByRef where
            __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    ByRef::Yes(ref __binding_0, ref __binding_1) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    ByRef::No => {}
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for ByRef where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    ByRef::Yes(ref mut __binding_0, ref mut __binding_1) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                    }
                    ByRef::No => {}
                }
            }
        }
    };Walkable)]
797pub enum ByRef {
798    Yes(Pinnedness, Mutability),
799    No,
800}
801
802impl ByRef {
803    #[must_use]
804    pub fn cap_ref_mutability(mut self, mutbl: Mutability) -> Self {
805        if let ByRef::Yes(_, old_mutbl) = &mut self {
806            *old_mutbl = cmp::min(*old_mutbl, mutbl);
807        }
808        self
809    }
810}
811
812/// The mode of a binding (`mut`, `ref mut`, etc).
813/// Used for both the explicit binding annotations given in the HIR for a binding
814/// and the final binding mode that we infer after type inference/match ergonomics.
815/// `.0` is the by-reference mode (`ref`, `ref mut`, or by value),
816/// `.1` is the mutability of the binding.
817#[derive(#[automatically_derived]
impl ::core::clone::Clone for BindingMode {
    #[inline]
    fn clone(&self) -> BindingMode {
        let _: ::core::clone::AssertParamIsClone<ByRef>;
        let _: ::core::clone::AssertParamIsClone<Mutability>;
        *self
    }
}Clone, #[automatically_derived]
impl ::core::marker::Copy for BindingMode { }Copy, #[automatically_derived]
impl ::core::fmt::Debug for BindingMode {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_tuple_field2_finish(f, "BindingMode",
            &self.0, &&self.1)
    }
}Debug, #[automatically_derived]
impl ::core::cmp::Eq for BindingMode {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<ByRef>;
        let _: ::core::cmp::AssertParamIsEq<Mutability>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::PartialEq for BindingMode {
    #[inline]
    fn eq(&self, other: &BindingMode) -> bool {
        self.0 == other.0 && self.1 == other.1
    }
}PartialEq)]
818#[derive(const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for BindingMode {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    BindingMode(ref __binding_0, ref __binding_1) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for BindingMode {
            fn decode(__decoder: &mut __D) -> Self {
                BindingMode(::rustc_serialize::Decodable::decode(__decoder),
                    ::rustc_serialize::Decodable::decode(__decoder))
            }
        }
    };Decodable, const _: () =
    {
        impl<__CTX> ::rustc_data_structures::stable_hasher::HashStable<__CTX>
            for BindingMode where __CTX: ::rustc_span::HashStableContext {
            #[inline]
            fn hash_stable(&self, __hcx: &mut __CTX,
                __hasher:
                    &mut ::rustc_data_structures::stable_hasher::StableHasher) {
                match *self {
                    BindingMode(ref __binding_0, ref __binding_1) => {
                        { __binding_0.hash_stable(__hcx, __hasher); }
                        { __binding_1.hash_stable(__hcx, __hasher); }
                    }
                }
            }
        }
    };HashStable_Generic, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for BindingMode
            where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    BindingMode(ref __binding_0, ref __binding_1) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for BindingMode where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    BindingMode(ref mut __binding_0, ref mut __binding_1) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
819pub struct BindingMode(pub ByRef, pub Mutability);
820
821impl BindingMode {
822    pub const NONE: Self = Self(ByRef::No, Mutability::Not);
823    pub const REF: Self = Self(ByRef::Yes(Pinnedness::Not, Mutability::Not), Mutability::Not);
824    pub const REF_PIN: Self =
825        Self(ByRef::Yes(Pinnedness::Pinned, Mutability::Not), Mutability::Not);
826    pub const MUT: Self = Self(ByRef::No, Mutability::Mut);
827    pub const REF_MUT: Self = Self(ByRef::Yes(Pinnedness::Not, Mutability::Mut), Mutability::Not);
828    pub const REF_PIN_MUT: Self =
829        Self(ByRef::Yes(Pinnedness::Pinned, Mutability::Mut), Mutability::Not);
830    pub const MUT_REF: Self = Self(ByRef::Yes(Pinnedness::Not, Mutability::Not), Mutability::Mut);
831    pub const MUT_REF_PIN: Self =
832        Self(ByRef::Yes(Pinnedness::Pinned, Mutability::Not), Mutability::Mut);
833    pub const MUT_REF_MUT: Self =
834        Self(ByRef::Yes(Pinnedness::Not, Mutability::Mut), Mutability::Mut);
835    pub const MUT_REF_PIN_MUT: Self =
836        Self(ByRef::Yes(Pinnedness::Pinned, Mutability::Mut), Mutability::Mut);
837
838    pub fn prefix_str(self) -> &'static str {
839        match self {
840            Self::NONE => "",
841            Self::REF => "ref ",
842            Self::REF_PIN => "ref pin const ",
843            Self::MUT => "mut ",
844            Self::REF_MUT => "ref mut ",
845            Self::REF_PIN_MUT => "ref pin mut ",
846            Self::MUT_REF => "mut ref ",
847            Self::MUT_REF_PIN => "mut ref pin ",
848            Self::MUT_REF_MUT => "mut ref mut ",
849            Self::MUT_REF_PIN_MUT => "mut ref pin mut ",
850        }
851    }
852}
853
854#[derive(#[automatically_derived]
impl ::core::clone::Clone for RangeEnd {
    #[inline]
    fn clone(&self) -> RangeEnd {
        let _: ::core::clone::AssertParamIsClone<RangeSyntax>;
        *self
    }
}Clone, #[automatically_derived]
impl ::core::marker::Copy for RangeEnd { }Copy, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for RangeEnd {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        RangeEnd::Included(ref __binding_0) => { 0usize }
                        RangeEnd::Excluded => { 1usize }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    RangeEnd::Included(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    RangeEnd::Excluded => {}
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for RangeEnd {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => {
                        RangeEnd::Included(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    1usize => { RangeEnd::Excluded }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `RangeEnd`, expected 0..2, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for RangeEnd {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            RangeEnd::Included(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "Included", &__self_0),
            RangeEnd::Excluded =>
                ::core::fmt::Formatter::write_str(f, "Excluded"),
        }
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for RangeEnd
            where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    RangeEnd::Included(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    RangeEnd::Excluded => {}
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for RangeEnd where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    RangeEnd::Included(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                    RangeEnd::Excluded => {}
                }
            }
        }
    };Walkable)]
855pub enum RangeEnd {
856    /// `..=` or `...`
857    Included(RangeSyntax),
858    /// `..`
859    Excluded,
860}
861
862#[derive(#[automatically_derived]
impl ::core::clone::Clone for RangeSyntax {
    #[inline]
    fn clone(&self) -> RangeSyntax { *self }
}Clone, #[automatically_derived]
impl ::core::marker::Copy for RangeSyntax { }Copy, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for RangeSyntax {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        RangeSyntax::DotDotDot => { 0usize }
                        RangeSyntax::DotDotEq => { 1usize }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    RangeSyntax::DotDotDot => {}
                    RangeSyntax::DotDotEq => {}
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for RangeSyntax {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => { RangeSyntax::DotDotDot }
                    1usize => { RangeSyntax::DotDotEq }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `RangeSyntax`, expected 0..2, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for RangeSyntax {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::write_str(f,
            match self {
                RangeSyntax::DotDotDot => "DotDotDot",
                RangeSyntax::DotDotEq => "DotDotEq",
            })
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for RangeSyntax
            where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    RangeSyntax::DotDotDot => {}
                    RangeSyntax::DotDotEq => {}
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for RangeSyntax where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    RangeSyntax::DotDotDot => {}
                    RangeSyntax::DotDotEq => {}
                }
            }
        }
    };Walkable)]
863pub enum RangeSyntax {
864    /// `...`
865    DotDotDot,
866    /// `..=`
867    DotDotEq,
868}
869
870/// All the different flavors of pattern that Rust recognizes.
871//
872// Adding a new variant? Please update `test_pat` in `tests/ui/macros/stringify.rs`.
873#[derive(#[automatically_derived]
impl ::core::clone::Clone for PatKind {
    #[inline]
    fn clone(&self) -> PatKind {
        match self {
            PatKind::Missing => PatKind::Missing,
            PatKind::Wild => PatKind::Wild,
            PatKind::Ident(__self_0, __self_1, __self_2) =>
                PatKind::Ident(::core::clone::Clone::clone(__self_0),
                    ::core::clone::Clone::clone(__self_1),
                    ::core::clone::Clone::clone(__self_2)),
            PatKind::Struct(__self_0, __self_1, __self_2, __self_3) =>
                PatKind::Struct(::core::clone::Clone::clone(__self_0),
                    ::core::clone::Clone::clone(__self_1),
                    ::core::clone::Clone::clone(__self_2),
                    ::core::clone::Clone::clone(__self_3)),
            PatKind::TupleStruct(__self_0, __self_1, __self_2) =>
                PatKind::TupleStruct(::core::clone::Clone::clone(__self_0),
                    ::core::clone::Clone::clone(__self_1),
                    ::core::clone::Clone::clone(__self_2)),
            PatKind::Or(__self_0) =>
                PatKind::Or(::core::clone::Clone::clone(__self_0)),
            PatKind::Path(__self_0, __self_1) =>
                PatKind::Path(::core::clone::Clone::clone(__self_0),
                    ::core::clone::Clone::clone(__self_1)),
            PatKind::Tuple(__self_0) =>
                PatKind::Tuple(::core::clone::Clone::clone(__self_0)),
            PatKind::Box(__self_0) =>
                PatKind::Box(::core::clone::Clone::clone(__self_0)),
            PatKind::Deref(__self_0) =>
                PatKind::Deref(::core::clone::Clone::clone(__self_0)),
            PatKind::Ref(__self_0, __self_1, __self_2) =>
                PatKind::Ref(::core::clone::Clone::clone(__self_0),
                    ::core::clone::Clone::clone(__self_1),
                    ::core::clone::Clone::clone(__self_2)),
            PatKind::Expr(__self_0) =>
                PatKind::Expr(::core::clone::Clone::clone(__self_0)),
            PatKind::Range(__self_0, __self_1, __self_2) =>
                PatKind::Range(::core::clone::Clone::clone(__self_0),
                    ::core::clone::Clone::clone(__self_1),
                    ::core::clone::Clone::clone(__self_2)),
            PatKind::Slice(__self_0) =>
                PatKind::Slice(::core::clone::Clone::clone(__self_0)),
            PatKind::Rest => PatKind::Rest,
            PatKind::Never => PatKind::Never,
            PatKind::Guard(__self_0, __self_1) =>
                PatKind::Guard(::core::clone::Clone::clone(__self_0),
                    ::core::clone::Clone::clone(__self_1)),
            PatKind::Paren(__self_0) =>
                PatKind::Paren(::core::clone::Clone::clone(__self_0)),
            PatKind::MacCall(__self_0) =>
                PatKind::MacCall(::core::clone::Clone::clone(__self_0)),
            PatKind::Err(__self_0) =>
                PatKind::Err(::core::clone::Clone::clone(__self_0)),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for PatKind {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        PatKind::Missing => { 0usize }
                        PatKind::Wild => { 1usize }
                        PatKind::Ident(ref __binding_0, ref __binding_1,
                            ref __binding_2) => {
                            2usize
                        }
                        PatKind::Struct(ref __binding_0, ref __binding_1,
                            ref __binding_2, ref __binding_3) => {
                            3usize
                        }
                        PatKind::TupleStruct(ref __binding_0, ref __binding_1,
                            ref __binding_2) => {
                            4usize
                        }
                        PatKind::Or(ref __binding_0) => { 5usize }
                        PatKind::Path(ref __binding_0, ref __binding_1) => {
                            6usize
                        }
                        PatKind::Tuple(ref __binding_0) => { 7usize }
                        PatKind::Box(ref __binding_0) => { 8usize }
                        PatKind::Deref(ref __binding_0) => { 9usize }
                        PatKind::Ref(ref __binding_0, ref __binding_1,
                            ref __binding_2) => {
                            10usize
                        }
                        PatKind::Expr(ref __binding_0) => { 11usize }
                        PatKind::Range(ref __binding_0, ref __binding_1,
                            ref __binding_2) => {
                            12usize
                        }
                        PatKind::Slice(ref __binding_0) => { 13usize }
                        PatKind::Rest => { 14usize }
                        PatKind::Never => { 15usize }
                        PatKind::Guard(ref __binding_0, ref __binding_1) => {
                            16usize
                        }
                        PatKind::Paren(ref __binding_0) => { 17usize }
                        PatKind::MacCall(ref __binding_0) => { 18usize }
                        PatKind::Err(ref __binding_0) => { 19usize }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    PatKind::Missing => {}
                    PatKind::Wild => {}
                    PatKind::Ident(ref __binding_0, ref __binding_1,
                        ref __binding_2) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                    }
                    PatKind::Struct(ref __binding_0, ref __binding_1,
                        ref __binding_2, ref __binding_3) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_3,
                            __encoder);
                    }
                    PatKind::TupleStruct(ref __binding_0, ref __binding_1,
                        ref __binding_2) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                    }
                    PatKind::Or(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    PatKind::Path(ref __binding_0, ref __binding_1) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                    }
                    PatKind::Tuple(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    PatKind::Box(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    PatKind::Deref(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    PatKind::Ref(ref __binding_0, ref __binding_1,
                        ref __binding_2) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                    }
                    PatKind::Expr(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    PatKind::Range(ref __binding_0, ref __binding_1,
                        ref __binding_2) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                    }
                    PatKind::Slice(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    PatKind::Rest => {}
                    PatKind::Never => {}
                    PatKind::Guard(ref __binding_0, ref __binding_1) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                    }
                    PatKind::Paren(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    PatKind::MacCall(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    PatKind::Err(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for PatKind {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => { PatKind::Missing }
                    1usize => { PatKind::Wild }
                    2usize => {
                        PatKind::Ident(::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder))
                    }
                    3usize => {
                        PatKind::Struct(::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder))
                    }
                    4usize => {
                        PatKind::TupleStruct(::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder))
                    }
                    5usize => {
                        PatKind::Or(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    6usize => {
                        PatKind::Path(::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder))
                    }
                    7usize => {
                        PatKind::Tuple(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    8usize => {
                        PatKind::Box(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    9usize => {
                        PatKind::Deref(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    10usize => {
                        PatKind::Ref(::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder))
                    }
                    11usize => {
                        PatKind::Expr(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    12usize => {
                        PatKind::Range(::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder))
                    }
                    13usize => {
                        PatKind::Slice(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    14usize => { PatKind::Rest }
                    15usize => { PatKind::Never }
                    16usize => {
                        PatKind::Guard(::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder))
                    }
                    17usize => {
                        PatKind::Paren(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    18usize => {
                        PatKind::MacCall(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    19usize => {
                        PatKind::Err(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `PatKind`, expected 0..20, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for PatKind {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            PatKind::Missing =>
                ::core::fmt::Formatter::write_str(f, "Missing"),
            PatKind::Wild => ::core::fmt::Formatter::write_str(f, "Wild"),
            PatKind::Ident(__self_0, __self_1, __self_2) =>
                ::core::fmt::Formatter::debug_tuple_field3_finish(f, "Ident",
                    __self_0, __self_1, &__self_2),
            PatKind::Struct(__self_0, __self_1, __self_2, __self_3) =>
                ::core::fmt::Formatter::debug_tuple_field4_finish(f, "Struct",
                    __self_0, __self_1, __self_2, &__self_3),
            PatKind::TupleStruct(__self_0, __self_1, __self_2) =>
                ::core::fmt::Formatter::debug_tuple_field3_finish(f,
                    "TupleStruct", __self_0, __self_1, &__self_2),
            PatKind::Or(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Or",
                    &__self_0),
            PatKind::Path(__self_0, __self_1) =>
                ::core::fmt::Formatter::debug_tuple_field2_finish(f, "Path",
                    __self_0, &__self_1),
            PatKind::Tuple(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Tuple",
                    &__self_0),
            PatKind::Box(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Box",
                    &__self_0),
            PatKind::Deref(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Deref",
                    &__self_0),
            PatKind::Ref(__self_0, __self_1, __self_2) =>
                ::core::fmt::Formatter::debug_tuple_field3_finish(f, "Ref",
                    __self_0, __self_1, &__self_2),
            PatKind::Expr(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Expr",
                    &__self_0),
            PatKind::Range(__self_0, __self_1, __self_2) =>
                ::core::fmt::Formatter::debug_tuple_field3_finish(f, "Range",
                    __self_0, __self_1, &__self_2),
            PatKind::Slice(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Slice",
                    &__self_0),
            PatKind::Rest => ::core::fmt::Formatter::write_str(f, "Rest"),
            PatKind::Never => ::core::fmt::Formatter::write_str(f, "Never"),
            PatKind::Guard(__self_0, __self_1) =>
                ::core::fmt::Formatter::debug_tuple_field2_finish(f, "Guard",
                    __self_0, &__self_1),
            PatKind::Paren(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Paren",
                    &__self_0),
            PatKind::MacCall(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "MacCall", &__self_0),
            PatKind::Err(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Err",
                    &__self_0),
        }
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for PatKind
            where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    PatKind::Missing => {}
                    PatKind::Wild => {}
                    PatKind::Ident(ref __binding_0, ref __binding_1,
                        ref __binding_2) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_2,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    PatKind::Struct(ref __binding_0, ref __binding_1,
                        ref __binding_2, ref __binding_3) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_2,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_3,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    PatKind::TupleStruct(ref __binding_0, ref __binding_1,
                        ref __binding_2) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_2,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    PatKind::Or(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    PatKind::Path(ref __binding_0, ref __binding_1) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    PatKind::Tuple(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    PatKind::Box(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    PatKind::Deref(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    PatKind::Ref(ref __binding_0, ref __binding_1,
                        ref __binding_2) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_2,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    PatKind::Expr(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    PatKind::Range(ref __binding_0, ref __binding_1,
                        ref __binding_2) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_2,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    PatKind::Slice(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    PatKind::Rest => {}
                    PatKind::Never => {}
                    PatKind::Guard(ref __binding_0, ref __binding_1) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    PatKind::Paren(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    PatKind::MacCall(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    PatKind::Err(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for PatKind where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    PatKind::Missing => {}
                    PatKind::Wild => {}
                    PatKind::Ident(ref mut __binding_0, ref mut __binding_1,
                        ref mut __binding_2) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_2,
                                __visitor, ())
                        }
                    }
                    PatKind::Struct(ref mut __binding_0, ref mut __binding_1,
                        ref mut __binding_2, ref mut __binding_3) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_2,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_3,
                                __visitor, ())
                        }
                    }
                    PatKind::TupleStruct(ref mut __binding_0,
                        ref mut __binding_1, ref mut __binding_2) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_2,
                                __visitor, ())
                        }
                    }
                    PatKind::Or(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                    PatKind::Path(ref mut __binding_0, ref mut __binding_1) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                    }
                    PatKind::Tuple(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                    PatKind::Box(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                    PatKind::Deref(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                    PatKind::Ref(ref mut __binding_0, ref mut __binding_1,
                        ref mut __binding_2) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_2,
                                __visitor, ())
                        }
                    }
                    PatKind::Expr(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                    PatKind::Range(ref mut __binding_0, ref mut __binding_1,
                        ref mut __binding_2) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_2,
                                __visitor, ())
                        }
                    }
                    PatKind::Slice(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                    PatKind::Rest => {}
                    PatKind::Never => {}
                    PatKind::Guard(ref mut __binding_0, ref mut __binding_1) =>
                        {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                    }
                    PatKind::Paren(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                    PatKind::MacCall(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                    PatKind::Err(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
874pub enum PatKind {
875    /// A missing pattern, e.g. for an anonymous param in a bare fn like `fn f(u32)`.
876    Missing,
877
878    /// Represents a wildcard pattern (`_`).
879    Wild,
880
881    /// A `PatKind::Ident` may either be a new bound variable (`ref mut binding @ OPT_SUBPATTERN`),
882    /// or a unit struct/variant pattern, or a const pattern (in the last two cases the third
883    /// field must be `None`). Disambiguation cannot be done with parser alone, so it happens
884    /// during name resolution.
885    Ident(BindingMode, Ident, Option<Box<Pat>>),
886
887    /// A struct or struct variant pattern (e.g., `Variant {x, y, ..}`).
888    Struct(Option<Box<QSelf>>, Path, ThinVec<PatField>, PatFieldsRest),
889
890    /// A tuple struct/variant pattern (`Variant(x, y, .., z)`).
891    TupleStruct(Option<Box<QSelf>>, Path, ThinVec<Pat>),
892
893    /// An or-pattern `A | B | C`.
894    /// Invariant: `pats.len() >= 2`.
895    Or(ThinVec<Pat>),
896
897    /// A possibly qualified path pattern.
898    /// Unqualified path patterns `A::B::C` can legally refer to variants, structs, constants
899    /// or associated constants. Qualified path patterns `<A>::B::C`/`<A as Trait>::B::C` can
900    /// only legally refer to associated constants.
901    Path(Option<Box<QSelf>>, Path),
902
903    /// A tuple pattern (`(a, b)`).
904    Tuple(ThinVec<Pat>),
905
906    /// A `box` pattern.
907    Box(Box<Pat>),
908
909    /// A `deref` pattern (currently `deref!()` macro-based syntax).
910    Deref(Box<Pat>),
911
912    /// A reference pattern (e.g., `&mut (a, b)`).
913    Ref(Box<Pat>, Pinnedness, Mutability),
914
915    /// A literal, const block or path.
916    Expr(Box<Expr>),
917
918    /// A range pattern (e.g., `1...2`, `1..2`, `1..`, `..2`, `1..=2`, `..=2`).
919    Range(Option<Box<Expr>>, Option<Box<Expr>>, Spanned<RangeEnd>),
920
921    /// A slice pattern `[a, b, c]`.
922    Slice(ThinVec<Pat>),
923
924    /// A rest pattern `..`.
925    ///
926    /// Syntactically it is valid anywhere.
927    ///
928    /// Semantically however, it only has meaning immediately inside:
929    /// - a slice pattern: `[a, .., b]`,
930    /// - a binding pattern immediately inside a slice pattern: `[a, r @ ..]`,
931    /// - a tuple pattern: `(a, .., b)`,
932    /// - a tuple struct/variant pattern: `$path(a, .., b)`.
933    ///
934    /// In all of these cases, an additional restriction applies,
935    /// only one rest pattern may occur in the pattern sequences.
936    Rest,
937
938    // A never pattern `!`.
939    Never,
940
941    /// A guard pattern (e.g., `x if guard(x)`).
942    Guard(Box<Pat>, Box<Guard>),
943
944    /// Parentheses in patterns used for grouping (i.e., `(PAT)`).
945    Paren(Box<Pat>),
946
947    /// A macro pattern; pre-expansion.
948    MacCall(Box<MacCall>),
949
950    /// Placeholder for a pattern that wasn't syntactically well formed in some way.
951    Err(ErrorGuaranteed),
952}
953
954/// Whether the `..` is present in a struct fields pattern.
955#[derive(#[automatically_derived]
impl ::core::clone::Clone for PatFieldsRest {
    #[inline]
    fn clone(&self) -> PatFieldsRest {
        let _: ::core::clone::AssertParamIsClone<Span>;
        let _: ::core::clone::AssertParamIsClone<ErrorGuaranteed>;
        *self
    }
}Clone, #[automatically_derived]
impl ::core::marker::Copy for PatFieldsRest { }Copy, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for PatFieldsRest {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        PatFieldsRest::Rest(ref __binding_0) => { 0usize }
                        PatFieldsRest::Recovered(ref __binding_0) => { 1usize }
                        PatFieldsRest::None => { 2usize }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    PatFieldsRest::Rest(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    PatFieldsRest::Recovered(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    PatFieldsRest::None => {}
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for PatFieldsRest {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => {
                        PatFieldsRest::Rest(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    1usize => {
                        PatFieldsRest::Recovered(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    2usize => { PatFieldsRest::None }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `PatFieldsRest`, expected 0..3, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for PatFieldsRest {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            PatFieldsRest::Rest(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Rest",
                    &__self_0),
            PatFieldsRest::Recovered(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "Recovered", &__self_0),
            PatFieldsRest::None =>
                ::core::fmt::Formatter::write_str(f, "None"),
        }
    }
}Debug, #[automatically_derived]
impl ::core::cmp::PartialEq for PatFieldsRest {
    #[inline]
    fn eq(&self, other: &PatFieldsRest) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr &&
            match (self, other) {
                (PatFieldsRest::Rest(__self_0), PatFieldsRest::Rest(__arg1_0))
                    => __self_0 == __arg1_0,
                (PatFieldsRest::Recovered(__self_0),
                    PatFieldsRest::Recovered(__arg1_0)) => __self_0 == __arg1_0,
                _ => true,
            }
    }
}PartialEq, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for
            PatFieldsRest where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    PatFieldsRest::Rest(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    PatFieldsRest::Recovered(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    PatFieldsRest::None => {}
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for PatFieldsRest where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    PatFieldsRest::Rest(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                    PatFieldsRest::Recovered(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                    PatFieldsRest::None => {}
                }
            }
        }
    };Walkable)]
956pub enum PatFieldsRest {
957    /// `module::StructName { field, ..}`
958    Rest(Span),
959    /// `module::StructName { field, syntax error }`
960    Recovered(ErrorGuaranteed),
961    /// `module::StructName { field }`
962    None,
963}
964
965/// The kind of borrow in an `AddrOf` expression,
966/// e.g., `&place` or `&raw const place`.
967#[derive(#[automatically_derived]
impl ::core::clone::Clone for BorrowKind {
    #[inline]
    fn clone(&self) -> BorrowKind { *self }
}Clone, #[automatically_derived]
impl ::core::marker::Copy for BorrowKind { }Copy, #[automatically_derived]
impl ::core::cmp::PartialEq for BorrowKind {
    #[inline]
    fn eq(&self, other: &BorrowKind) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::Eq for BorrowKind {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::fmt::Debug for BorrowKind {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::write_str(f,
            match self {
                BorrowKind::Ref => "Ref",
                BorrowKind::Raw => "Raw",
                BorrowKind::Pin => "Pin",
            })
    }
}Debug)]
968#[derive(const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for BorrowKind {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        BorrowKind::Ref => { 0usize }
                        BorrowKind::Raw => { 1usize }
                        BorrowKind::Pin => { 2usize }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    BorrowKind::Ref => {}
                    BorrowKind::Raw => {}
                    BorrowKind::Pin => {}
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for BorrowKind {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => { BorrowKind::Ref }
                    1usize => { BorrowKind::Raw }
                    2usize => { BorrowKind::Pin }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `BorrowKind`, expected 0..3, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, const _: () =
    {
        impl<__CTX> ::rustc_data_structures::stable_hasher::HashStable<__CTX>
            for BorrowKind where __CTX: ::rustc_span::HashStableContext {
            #[inline]
            fn hash_stable(&self, __hcx: &mut __CTX,
                __hasher:
                    &mut ::rustc_data_structures::stable_hasher::StableHasher) {
                ::std::mem::discriminant(self).hash_stable(__hcx, __hasher);
                match *self {
                    BorrowKind::Ref => {}
                    BorrowKind::Raw => {}
                    BorrowKind::Pin => {}
                }
            }
        }
    };HashStable_Generic, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for BorrowKind
            where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    BorrowKind::Ref => {}
                    BorrowKind::Raw => {}
                    BorrowKind::Pin => {}
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for BorrowKind where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    BorrowKind::Ref => {}
                    BorrowKind::Raw => {}
                    BorrowKind::Pin => {}
                }
            }
        }
    };Walkable)]
969pub enum BorrowKind {
970    /// A normal borrow, `&$expr` or `&mut $expr`.
971    /// The resulting type is either `&'a T` or `&'a mut T`
972    /// where `T = typeof($expr)` and `'a` is some lifetime.
973    Ref,
974    /// A raw borrow, `&raw const $expr` or `&raw mut $expr`.
975    /// The resulting type is either `*const T` or `*mut T`
976    /// where `T = typeof($expr)`.
977    Raw,
978    /// A pinned borrow, `&pin const $expr` or `&pin mut $expr`.
979    /// The resulting type is either `Pin<&'a T>` or `Pin<&'a mut T>`
980    /// where `T = typeof($expr)` and `'a` is some lifetime.
981    Pin,
982}
983
984#[derive(#[automatically_derived]
impl ::core::clone::Clone for BinOpKind {
    #[inline]
    fn clone(&self) -> BinOpKind { *self }
}Clone, #[automatically_derived]
impl ::core::marker::Copy for BinOpKind { }Copy, #[automatically_derived]
impl ::core::fmt::Debug for BinOpKind {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::write_str(f,
            match self {
                BinOpKind::Add => "Add",
                BinOpKind::Sub => "Sub",
                BinOpKind::Mul => "Mul",
                BinOpKind::Div => "Div",
                BinOpKind::Rem => "Rem",
                BinOpKind::And => "And",
                BinOpKind::Or => "Or",
                BinOpKind::BitXor => "BitXor",
                BinOpKind::BitAnd => "BitAnd",
                BinOpKind::BitOr => "BitOr",
                BinOpKind::Shl => "Shl",
                BinOpKind::Shr => "Shr",
                BinOpKind::Eq => "Eq",
                BinOpKind::Lt => "Lt",
                BinOpKind::Le => "Le",
                BinOpKind::Ne => "Ne",
                BinOpKind::Ge => "Ge",
                BinOpKind::Gt => "Gt",
            })
    }
}Debug, #[automatically_derived]
impl ::core::cmp::PartialEq for BinOpKind {
    #[inline]
    fn eq(&self, other: &BinOpKind) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr
    }
}PartialEq, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for BinOpKind {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        BinOpKind::Add => { 0usize }
                        BinOpKind::Sub => { 1usize }
                        BinOpKind::Mul => { 2usize }
                        BinOpKind::Div => { 3usize }
                        BinOpKind::Rem => { 4usize }
                        BinOpKind::And => { 5usize }
                        BinOpKind::Or => { 6usize }
                        BinOpKind::BitXor => { 7usize }
                        BinOpKind::BitAnd => { 8usize }
                        BinOpKind::BitOr => { 9usize }
                        BinOpKind::Shl => { 10usize }
                        BinOpKind::Shr => { 11usize }
                        BinOpKind::Eq => { 12usize }
                        BinOpKind::Lt => { 13usize }
                        BinOpKind::Le => { 14usize }
                        BinOpKind::Ne => { 15usize }
                        BinOpKind::Ge => { 16usize }
                        BinOpKind::Gt => { 17usize }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    BinOpKind::Add => {}
                    BinOpKind::Sub => {}
                    BinOpKind::Mul => {}
                    BinOpKind::Div => {}
                    BinOpKind::Rem => {}
                    BinOpKind::And => {}
                    BinOpKind::Or => {}
                    BinOpKind::BitXor => {}
                    BinOpKind::BitAnd => {}
                    BinOpKind::BitOr => {}
                    BinOpKind::Shl => {}
                    BinOpKind::Shr => {}
                    BinOpKind::Eq => {}
                    BinOpKind::Lt => {}
                    BinOpKind::Le => {}
                    BinOpKind::Ne => {}
                    BinOpKind::Ge => {}
                    BinOpKind::Gt => {}
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for BinOpKind {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => { BinOpKind::Add }
                    1usize => { BinOpKind::Sub }
                    2usize => { BinOpKind::Mul }
                    3usize => { BinOpKind::Div }
                    4usize => { BinOpKind::Rem }
                    5usize => { BinOpKind::And }
                    6usize => { BinOpKind::Or }
                    7usize => { BinOpKind::BitXor }
                    8usize => { BinOpKind::BitAnd }
                    9usize => { BinOpKind::BitOr }
                    10usize => { BinOpKind::Shl }
                    11usize => { BinOpKind::Shr }
                    12usize => { BinOpKind::Eq }
                    13usize => { BinOpKind::Lt }
                    14usize => { BinOpKind::Le }
                    15usize => { BinOpKind::Ne }
                    16usize => { BinOpKind::Ge }
                    17usize => { BinOpKind::Gt }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `BinOpKind`, expected 0..18, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, const _: () =
    {
        impl<__CTX> ::rustc_data_structures::stable_hasher::HashStable<__CTX>
            for BinOpKind where __CTX: ::rustc_span::HashStableContext {
            #[inline]
            fn hash_stable(&self, __hcx: &mut __CTX,
                __hasher:
                    &mut ::rustc_data_structures::stable_hasher::StableHasher) {
                ::std::mem::discriminant(self).hash_stable(__hcx, __hasher);
                match *self {
                    BinOpKind::Add => {}
                    BinOpKind::Sub => {}
                    BinOpKind::Mul => {}
                    BinOpKind::Div => {}
                    BinOpKind::Rem => {}
                    BinOpKind::And => {}
                    BinOpKind::Or => {}
                    BinOpKind::BitXor => {}
                    BinOpKind::BitAnd => {}
                    BinOpKind::BitOr => {}
                    BinOpKind::Shl => {}
                    BinOpKind::Shr => {}
                    BinOpKind::Eq => {}
                    BinOpKind::Lt => {}
                    BinOpKind::Le => {}
                    BinOpKind::Ne => {}
                    BinOpKind::Ge => {}
                    BinOpKind::Gt => {}
                }
            }
        }
    };HashStable_Generic, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for BinOpKind
            where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    BinOpKind::Add => {}
                    BinOpKind::Sub => {}
                    BinOpKind::Mul => {}
                    BinOpKind::Div => {}
                    BinOpKind::Rem => {}
                    BinOpKind::And => {}
                    BinOpKind::Or => {}
                    BinOpKind::BitXor => {}
                    BinOpKind::BitAnd => {}
                    BinOpKind::BitOr => {}
                    BinOpKind::Shl => {}
                    BinOpKind::Shr => {}
                    BinOpKind::Eq => {}
                    BinOpKind::Lt => {}
                    BinOpKind::Le => {}
                    BinOpKind::Ne => {}
                    BinOpKind::Ge => {}
                    BinOpKind::Gt => {}
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for BinOpKind where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    BinOpKind::Add => {}
                    BinOpKind::Sub => {}
                    BinOpKind::Mul => {}
                    BinOpKind::Div => {}
                    BinOpKind::Rem => {}
                    BinOpKind::And => {}
                    BinOpKind::Or => {}
                    BinOpKind::BitXor => {}
                    BinOpKind::BitAnd => {}
                    BinOpKind::BitOr => {}
                    BinOpKind::Shl => {}
                    BinOpKind::Shr => {}
                    BinOpKind::Eq => {}
                    BinOpKind::Lt => {}
                    BinOpKind::Le => {}
                    BinOpKind::Ne => {}
                    BinOpKind::Ge => {}
                    BinOpKind::Gt => {}
                }
            }
        }
    };Walkable)]
985pub enum BinOpKind {
986    /// The `+` operator (addition)
987    Add,
988    /// The `-` operator (subtraction)
989    Sub,
990    /// The `*` operator (multiplication)
991    Mul,
992    /// The `/` operator (division)
993    Div,
994    /// The `%` operator (modulus)
995    Rem,
996    /// The `&&` operator (logical and)
997    And,
998    /// The `||` operator (logical or)
999    Or,
1000    /// The `^` operator (bitwise xor)
1001    BitXor,
1002    /// The `&` operator (bitwise and)
1003    BitAnd,
1004    /// The `|` operator (bitwise or)
1005    BitOr,
1006    /// The `<<` operator (shift left)
1007    Shl,
1008    /// The `>>` operator (shift right)
1009    Shr,
1010    /// The `==` operator (equality)
1011    Eq,
1012    /// The `<` operator (less than)
1013    Lt,
1014    /// The `<=` operator (less than or equal to)
1015    Le,
1016    /// The `!=` operator (not equal to)
1017    Ne,
1018    /// The `>=` operator (greater than or equal to)
1019    Ge,
1020    /// The `>` operator (greater than)
1021    Gt,
1022}
1023
1024impl BinOpKind {
1025    pub fn as_str(&self) -> &'static str {
1026        use BinOpKind::*;
1027        match self {
1028            Add => "+",
1029            Sub => "-",
1030            Mul => "*",
1031            Div => "/",
1032            Rem => "%",
1033            And => "&&",
1034            Or => "||",
1035            BitXor => "^",
1036            BitAnd => "&",
1037            BitOr => "|",
1038            Shl => "<<",
1039            Shr => ">>",
1040            Eq => "==",
1041            Lt => "<",
1042            Le => "<=",
1043            Ne => "!=",
1044            Ge => ">=",
1045            Gt => ">",
1046        }
1047    }
1048
1049    pub fn is_lazy(&self) -> bool {
1050        #[allow(non_exhaustive_omitted_patterns)] match self {
    BinOpKind::And | BinOpKind::Or => true,
    _ => false,
}matches!(self, BinOpKind::And | BinOpKind::Or)
1051    }
1052
1053    pub fn precedence(&self) -> ExprPrecedence {
1054        use BinOpKind::*;
1055        match *self {
1056            Mul | Div | Rem => ExprPrecedence::Product,
1057            Add | Sub => ExprPrecedence::Sum,
1058            Shl | Shr => ExprPrecedence::Shift,
1059            BitAnd => ExprPrecedence::BitAnd,
1060            BitXor => ExprPrecedence::BitXor,
1061            BitOr => ExprPrecedence::BitOr,
1062            Lt | Gt | Le | Ge | Eq | Ne => ExprPrecedence::Compare,
1063            And => ExprPrecedence::LAnd,
1064            Or => ExprPrecedence::LOr,
1065        }
1066    }
1067
1068    pub fn fixity(&self) -> Fixity {
1069        use BinOpKind::*;
1070        match self {
1071            Eq | Ne | Lt | Le | Gt | Ge => Fixity::None,
1072            Add | Sub | Mul | Div | Rem | And | Or | BitXor | BitAnd | BitOr | Shl | Shr => {
1073                Fixity::Left
1074            }
1075        }
1076    }
1077
1078    pub fn is_comparison(self) -> bool {
1079        use BinOpKind::*;
1080        match self {
1081            Eq | Ne | Lt | Le | Gt | Ge => true,
1082            Add | Sub | Mul | Div | Rem | And | Or | BitXor | BitAnd | BitOr | Shl | Shr => false,
1083        }
1084    }
1085
1086    /// Returns `true` if the binary operator takes its arguments by value.
1087    pub fn is_by_value(self) -> bool {
1088        !self.is_comparison()
1089    }
1090}
1091
1092pub type BinOp = Spanned<BinOpKind>;
1093
1094// Sometimes `BinOpKind` and `AssignOpKind` need the same treatment. The
1095// operations covered by `AssignOpKind` are a subset of those covered by
1096// `BinOpKind`, so it makes sense to convert `AssignOpKind` to `BinOpKind`.
1097impl From<AssignOpKind> for BinOpKind {
1098    fn from(op: AssignOpKind) -> BinOpKind {
1099        match op {
1100            AssignOpKind::AddAssign => BinOpKind::Add,
1101            AssignOpKind::SubAssign => BinOpKind::Sub,
1102            AssignOpKind::MulAssign => BinOpKind::Mul,
1103            AssignOpKind::DivAssign => BinOpKind::Div,
1104            AssignOpKind::RemAssign => BinOpKind::Rem,
1105            AssignOpKind::BitXorAssign => BinOpKind::BitXor,
1106            AssignOpKind::BitAndAssign => BinOpKind::BitAnd,
1107            AssignOpKind::BitOrAssign => BinOpKind::BitOr,
1108            AssignOpKind::ShlAssign => BinOpKind::Shl,
1109            AssignOpKind::ShrAssign => BinOpKind::Shr,
1110        }
1111    }
1112}
1113
1114#[derive(#[automatically_derived]
impl ::core::clone::Clone for AssignOpKind {
    #[inline]
    fn clone(&self) -> AssignOpKind { *self }
}Clone, #[automatically_derived]
impl ::core::marker::Copy for AssignOpKind { }Copy, #[automatically_derived]
impl ::core::fmt::Debug for AssignOpKind {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::write_str(f,
            match self {
                AssignOpKind::AddAssign => "AddAssign",
                AssignOpKind::SubAssign => "SubAssign",
                AssignOpKind::MulAssign => "MulAssign",
                AssignOpKind::DivAssign => "DivAssign",
                AssignOpKind::RemAssign => "RemAssign",
                AssignOpKind::BitXorAssign => "BitXorAssign",
                AssignOpKind::BitAndAssign => "BitAndAssign",
                AssignOpKind::BitOrAssign => "BitOrAssign",
                AssignOpKind::ShlAssign => "ShlAssign",
                AssignOpKind::ShrAssign => "ShrAssign",
            })
    }
}Debug, #[automatically_derived]
impl ::core::cmp::PartialEq for AssignOpKind {
    #[inline]
    fn eq(&self, other: &AssignOpKind) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr
    }
}PartialEq, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for AssignOpKind {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        AssignOpKind::AddAssign => { 0usize }
                        AssignOpKind::SubAssign => { 1usize }
                        AssignOpKind::MulAssign => { 2usize }
                        AssignOpKind::DivAssign => { 3usize }
                        AssignOpKind::RemAssign => { 4usize }
                        AssignOpKind::BitXorAssign => { 5usize }
                        AssignOpKind::BitAndAssign => { 6usize }
                        AssignOpKind::BitOrAssign => { 7usize }
                        AssignOpKind::ShlAssign => { 8usize }
                        AssignOpKind::ShrAssign => { 9usize }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    AssignOpKind::AddAssign => {}
                    AssignOpKind::SubAssign => {}
                    AssignOpKind::MulAssign => {}
                    AssignOpKind::DivAssign => {}
                    AssignOpKind::RemAssign => {}
                    AssignOpKind::BitXorAssign => {}
                    AssignOpKind::BitAndAssign => {}
                    AssignOpKind::BitOrAssign => {}
                    AssignOpKind::ShlAssign => {}
                    AssignOpKind::ShrAssign => {}
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for AssignOpKind {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => { AssignOpKind::AddAssign }
                    1usize => { AssignOpKind::SubAssign }
                    2usize => { AssignOpKind::MulAssign }
                    3usize => { AssignOpKind::DivAssign }
                    4usize => { AssignOpKind::RemAssign }
                    5usize => { AssignOpKind::BitXorAssign }
                    6usize => { AssignOpKind::BitAndAssign }
                    7usize => { AssignOpKind::BitOrAssign }
                    8usize => { AssignOpKind::ShlAssign }
                    9usize => { AssignOpKind::ShrAssign }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `AssignOpKind`, expected 0..10, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, const _: () =
    {
        impl<__CTX> ::rustc_data_structures::stable_hasher::HashStable<__CTX>
            for AssignOpKind where __CTX: ::rustc_span::HashStableContext {
            #[inline]
            fn hash_stable(&self, __hcx: &mut __CTX,
                __hasher:
                    &mut ::rustc_data_structures::stable_hasher::StableHasher) {
                ::std::mem::discriminant(self).hash_stable(__hcx, __hasher);
                match *self {
                    AssignOpKind::AddAssign => {}
                    AssignOpKind::SubAssign => {}
                    AssignOpKind::MulAssign => {}
                    AssignOpKind::DivAssign => {}
                    AssignOpKind::RemAssign => {}
                    AssignOpKind::BitXorAssign => {}
                    AssignOpKind::BitAndAssign => {}
                    AssignOpKind::BitOrAssign => {}
                    AssignOpKind::ShlAssign => {}
                    AssignOpKind::ShrAssign => {}
                }
            }
        }
    };HashStable_Generic, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for AssignOpKind
            where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    AssignOpKind::AddAssign => {}
                    AssignOpKind::SubAssign => {}
                    AssignOpKind::MulAssign => {}
                    AssignOpKind::DivAssign => {}
                    AssignOpKind::RemAssign => {}
                    AssignOpKind::BitXorAssign => {}
                    AssignOpKind::BitAndAssign => {}
                    AssignOpKind::BitOrAssign => {}
                    AssignOpKind::ShlAssign => {}
                    AssignOpKind::ShrAssign => {}
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for AssignOpKind where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    AssignOpKind::AddAssign => {}
                    AssignOpKind::SubAssign => {}
                    AssignOpKind::MulAssign => {}
                    AssignOpKind::DivAssign => {}
                    AssignOpKind::RemAssign => {}
                    AssignOpKind::BitXorAssign => {}
                    AssignOpKind::BitAndAssign => {}
                    AssignOpKind::BitOrAssign => {}
                    AssignOpKind::ShlAssign => {}
                    AssignOpKind::ShrAssign => {}
                }
            }
        }
    };Walkable)]
1115pub enum AssignOpKind {
1116    /// The `+=` operator (addition)
1117    AddAssign,
1118    /// The `-=` operator (subtraction)
1119    SubAssign,
1120    /// The `*=` operator (multiplication)
1121    MulAssign,
1122    /// The `/=` operator (division)
1123    DivAssign,
1124    /// The `%=` operator (modulus)
1125    RemAssign,
1126    /// The `^=` operator (bitwise xor)
1127    BitXorAssign,
1128    /// The `&=` operator (bitwise and)
1129    BitAndAssign,
1130    /// The `|=` operator (bitwise or)
1131    BitOrAssign,
1132    /// The `<<=` operator (shift left)
1133    ShlAssign,
1134    /// The `>>=` operator (shift right)
1135    ShrAssign,
1136}
1137
1138impl AssignOpKind {
1139    pub fn as_str(&self) -> &'static str {
1140        use AssignOpKind::*;
1141        match self {
1142            AddAssign => "+=",
1143            SubAssign => "-=",
1144            MulAssign => "*=",
1145            DivAssign => "/=",
1146            RemAssign => "%=",
1147            BitXorAssign => "^=",
1148            BitAndAssign => "&=",
1149            BitOrAssign => "|=",
1150            ShlAssign => "<<=",
1151            ShrAssign => ">>=",
1152        }
1153    }
1154
1155    /// AssignOps are always by value.
1156    pub fn is_by_value(self) -> bool {
1157        true
1158    }
1159}
1160
1161pub type AssignOp = Spanned<AssignOpKind>;
1162
1163/// Unary operator.
1164///
1165/// Note that `&data` is not an operator, it's an `AddrOf` expression.
1166#[derive(#[automatically_derived]
impl ::core::clone::Clone for UnOp {
    #[inline]
    fn clone(&self) -> UnOp { *self }
}Clone, #[automatically_derived]
impl ::core::marker::Copy for UnOp { }Copy, #[automatically_derived]
impl ::core::fmt::Debug for UnOp {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::write_str(f,
            match self {
                UnOp::Deref => "Deref",
                UnOp::Not => "Not",
                UnOp::Neg => "Neg",
            })
    }
}Debug, #[automatically_derived]
impl ::core::cmp::PartialEq for UnOp {
    #[inline]
    fn eq(&self, other: &UnOp) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr
    }
}PartialEq, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for UnOp {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        UnOp::Deref => { 0usize }
                        UnOp::Not => { 1usize }
                        UnOp::Neg => { 2usize }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    UnOp::Deref => {}
                    UnOp::Not => {}
                    UnOp::Neg => {}
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for UnOp {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => { UnOp::Deref }
                    1usize => { UnOp::Not }
                    2usize => { UnOp::Neg }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `UnOp`, expected 0..3, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, const _: () =
    {
        impl<__CTX> ::rustc_data_structures::stable_hasher::HashStable<__CTX>
            for UnOp where __CTX: ::rustc_span::HashStableContext {
            #[inline]
            fn hash_stable(&self, __hcx: &mut __CTX,
                __hasher:
                    &mut ::rustc_data_structures::stable_hasher::StableHasher) {
                ::std::mem::discriminant(self).hash_stable(__hcx, __hasher);
                match *self {
                    UnOp::Deref => {}
                    UnOp::Not => {}
                    UnOp::Neg => {}
                }
            }
        }
    };HashStable_Generic, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for UnOp where
            __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    UnOp::Deref => {}
                    UnOp::Not => {}
                    UnOp::Neg => {}
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for UnOp where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    UnOp::Deref => {}
                    UnOp::Not => {}
                    UnOp::Neg => {}
                }
            }
        }
    };Walkable)]
1167pub enum UnOp {
1168    /// The `*` operator for dereferencing
1169    Deref,
1170    /// The `!` operator for logical inversion
1171    Not,
1172    /// The `-` operator for negation
1173    Neg,
1174}
1175
1176impl UnOp {
1177    pub fn as_str(&self) -> &'static str {
1178        match self {
1179            UnOp::Deref => "*",
1180            UnOp::Not => "!",
1181            UnOp::Neg => "-",
1182        }
1183    }
1184
1185    /// Returns `true` if the unary operator takes its argument by value.
1186    pub fn is_by_value(self) -> bool {
1187        #[allow(non_exhaustive_omitted_patterns)] match self {
    Self::Neg | Self::Not => true,
    _ => false,
}matches!(self, Self::Neg | Self::Not)
1188    }
1189}
1190
1191/// A statement. No `attrs` or `tokens` fields because each `StmtKind` variant
1192/// contains an AST node with those fields. (Except for `StmtKind::Empty`,
1193/// which never has attrs or tokens)
1194#[derive(#[automatically_derived]
impl ::core::clone::Clone for Stmt {
    #[inline]
    fn clone(&self) -> Stmt {
        Stmt {
            id: ::core::clone::Clone::clone(&self.id),
            kind: ::core::clone::Clone::clone(&self.kind),
            span: ::core::clone::Clone::clone(&self.span),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for Stmt {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    Stmt {
                        id: ref __binding_0,
                        kind: ref __binding_1,
                        span: ref __binding_2 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for Stmt {
            fn decode(__decoder: &mut __D) -> Self {
                Stmt {
                    id: ::rustc_serialize::Decodable::decode(__decoder),
                    kind: ::rustc_serialize::Decodable::decode(__decoder),
                    span: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for Stmt {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field3_finish(f, "Stmt", "id",
            &self.id, "kind", &self.kind, "span", &&self.span)
    }
}Debug)]
1195pub struct Stmt {
1196    pub id: NodeId,
1197    pub kind: StmtKind,
1198    pub span: Span,
1199}
1200
1201impl Stmt {
1202    pub fn has_trailing_semicolon(&self) -> bool {
1203        match &self.kind {
1204            StmtKind::Semi(_) => true,
1205            StmtKind::MacCall(mac) => #[allow(non_exhaustive_omitted_patterns)] match mac.style {
    MacStmtStyle::Semicolon => true,
    _ => false,
}matches!(mac.style, MacStmtStyle::Semicolon),
1206            _ => false,
1207        }
1208    }
1209
1210    /// Converts a parsed `Stmt` to a `Stmt` with
1211    /// a trailing semicolon.
1212    ///
1213    /// This only modifies the parsed AST struct, not the attached
1214    /// `LazyAttrTokenStream`. The parser is responsible for calling
1215    /// `ToAttrTokenStream::add_trailing_semi` when there is actually
1216    /// a semicolon in the tokenstream.
1217    pub fn add_trailing_semicolon(mut self) -> Self {
1218        self.kind = match self.kind {
1219            StmtKind::Expr(expr) => StmtKind::Semi(expr),
1220            StmtKind::MacCall(mut mac) => {
1221                mac.style = MacStmtStyle::Semicolon;
1222                StmtKind::MacCall(mac)
1223            }
1224            kind => kind,
1225        };
1226
1227        self
1228    }
1229
1230    pub fn is_item(&self) -> bool {
1231        #[allow(non_exhaustive_omitted_patterns)] match self.kind {
    StmtKind::Item(_) => true,
    _ => false,
}matches!(self.kind, StmtKind::Item(_))
1232    }
1233
1234    pub fn is_expr(&self) -> bool {
1235        #[allow(non_exhaustive_omitted_patterns)] match self.kind {
    StmtKind::Expr(_) => true,
    _ => false,
}matches!(self.kind, StmtKind::Expr(_))
1236    }
1237}
1238
1239// Adding a new variant? Please update `test_stmt` in `tests/ui/macros/stringify.rs`.
1240#[derive(#[automatically_derived]
impl ::core::clone::Clone for StmtKind {
    #[inline]
    fn clone(&self) -> StmtKind {
        match self {
            StmtKind::Let(__self_0) =>
                StmtKind::Let(::core::clone::Clone::clone(__self_0)),
            StmtKind::Item(__self_0) =>
                StmtKind::Item(::core::clone::Clone::clone(__self_0)),
            StmtKind::Expr(__self_0) =>
                StmtKind::Expr(::core::clone::Clone::clone(__self_0)),
            StmtKind::Semi(__self_0) =>
                StmtKind::Semi(::core::clone::Clone::clone(__self_0)),
            StmtKind::Empty => StmtKind::Empty,
            StmtKind::MacCall(__self_0) =>
                StmtKind::MacCall(::core::clone::Clone::clone(__self_0)),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for StmtKind {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        StmtKind::Let(ref __binding_0) => { 0usize }
                        StmtKind::Item(ref __binding_0) => { 1usize }
                        StmtKind::Expr(ref __binding_0) => { 2usize }
                        StmtKind::Semi(ref __binding_0) => { 3usize }
                        StmtKind::Empty => { 4usize }
                        StmtKind::MacCall(ref __binding_0) => { 5usize }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    StmtKind::Let(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    StmtKind::Item(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    StmtKind::Expr(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    StmtKind::Semi(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    StmtKind::Empty => {}
                    StmtKind::MacCall(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for StmtKind {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => {
                        StmtKind::Let(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    1usize => {
                        StmtKind::Item(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    2usize => {
                        StmtKind::Expr(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    3usize => {
                        StmtKind::Semi(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    4usize => { StmtKind::Empty }
                    5usize => {
                        StmtKind::MacCall(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `StmtKind`, expected 0..6, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for StmtKind {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            StmtKind::Let(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Let",
                    &__self_0),
            StmtKind::Item(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Item",
                    &__self_0),
            StmtKind::Expr(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Expr",
                    &__self_0),
            StmtKind::Semi(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Semi",
                    &__self_0),
            StmtKind::Empty => ::core::fmt::Formatter::write_str(f, "Empty"),
            StmtKind::MacCall(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "MacCall", &__self_0),
        }
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for StmtKind
            where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    StmtKind::Let(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    StmtKind::Item(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    StmtKind::Expr(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    StmtKind::Semi(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    StmtKind::Empty => {}
                    StmtKind::MacCall(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for StmtKind where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    StmtKind::Let(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                    StmtKind::Item(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                    StmtKind::Expr(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                    StmtKind::Semi(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                    StmtKind::Empty => {}
                    StmtKind::MacCall(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
1241pub enum StmtKind {
1242    /// A local (let) binding.
1243    Let(Box<Local>),
1244    /// An item definition.
1245    Item(Box<Item>),
1246    /// Expr without trailing semi-colon.
1247    Expr(Box<Expr>),
1248    /// Expr with a trailing semi-colon.
1249    Semi(Box<Expr>),
1250    /// Just a trailing semi-colon.
1251    Empty,
1252    /// Macro.
1253    MacCall(Box<MacCallStmt>),
1254}
1255
1256impl StmtKind {
1257    pub fn descr(&self) -> &'static str {
1258        match self {
1259            StmtKind::Let(_) => "local",
1260            StmtKind::Item(_) => "item",
1261            StmtKind::Expr(_) => "expression",
1262            StmtKind::Semi(_) => "statement",
1263            StmtKind::Empty => "semicolon",
1264            StmtKind::MacCall(_) => "macro call",
1265        }
1266    }
1267}
1268
1269#[derive(#[automatically_derived]
impl ::core::clone::Clone for MacCallStmt {
    #[inline]
    fn clone(&self) -> MacCallStmt {
        MacCallStmt {
            mac: ::core::clone::Clone::clone(&self.mac),
            style: ::core::clone::Clone::clone(&self.style),
            attrs: ::core::clone::Clone::clone(&self.attrs),
            tokens: ::core::clone::Clone::clone(&self.tokens),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for MacCallStmt {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    MacCallStmt {
                        mac: ref __binding_0,
                        style: ref __binding_1,
                        attrs: ref __binding_2,
                        tokens: ref __binding_3 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_3,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for MacCallStmt {
            fn decode(__decoder: &mut __D) -> Self {
                MacCallStmt {
                    mac: ::rustc_serialize::Decodable::decode(__decoder),
                    style: ::rustc_serialize::Decodable::decode(__decoder),
                    attrs: ::rustc_serialize::Decodable::decode(__decoder),
                    tokens: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for MacCallStmt {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field4_finish(f, "MacCallStmt",
            "mac", &self.mac, "style", &self.style, "attrs", &self.attrs,
            "tokens", &&self.tokens)
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for MacCallStmt
            where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    MacCallStmt {
                        mac: ref __binding_0,
                        style: ref __binding_1,
                        attrs: ref __binding_2,
                        tokens: ref __binding_3 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_2,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_3,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for MacCallStmt where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    MacCallStmt {
                        mac: ref mut __binding_0,
                        style: ref mut __binding_1,
                        attrs: ref mut __binding_2,
                        tokens: ref mut __binding_3 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_2,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_3,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
1270pub struct MacCallStmt {
1271    pub mac: Box<MacCall>,
1272    pub style: MacStmtStyle,
1273    pub attrs: AttrVec,
1274    pub tokens: Option<LazyAttrTokenStream>,
1275}
1276
1277#[derive(#[automatically_derived]
impl ::core::clone::Clone for MacStmtStyle {
    #[inline]
    fn clone(&self) -> MacStmtStyle { *self }
}Clone, #[automatically_derived]
impl ::core::marker::Copy for MacStmtStyle { }Copy, #[automatically_derived]
impl ::core::cmp::PartialEq for MacStmtStyle {
    #[inline]
    fn eq(&self, other: &MacStmtStyle) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr
    }
}PartialEq, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for MacStmtStyle {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        MacStmtStyle::Semicolon => { 0usize }
                        MacStmtStyle::Braces => { 1usize }
                        MacStmtStyle::NoBraces => { 2usize }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    MacStmtStyle::Semicolon => {}
                    MacStmtStyle::Braces => {}
                    MacStmtStyle::NoBraces => {}
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for MacStmtStyle {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => { MacStmtStyle::Semicolon }
                    1usize => { MacStmtStyle::Braces }
                    2usize => { MacStmtStyle::NoBraces }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `MacStmtStyle`, expected 0..3, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for MacStmtStyle {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::write_str(f,
            match self {
                MacStmtStyle::Semicolon => "Semicolon",
                MacStmtStyle::Braces => "Braces",
                MacStmtStyle::NoBraces => "NoBraces",
            })
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for MacStmtStyle
            where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    MacStmtStyle::Semicolon => {}
                    MacStmtStyle::Braces => {}
                    MacStmtStyle::NoBraces => {}
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for MacStmtStyle where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    MacStmtStyle::Semicolon => {}
                    MacStmtStyle::Braces => {}
                    MacStmtStyle::NoBraces => {}
                }
            }
        }
    };Walkable)]
1278pub enum MacStmtStyle {
1279    /// The macro statement had a trailing semicolon (e.g., `foo! { ... };`
1280    /// `foo!(...);`, `foo![...];`).
1281    Semicolon,
1282    /// The macro statement had braces (e.g., `foo! { ... }`).
1283    Braces,
1284    /// The macro statement had parentheses or brackets and no semicolon (e.g.,
1285    /// `foo!(...)`). All of these will end up being converted into macro
1286    /// expressions.
1287    NoBraces,
1288}
1289
1290/// Local represents a `let` statement, e.g., `let <pat>:<ty> = <expr>;`.
1291#[derive(#[automatically_derived]
impl ::core::clone::Clone for Local {
    #[inline]
    fn clone(&self) -> Local {
        Local {
            id: ::core::clone::Clone::clone(&self.id),
            super_: ::core::clone::Clone::clone(&self.super_),
            pat: ::core::clone::Clone::clone(&self.pat),
            ty: ::core::clone::Clone::clone(&self.ty),
            kind: ::core::clone::Clone::clone(&self.kind),
            span: ::core::clone::Clone::clone(&self.span),
            colon_sp: ::core::clone::Clone::clone(&self.colon_sp),
            attrs: ::core::clone::Clone::clone(&self.attrs),
            tokens: ::core::clone::Clone::clone(&self.tokens),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for Local {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    Local {
                        id: ref __binding_0,
                        super_: ref __binding_1,
                        pat: ref __binding_2,
                        ty: ref __binding_3,
                        kind: ref __binding_4,
                        span: ref __binding_5,
                        colon_sp: ref __binding_6,
                        attrs: ref __binding_7,
                        tokens: ref __binding_8 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_3,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_4,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_5,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_6,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_7,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_8,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for Local {
            fn decode(__decoder: &mut __D) -> Self {
                Local {
                    id: ::rustc_serialize::Decodable::decode(__decoder),
                    super_: ::rustc_serialize::Decodable::decode(__decoder),
                    pat: ::rustc_serialize::Decodable::decode(__decoder),
                    ty: ::rustc_serialize::Decodable::decode(__decoder),
                    kind: ::rustc_serialize::Decodable::decode(__decoder),
                    span: ::rustc_serialize::Decodable::decode(__decoder),
                    colon_sp: ::rustc_serialize::Decodable::decode(__decoder),
                    attrs: ::rustc_serialize::Decodable::decode(__decoder),
                    tokens: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for Local {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["id", "super_", "pat", "ty", "kind", "span", "colon_sp",
                        "attrs", "tokens"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.id, &self.super_, &self.pat, &self.ty, &self.kind,
                        &self.span, &self.colon_sp, &self.attrs, &&self.tokens];
        ::core::fmt::Formatter::debug_struct_fields_finish(f, "Local", names,
            values)
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for Local where
            __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    Local {
                        id: ref __binding_0,
                        super_: ref __binding_1,
                        pat: ref __binding_2,
                        ty: ref __binding_3,
                        kind: ref __binding_4,
                        span: ref __binding_5,
                        colon_sp: ref __binding_6,
                        attrs: ref __binding_7,
                        tokens: ref __binding_8 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_2,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_3,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_4,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_5,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_6,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_7,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_8,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for Local where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    Local {
                        id: ref mut __binding_0,
                        super_: ref mut __binding_1,
                        pat: ref mut __binding_2,
                        ty: ref mut __binding_3,
                        kind: ref mut __binding_4,
                        span: ref mut __binding_5,
                        colon_sp: ref mut __binding_6,
                        attrs: ref mut __binding_7,
                        tokens: ref mut __binding_8 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_2,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_3,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_4,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_5,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_6,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_7,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_8,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
1292pub struct Local {
1293    pub id: NodeId,
1294    pub super_: Option<Span>,
1295    pub pat: Box<Pat>,
1296    pub ty: Option<Box<Ty>>,
1297    pub kind: LocalKind,
1298    pub span: Span,
1299    pub colon_sp: Option<Span>,
1300    pub attrs: AttrVec,
1301    pub tokens: Option<LazyAttrTokenStream>,
1302}
1303
1304#[derive(#[automatically_derived]
impl ::core::clone::Clone for LocalKind {
    #[inline]
    fn clone(&self) -> LocalKind {
        match self {
            LocalKind::Decl => LocalKind::Decl,
            LocalKind::Init(__self_0) =>
                LocalKind::Init(::core::clone::Clone::clone(__self_0)),
            LocalKind::InitElse(__self_0, __self_1) =>
                LocalKind::InitElse(::core::clone::Clone::clone(__self_0),
                    ::core::clone::Clone::clone(__self_1)),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for LocalKind {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        LocalKind::Decl => { 0usize }
                        LocalKind::Init(ref __binding_0) => { 1usize }
                        LocalKind::InitElse(ref __binding_0, ref __binding_1) => {
                            2usize
                        }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    LocalKind::Decl => {}
                    LocalKind::Init(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    LocalKind::InitElse(ref __binding_0, ref __binding_1) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for LocalKind {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => { LocalKind::Decl }
                    1usize => {
                        LocalKind::Init(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    2usize => {
                        LocalKind::InitElse(::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder))
                    }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `LocalKind`, expected 0..3, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for LocalKind {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            LocalKind::Decl => ::core::fmt::Formatter::write_str(f, "Decl"),
            LocalKind::Init(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Init",
                    &__self_0),
            LocalKind::InitElse(__self_0, __self_1) =>
                ::core::fmt::Formatter::debug_tuple_field2_finish(f,
                    "InitElse", __self_0, &__self_1),
        }
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for LocalKind
            where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    LocalKind::Decl => {}
                    LocalKind::Init(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    LocalKind::InitElse(ref __binding_0, ref __binding_1) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for LocalKind where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    LocalKind::Decl => {}
                    LocalKind::Init(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                    LocalKind::InitElse(ref mut __binding_0,
                        ref mut __binding_1) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
1305pub enum LocalKind {
1306    /// Local declaration.
1307    /// Example: `let x;`
1308    Decl,
1309    /// Local declaration with an initializer.
1310    /// Example: `let x = y;`
1311    Init(Box<Expr>),
1312    /// Local declaration with an initializer and an `else` clause.
1313    /// Example: `let Some(x) = y else { return };`
1314    InitElse(Box<Expr>, Box<Block>),
1315}
1316
1317impl LocalKind {
1318    pub fn init(&self) -> Option<&Expr> {
1319        match self {
1320            Self::Decl => None,
1321            Self::Init(i) | Self::InitElse(i, _) => Some(i),
1322        }
1323    }
1324
1325    pub fn init_else_opt(&self) -> Option<(&Expr, Option<&Block>)> {
1326        match self {
1327            Self::Decl => None,
1328            Self::Init(init) => Some((init, None)),
1329            Self::InitElse(init, els) => Some((init, Some(els))),
1330        }
1331    }
1332}
1333
1334/// An arm of a 'match'.
1335///
1336/// E.g., `0..=10 => { println!("match!") }` as in
1337///
1338/// ```
1339/// match 123 {
1340///     0..=10 => { println!("match!") },
1341///     _ => { println!("no match!") },
1342/// }
1343/// ```
1344#[derive(#[automatically_derived]
impl ::core::clone::Clone for Arm {
    #[inline]
    fn clone(&self) -> Arm {
        Arm {
            attrs: ::core::clone::Clone::clone(&self.attrs),
            pat: ::core::clone::Clone::clone(&self.pat),
            guard: ::core::clone::Clone::clone(&self.guard),
            body: ::core::clone::Clone::clone(&self.body),
            span: ::core::clone::Clone::clone(&self.span),
            id: ::core::clone::Clone::clone(&self.id),
            is_placeholder: ::core::clone::Clone::clone(&self.is_placeholder),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for Arm {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    Arm {
                        attrs: ref __binding_0,
                        pat: ref __binding_1,
                        guard: ref __binding_2,
                        body: ref __binding_3,
                        span: ref __binding_4,
                        id: ref __binding_5,
                        is_placeholder: ref __binding_6 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_3,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_4,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_5,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_6,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for Arm {
            fn decode(__decoder: &mut __D) -> Self {
                Arm {
                    attrs: ::rustc_serialize::Decodable::decode(__decoder),
                    pat: ::rustc_serialize::Decodable::decode(__decoder),
                    guard: ::rustc_serialize::Decodable::decode(__decoder),
                    body: ::rustc_serialize::Decodable::decode(__decoder),
                    span: ::rustc_serialize::Decodable::decode(__decoder),
                    id: ::rustc_serialize::Decodable::decode(__decoder),
                    is_placeholder: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for Arm {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["attrs", "pat", "guard", "body", "span", "id",
                        "is_placeholder"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.attrs, &self.pat, &self.guard, &self.body, &self.span,
                        &self.id, &&self.is_placeholder];
        ::core::fmt::Formatter::debug_struct_fields_finish(f, "Arm", names,
            values)
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for Arm where
            __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    Arm {
                        attrs: ref __binding_0,
                        pat: ref __binding_1,
                        guard: ref __binding_2,
                        body: ref __binding_3,
                        span: ref __binding_4,
                        id: ref __binding_5,
                        is_placeholder: ref __binding_6 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_2,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_3,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_4,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_5,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_6,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for Arm where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    Arm {
                        attrs: ref mut __binding_0,
                        pat: ref mut __binding_1,
                        guard: ref mut __binding_2,
                        body: ref mut __binding_3,
                        span: ref mut __binding_4,
                        id: ref mut __binding_5,
                        is_placeholder: ref mut __binding_6 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_2,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_3,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_4,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_5,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_6,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
1345pub struct Arm {
1346    pub attrs: AttrVec,
1347    /// Match arm pattern, e.g. `10` in `match foo { 10 => {}, _ => {} }`.
1348    pub pat: Box<Pat>,
1349    /// Match arm guard, e.g. `n > 10` in `match foo { n if n > 10 => {}, _ => {} }`.
1350    pub guard: Option<Box<Guard>>,
1351    /// Match arm body. Omitted if the pattern is a never pattern.
1352    pub body: Option<Box<Expr>>,
1353    pub span: Span,
1354    pub id: NodeId,
1355    pub is_placeholder: bool,
1356}
1357
1358/// A single field in a struct expression, e.g. `x: value` and `y` in `Foo { x: value, y }`.
1359#[derive(#[automatically_derived]
impl ::core::clone::Clone for ExprField {
    #[inline]
    fn clone(&self) -> ExprField {
        ExprField {
            attrs: ::core::clone::Clone::clone(&self.attrs),
            id: ::core::clone::Clone::clone(&self.id),
            span: ::core::clone::Clone::clone(&self.span),
            ident: ::core::clone::Clone::clone(&self.ident),
            expr: ::core::clone::Clone::clone(&self.expr),
            is_shorthand: ::core::clone::Clone::clone(&self.is_shorthand),
            is_placeholder: ::core::clone::Clone::clone(&self.is_placeholder),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for ExprField {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    ExprField {
                        attrs: ref __binding_0,
                        id: ref __binding_1,
                        span: ref __binding_2,
                        ident: ref __binding_3,
                        expr: ref __binding_4,
                        is_shorthand: ref __binding_5,
                        is_placeholder: ref __binding_6 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_3,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_4,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_5,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_6,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for ExprField {
            fn decode(__decoder: &mut __D) -> Self {
                ExprField {
                    attrs: ::rustc_serialize::Decodable::decode(__decoder),
                    id: ::rustc_serialize::Decodable::decode(__decoder),
                    span: ::rustc_serialize::Decodable::decode(__decoder),
                    ident: ::rustc_serialize::Decodable::decode(__decoder),
                    expr: ::rustc_serialize::Decodable::decode(__decoder),
                    is_shorthand: ::rustc_serialize::Decodable::decode(__decoder),
                    is_placeholder: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for ExprField {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["attrs", "id", "span", "ident", "expr", "is_shorthand",
                        "is_placeholder"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.attrs, &self.id, &self.span, &self.ident, &self.expr,
                        &self.is_shorthand, &&self.is_placeholder];
        ::core::fmt::Formatter::debug_struct_fields_finish(f, "ExprField",
            names, values)
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for ExprField
            where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    ExprField {
                        attrs: ref __binding_0,
                        id: ref __binding_1,
                        span: ref __binding_2,
                        ident: ref __binding_3,
                        expr: ref __binding_4,
                        is_shorthand: ref __binding_5,
                        is_placeholder: ref __binding_6 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_2,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_3,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_4,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_5,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_6,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for ExprField where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    ExprField {
                        attrs: ref mut __binding_0,
                        id: ref mut __binding_1,
                        span: ref mut __binding_2,
                        ident: ref mut __binding_3,
                        expr: ref mut __binding_4,
                        is_shorthand: ref mut __binding_5,
                        is_placeholder: ref mut __binding_6 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_2,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_3,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_4,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_5,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_6,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
1360pub struct ExprField {
1361    pub attrs: AttrVec,
1362    pub id: NodeId,
1363    pub span: Span,
1364    pub ident: Ident,
1365    pub expr: Box<Expr>,
1366    pub is_shorthand: bool,
1367    pub is_placeholder: bool,
1368}
1369
1370#[derive(#[automatically_derived]
impl ::core::clone::Clone for BlockCheckMode {
    #[inline]
    fn clone(&self) -> BlockCheckMode {
        let _: ::core::clone::AssertParamIsClone<UnsafeSource>;
        *self
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for BlockCheckMode {
    #[inline]
    fn eq(&self, other: &BlockCheckMode) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr &&
            match (self, other) {
                (BlockCheckMode::Unsafe(__self_0),
                    BlockCheckMode::Unsafe(__arg1_0)) => __self_0 == __arg1_0,
                _ => true,
            }
    }
}PartialEq, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for BlockCheckMode {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        BlockCheckMode::Default => { 0usize }
                        BlockCheckMode::Unsafe(ref __binding_0) => { 1usize }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    BlockCheckMode::Default => {}
                    BlockCheckMode::Unsafe(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for BlockCheckMode {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => { BlockCheckMode::Default }
                    1usize => {
                        BlockCheckMode::Unsafe(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `BlockCheckMode`, expected 0..2, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for BlockCheckMode {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            BlockCheckMode::Default =>
                ::core::fmt::Formatter::write_str(f, "Default"),
            BlockCheckMode::Unsafe(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Unsafe",
                    &__self_0),
        }
    }
}Debug, #[automatically_derived]
impl ::core::marker::Copy for BlockCheckMode { }Copy, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for
            BlockCheckMode where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    BlockCheckMode::Default => {}
                    BlockCheckMode::Unsafe(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for BlockCheckMode where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    BlockCheckMode::Default => {}
                    BlockCheckMode::Unsafe(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
1371pub enum BlockCheckMode {
1372    Default,
1373    Unsafe(UnsafeSource),
1374}
1375
1376#[derive(#[automatically_derived]
impl ::core::clone::Clone for UnsafeSource {
    #[inline]
    fn clone(&self) -> UnsafeSource { *self }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for UnsafeSource {
    #[inline]
    fn eq(&self, other: &UnsafeSource) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr
    }
}PartialEq, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for UnsafeSource {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        UnsafeSource::CompilerGenerated => { 0usize }
                        UnsafeSource::UserProvided => { 1usize }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    UnsafeSource::CompilerGenerated => {}
                    UnsafeSource::UserProvided => {}
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for UnsafeSource {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => { UnsafeSource::CompilerGenerated }
                    1usize => { UnsafeSource::UserProvided }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `UnsafeSource`, expected 0..2, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for UnsafeSource {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::write_str(f,
            match self {
                UnsafeSource::CompilerGenerated => "CompilerGenerated",
                UnsafeSource::UserProvided => "UserProvided",
            })
    }
}Debug, #[automatically_derived]
impl ::core::marker::Copy for UnsafeSource { }Copy, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for UnsafeSource
            where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    UnsafeSource::CompilerGenerated => {}
                    UnsafeSource::UserProvided => {}
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for UnsafeSource where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    UnsafeSource::CompilerGenerated => {}
                    UnsafeSource::UserProvided => {}
                }
            }
        }
    };Walkable)]
1377pub enum UnsafeSource {
1378    CompilerGenerated,
1379    UserProvided,
1380}
1381
1382/// Track whether under `feature(min_generic_const_args)` this anon const
1383/// was explicitly disambiguated as an anon const or not through the use of
1384/// `const { ... }` syntax.
1385#[derive(#[automatically_derived]
impl ::core::clone::Clone for MgcaDisambiguation {
    #[inline]
    fn clone(&self) -> MgcaDisambiguation { *self }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for MgcaDisambiguation {
    #[inline]
    fn eq(&self, other: &MgcaDisambiguation) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr
    }
}PartialEq, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for MgcaDisambiguation {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        MgcaDisambiguation::AnonConst => { 0usize }
                        MgcaDisambiguation::Direct => { 1usize }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    MgcaDisambiguation::AnonConst => {}
                    MgcaDisambiguation::Direct => {}
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for MgcaDisambiguation {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => { MgcaDisambiguation::AnonConst }
                    1usize => { MgcaDisambiguation::Direct }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `MgcaDisambiguation`, expected 0..2, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for MgcaDisambiguation {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::write_str(f,
            match self {
                MgcaDisambiguation::AnonConst => "AnonConst",
                MgcaDisambiguation::Direct => "Direct",
            })
    }
}Debug, #[automatically_derived]
impl ::core::marker::Copy for MgcaDisambiguation { }Copy, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for
            MgcaDisambiguation where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    MgcaDisambiguation::AnonConst => {}
                    MgcaDisambiguation::Direct => {}
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for MgcaDisambiguation
            where __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    MgcaDisambiguation::AnonConst => {}
                    MgcaDisambiguation::Direct => {}
                }
            }
        }
    };Walkable)]
1386pub enum MgcaDisambiguation {
1387    AnonConst,
1388    Direct,
1389}
1390
1391/// A constant (expression) that's not an item or associated item,
1392/// but needs its own `DefId` for type-checking, const-eval, etc.
1393/// These are usually found nested inside types (e.g., array lengths)
1394/// or expressions (e.g., repeat counts), and also used to define
1395/// explicit discriminant values for enum variants.
1396#[derive(#[automatically_derived]
impl ::core::clone::Clone for AnonConst {
    #[inline]
    fn clone(&self) -> AnonConst {
        AnonConst {
            id: ::core::clone::Clone::clone(&self.id),
            value: ::core::clone::Clone::clone(&self.value),
            mgca_disambiguation: ::core::clone::Clone::clone(&self.mgca_disambiguation),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for AnonConst {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    AnonConst {
                        id: ref __binding_0,
                        value: ref __binding_1,
                        mgca_disambiguation: ref __binding_2 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for AnonConst {
            fn decode(__decoder: &mut __D) -> Self {
                AnonConst {
                    id: ::rustc_serialize::Decodable::decode(__decoder),
                    value: ::rustc_serialize::Decodable::decode(__decoder),
                    mgca_disambiguation: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for AnonConst {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field3_finish(f, "AnonConst",
            "id", &self.id, "value", &self.value, "mgca_disambiguation",
            &&self.mgca_disambiguation)
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for AnonConst
            where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    AnonConst {
                        id: ref __binding_0,
                        value: ref __binding_1,
                        mgca_disambiguation: ref __binding_2 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_2,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for AnonConst where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    AnonConst {
                        id: ref mut __binding_0,
                        value: ref mut __binding_1,
                        mgca_disambiguation: ref mut __binding_2 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_2,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
1397pub struct AnonConst {
1398    pub id: NodeId,
1399    pub value: Box<Expr>,
1400    pub mgca_disambiguation: MgcaDisambiguation,
1401}
1402
1403/// An expression.
1404#[derive(#[automatically_derived]
impl ::core::clone::Clone for Expr {
    #[inline]
    fn clone(&self) -> Expr {
        Expr {
            id: ::core::clone::Clone::clone(&self.id),
            kind: ::core::clone::Clone::clone(&self.kind),
            span: ::core::clone::Clone::clone(&self.span),
            attrs: ::core::clone::Clone::clone(&self.attrs),
            tokens: ::core::clone::Clone::clone(&self.tokens),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for Expr {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    Expr {
                        id: ref __binding_0,
                        kind: ref __binding_1,
                        span: ref __binding_2,
                        attrs: ref __binding_3,
                        tokens: ref __binding_4 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_3,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_4,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for Expr {
            fn decode(__decoder: &mut __D) -> Self {
                Expr {
                    id: ::rustc_serialize::Decodable::decode(__decoder),
                    kind: ::rustc_serialize::Decodable::decode(__decoder),
                    span: ::rustc_serialize::Decodable::decode(__decoder),
                    attrs: ::rustc_serialize::Decodable::decode(__decoder),
                    tokens: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for Expr {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field5_finish(f, "Expr", "id",
            &self.id, "kind", &self.kind, "span", &self.span, "attrs",
            &self.attrs, "tokens", &&self.tokens)
    }
}Debug)]
1405pub struct Expr {
1406    pub id: NodeId,
1407    pub kind: ExprKind,
1408    pub span: Span,
1409    pub attrs: AttrVec,
1410    pub tokens: Option<LazyAttrTokenStream>,
1411}
1412
1413impl Expr {
1414    /// Check if this expression is potentially a trivial const arg, i.e., one that can _potentially_
1415    /// be represented without an anon const in the HIR.
1416    ///
1417    /// This will unwrap at most one block level (curly braces). After that, if the expression
1418    /// is a path, it mostly dispatches to [`Path::is_potential_trivial_const_arg`].
1419    ///
1420    /// This function will only allow paths with no qself, before dispatching to the `Path`
1421    /// function of the same name.
1422    ///
1423    /// Does not ensure that the path resolves to a const param/item, the caller should check this.
1424    /// This also does not consider macros, so it's only correct after macro-expansion.
1425    pub fn is_potential_trivial_const_arg(&self) -> bool {
1426        let this = self.maybe_unwrap_block();
1427        if let ExprKind::Path(None, path) = &this.kind
1428            && path.is_potential_trivial_const_arg()
1429        {
1430            true
1431        } else {
1432            false
1433        }
1434    }
1435
1436    /// Returns an expression with (when possible) *one* outer brace removed
1437    pub fn maybe_unwrap_block(&self) -> &Expr {
1438        if let ExprKind::Block(block, None) = &self.kind
1439            && let [stmt] = block.stmts.as_slice()
1440            && let StmtKind::Expr(expr) = &stmt.kind
1441        {
1442            expr
1443        } else {
1444            self
1445        }
1446    }
1447
1448    /// Determines whether this expression is a macro call optionally wrapped in braces . If
1449    /// `already_stripped_block` is set then we do not attempt to peel off a layer of braces.
1450    ///
1451    /// Returns the [`NodeId`] of the macro call and whether a layer of braces has been peeled
1452    /// either before, or part of, this function.
1453    pub fn optionally_braced_mac_call(
1454        &self,
1455        already_stripped_block: bool,
1456    ) -> Option<(bool, NodeId)> {
1457        match &self.kind {
1458            ExprKind::Block(block, None)
1459                if let [stmt] = &*block.stmts
1460                    && !already_stripped_block =>
1461            {
1462                match &stmt.kind {
1463                    StmtKind::MacCall(_) => Some((true, stmt.id)),
1464                    StmtKind::Expr(expr) if let ExprKind::MacCall(_) = &expr.kind => {
1465                        Some((true, expr.id))
1466                    }
1467                    _ => None,
1468                }
1469            }
1470            ExprKind::MacCall(_) => Some((already_stripped_block, self.id)),
1471            _ => None,
1472        }
1473    }
1474
1475    pub fn to_bound(&self) -> Option<GenericBound> {
1476        match &self.kind {
1477            ExprKind::Path(None, path) => Some(GenericBound::Trait(PolyTraitRef::new(
1478                ThinVec::new(),
1479                path.clone(),
1480                TraitBoundModifiers::NONE,
1481                self.span,
1482                Parens::No,
1483            ))),
1484            _ => None,
1485        }
1486    }
1487
1488    pub fn peel_parens(&self) -> &Expr {
1489        let mut expr = self;
1490        while let ExprKind::Paren(inner) = &expr.kind {
1491            expr = inner;
1492        }
1493        expr
1494    }
1495
1496    pub fn peel_parens_and_refs(&self) -> &Expr {
1497        let mut expr = self;
1498        while let ExprKind::Paren(inner) | ExprKind::AddrOf(BorrowKind::Ref, _, inner) = &expr.kind
1499        {
1500            expr = inner;
1501        }
1502        expr
1503    }
1504
1505    /// Attempts to reparse as `Ty` (for diagnostic purposes).
1506    pub fn to_ty(&self) -> Option<Box<Ty>> {
1507        let kind = match &self.kind {
1508            // Trivial conversions.
1509            ExprKind::Path(qself, path) => TyKind::Path(qself.clone(), path.clone()),
1510            ExprKind::MacCall(mac) => TyKind::MacCall(mac.clone()),
1511
1512            ExprKind::Paren(expr) => expr.to_ty().map(TyKind::Paren)?,
1513
1514            ExprKind::AddrOf(BorrowKind::Ref, mutbl, expr) => {
1515                expr.to_ty().map(|ty| TyKind::Ref(None, MutTy { ty, mutbl: *mutbl }))?
1516            }
1517
1518            ExprKind::Repeat(expr, expr_len) => {
1519                expr.to_ty().map(|ty| TyKind::Array(ty, expr_len.clone()))?
1520            }
1521
1522            ExprKind::Array(exprs) if let [expr] = exprs.as_slice() => {
1523                expr.to_ty().map(TyKind::Slice)?
1524            }
1525
1526            ExprKind::Tup(exprs) => {
1527                let tys = exprs.iter().map(|expr| expr.to_ty()).collect::<Option<ThinVec<_>>>()?;
1528                TyKind::Tup(tys)
1529            }
1530
1531            // If binary operator is `Add` and both `lhs` and `rhs` are trait bounds,
1532            // then type of result is trait object.
1533            // Otherwise we don't assume the result type.
1534            ExprKind::Binary(binop, lhs, rhs) if binop.node == BinOpKind::Add => {
1535                let (Some(lhs), Some(rhs)) = (lhs.to_bound(), rhs.to_bound()) else {
1536                    return None;
1537                };
1538                TyKind::TraitObject(::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [lhs, rhs]))vec![lhs, rhs], TraitObjectSyntax::None)
1539            }
1540
1541            ExprKind::Underscore => TyKind::Infer,
1542
1543            // This expression doesn't look like a type syntactically.
1544            _ => return None,
1545        };
1546
1547        Some(Box::new(Ty { kind, id: self.id, span: self.span, tokens: None }))
1548    }
1549
1550    pub fn precedence(&self) -> ExprPrecedence {
1551        fn prefix_attrs_precedence(attrs: &AttrVec) -> ExprPrecedence {
1552            for attr in attrs {
1553                if let AttrStyle::Outer = attr.style {
1554                    return ExprPrecedence::Prefix;
1555                }
1556            }
1557            ExprPrecedence::Unambiguous
1558        }
1559
1560        match &self.kind {
1561            ExprKind::Closure(closure) => {
1562                match closure.fn_decl.output {
1563                    FnRetTy::Default(_) => ExprPrecedence::Jump,
1564                    FnRetTy::Ty(_) => prefix_attrs_precedence(&self.attrs),
1565                }
1566            }
1567
1568            ExprKind::Break(_ /*label*/, value)
1569            | ExprKind::Ret(value)
1570            | ExprKind::Yield(YieldKind::Prefix(value))
1571            | ExprKind::Yeet(value) => match value {
1572                Some(_) => ExprPrecedence::Jump,
1573                None => prefix_attrs_precedence(&self.attrs),
1574            },
1575
1576            ExprKind::Become(_) => ExprPrecedence::Jump,
1577
1578            // `Range` claims to have higher precedence than `Assign`, but `x .. x = x` fails to
1579            // parse, instead of parsing as `(x .. x) = x`. Giving `Range` a lower precedence
1580            // ensures that `pprust` will add parentheses in the right places to get the desired
1581            // parse.
1582            ExprKind::Range(..) => ExprPrecedence::Range,
1583
1584            // Binop-like expr kinds, handled by `AssocOp`.
1585            ExprKind::Binary(op, ..) => op.node.precedence(),
1586            ExprKind::Cast(..) => ExprPrecedence::Cast,
1587
1588            ExprKind::Assign(..) |
1589            ExprKind::AssignOp(..) => ExprPrecedence::Assign,
1590
1591            // Unary, prefix
1592            ExprKind::AddrOf(..)
1593            // Here `let pats = expr` has `let pats =` as a "unary" prefix of `expr`.
1594            // However, this is not exactly right. When `let _ = a` is the LHS of a binop we
1595            // need parens sometimes. E.g. we can print `(let _ = a) && b` as `let _ = a && b`
1596            // but we need to print `(let _ = a) < b` as-is with parens.
1597            | ExprKind::Let(..)
1598            | ExprKind::Unary(..) => ExprPrecedence::Prefix,
1599
1600            // Need parens if and only if there are prefix attributes.
1601            ExprKind::Array(_)
1602            | ExprKind::Await(..)
1603            | ExprKind::Use(..)
1604            | ExprKind::Block(..)
1605            | ExprKind::Call(..)
1606            | ExprKind::ConstBlock(_)
1607            | ExprKind::Continue(..)
1608            | ExprKind::Field(..)
1609            | ExprKind::ForLoop { .. }
1610            | ExprKind::FormatArgs(..)
1611            | ExprKind::Gen(..)
1612            | ExprKind::If(..)
1613            | ExprKind::IncludedBytes(..)
1614            | ExprKind::Index(..)
1615            | ExprKind::InlineAsm(..)
1616            | ExprKind::Lit(_)
1617            | ExprKind::Loop(..)
1618            | ExprKind::MacCall(..)
1619            | ExprKind::Match(..)
1620            | ExprKind::MethodCall(..)
1621            | ExprKind::OffsetOf(..)
1622            | ExprKind::Paren(..)
1623            | ExprKind::Path(..)
1624            | ExprKind::Repeat(..)
1625            | ExprKind::Struct(..)
1626            | ExprKind::Try(..)
1627            | ExprKind::TryBlock(..)
1628            | ExprKind::Tup(_)
1629            | ExprKind::Type(..)
1630            | ExprKind::Underscore
1631            | ExprKind::UnsafeBinderCast(..)
1632            | ExprKind::While(..)
1633            | ExprKind::Yield(YieldKind::Postfix(..))
1634            | ExprKind::Err(_)
1635            | ExprKind::Dummy => prefix_attrs_precedence(&self.attrs),
1636        }
1637    }
1638
1639    /// To a first-order approximation, is this a pattern?
1640    pub fn is_approximately_pattern(&self) -> bool {
1641        #[allow(non_exhaustive_omitted_patterns)] match &self.peel_parens().kind {
    ExprKind::Array(_) | ExprKind::Call(_, _) | ExprKind::Tup(_) |
        ExprKind::Lit(_) | ExprKind::Range(_, _, _) | ExprKind::Underscore |
        ExprKind::Path(_, _) | ExprKind::Struct(_) => true,
    _ => false,
}matches!(
1642            &self.peel_parens().kind,
1643            ExprKind::Array(_)
1644                | ExprKind::Call(_, _)
1645                | ExprKind::Tup(_)
1646                | ExprKind::Lit(_)
1647                | ExprKind::Range(_, _, _)
1648                | ExprKind::Underscore
1649                | ExprKind::Path(_, _)
1650                | ExprKind::Struct(_)
1651        )
1652    }
1653
1654    /// Creates a dummy `Expr`.
1655    ///
1656    /// Should only be used when it will be replaced afterwards or as a return value when an error was encountered.
1657    pub fn dummy() -> Expr {
1658        Expr {
1659            id: DUMMY_NODE_ID,
1660            kind: ExprKind::Dummy,
1661            span: DUMMY_SP,
1662            attrs: ThinVec::new(),
1663            tokens: None,
1664        }
1665    }
1666}
1667
1668impl From<Box<Expr>> for Expr {
1669    fn from(value: Box<Expr>) -> Self {
1670        *value
1671    }
1672}
1673
1674#[derive(#[automatically_derived]
impl ::core::clone::Clone for Closure {
    #[inline]
    fn clone(&self) -> Closure {
        Closure {
            binder: ::core::clone::Clone::clone(&self.binder),
            capture_clause: ::core::clone::Clone::clone(&self.capture_clause),
            constness: ::core::clone::Clone::clone(&self.constness),
            coroutine_kind: ::core::clone::Clone::clone(&self.coroutine_kind),
            movability: ::core::clone::Clone::clone(&self.movability),
            fn_decl: ::core::clone::Clone::clone(&self.fn_decl),
            body: ::core::clone::Clone::clone(&self.body),
            fn_decl_span: ::core::clone::Clone::clone(&self.fn_decl_span),
            fn_arg_span: ::core::clone::Clone::clone(&self.fn_arg_span),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for Closure {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    Closure {
                        binder: ref __binding_0,
                        capture_clause: ref __binding_1,
                        constness: ref __binding_2,
                        coroutine_kind: ref __binding_3,
                        movability: ref __binding_4,
                        fn_decl: ref __binding_5,
                        body: ref __binding_6,
                        fn_decl_span: ref __binding_7,
                        fn_arg_span: ref __binding_8 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_3,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_4,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_5,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_6,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_7,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_8,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for Closure {
            fn decode(__decoder: &mut __D) -> Self {
                Closure {
                    binder: ::rustc_serialize::Decodable::decode(__decoder),
                    capture_clause: ::rustc_serialize::Decodable::decode(__decoder),
                    constness: ::rustc_serialize::Decodable::decode(__decoder),
                    coroutine_kind: ::rustc_serialize::Decodable::decode(__decoder),
                    movability: ::rustc_serialize::Decodable::decode(__decoder),
                    fn_decl: ::rustc_serialize::Decodable::decode(__decoder),
                    body: ::rustc_serialize::Decodable::decode(__decoder),
                    fn_decl_span: ::rustc_serialize::Decodable::decode(__decoder),
                    fn_arg_span: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for Closure {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["binder", "capture_clause", "constness", "coroutine_kind",
                        "movability", "fn_decl", "body", "fn_decl_span",
                        "fn_arg_span"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.binder, &self.capture_clause, &self.constness,
                        &self.coroutine_kind, &self.movability, &self.fn_decl,
                        &self.body, &self.fn_decl_span, &&self.fn_arg_span];
        ::core::fmt::Formatter::debug_struct_fields_finish(f, "Closure",
            names, values)
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for Closure
            where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    Closure {
                        binder: ref __binding_0,
                        capture_clause: ref __binding_1,
                        constness: ref __binding_2,
                        coroutine_kind: ref __binding_3,
                        movability: ref __binding_4,
                        fn_decl: ref __binding_5,
                        body: ref __binding_6,
                        fn_decl_span: ref __binding_7,
                        fn_arg_span: ref __binding_8 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_2,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_3,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_4,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_5,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_6,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_7,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_8,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for Closure where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    Closure {
                        binder: ref mut __binding_0,
                        capture_clause: ref mut __binding_1,
                        constness: ref mut __binding_2,
                        coroutine_kind: ref mut __binding_3,
                        movability: ref mut __binding_4,
                        fn_decl: ref mut __binding_5,
                        body: ref mut __binding_6,
                        fn_decl_span: ref mut __binding_7,
                        fn_arg_span: ref mut __binding_8 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_2,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_3,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_4,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_5,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_6,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_7,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_8,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
1675pub struct Closure {
1676    pub binder: ClosureBinder,
1677    pub capture_clause: CaptureBy,
1678    pub constness: Const,
1679    pub coroutine_kind: Option<CoroutineKind>,
1680    pub movability: Movability,
1681    pub fn_decl: Box<FnDecl>,
1682    pub body: Box<Expr>,
1683    /// The span of the declaration block: 'move |...| -> ...'
1684    pub fn_decl_span: Span,
1685    /// The span of the argument block `|...|`
1686    pub fn_arg_span: Span,
1687}
1688
1689/// Limit types of a range (inclusive or exclusive).
1690#[derive(#[automatically_derived]
impl ::core::marker::Copy for RangeLimits { }Copy, #[automatically_derived]
impl ::core::clone::Clone for RangeLimits {
    #[inline]
    fn clone(&self) -> RangeLimits { *self }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for RangeLimits {
    #[inline]
    fn eq(&self, other: &RangeLimits) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr
    }
}PartialEq, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for RangeLimits {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        RangeLimits::HalfOpen => { 0usize }
                        RangeLimits::Closed => { 1usize }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    RangeLimits::HalfOpen => {}
                    RangeLimits::Closed => {}
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for RangeLimits {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => { RangeLimits::HalfOpen }
                    1usize => { RangeLimits::Closed }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `RangeLimits`, expected 0..2, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for RangeLimits {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::write_str(f,
            match self {
                RangeLimits::HalfOpen => "HalfOpen",
                RangeLimits::Closed => "Closed",
            })
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for RangeLimits
            where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    RangeLimits::HalfOpen => {}
                    RangeLimits::Closed => {}
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for RangeLimits where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    RangeLimits::HalfOpen => {}
                    RangeLimits::Closed => {}
                }
            }
        }
    };Walkable)]
1691pub enum RangeLimits {
1692    /// Inclusive at the beginning, exclusive at the end.
1693    HalfOpen,
1694    /// Inclusive at the beginning and end.
1695    Closed,
1696}
1697
1698impl RangeLimits {
1699    pub fn as_str(&self) -> &'static str {
1700        match self {
1701            RangeLimits::HalfOpen => "..",
1702            RangeLimits::Closed => "..=",
1703        }
1704    }
1705}
1706
1707/// A method call (e.g. `x.foo::<Bar, Baz>(a, b, c)`).
1708#[derive(#[automatically_derived]
impl ::core::clone::Clone for MethodCall {
    #[inline]
    fn clone(&self) -> MethodCall {
        MethodCall {
            seg: ::core::clone::Clone::clone(&self.seg),
            receiver: ::core::clone::Clone::clone(&self.receiver),
            args: ::core::clone::Clone::clone(&self.args),
            span: ::core::clone::Clone::clone(&self.span),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for MethodCall {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    MethodCall {
                        seg: ref __binding_0,
                        receiver: ref __binding_1,
                        args: ref __binding_2,
                        span: ref __binding_3 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_3,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for MethodCall {
            fn decode(__decoder: &mut __D) -> Self {
                MethodCall {
                    seg: ::rustc_serialize::Decodable::decode(__decoder),
                    receiver: ::rustc_serialize::Decodable::decode(__decoder),
                    args: ::rustc_serialize::Decodable::decode(__decoder),
                    span: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for MethodCall {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field4_finish(f, "MethodCall",
            "seg", &self.seg, "receiver", &self.receiver, "args", &self.args,
            "span", &&self.span)
    }
}Debug)]
1709pub struct MethodCall {
1710    /// The method name and its generic arguments, e.g. `foo::<Bar, Baz>`.
1711    pub seg: PathSegment,
1712    /// The receiver, e.g. `x`.
1713    pub receiver: Box<Expr>,
1714    /// The arguments, e.g. `a, b, c`.
1715    pub args: ThinVec<Box<Expr>>,
1716    /// The span of the function, without the dot and receiver e.g. `foo::<Bar,
1717    /// Baz>(a, b, c)`.
1718    pub span: Span,
1719}
1720
1721#[derive(#[automatically_derived]
impl ::core::clone::Clone for StructRest {
    #[inline]
    fn clone(&self) -> StructRest {
        match self {
            StructRest::Base(__self_0) =>
                StructRest::Base(::core::clone::Clone::clone(__self_0)),
            StructRest::Rest(__self_0) =>
                StructRest::Rest(::core::clone::Clone::clone(__self_0)),
            StructRest::None => StructRest::None,
            StructRest::NoneWithError(__self_0) =>
                StructRest::NoneWithError(::core::clone::Clone::clone(__self_0)),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for StructRest {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        StructRest::Base(ref __binding_0) => { 0usize }
                        StructRest::Rest(ref __binding_0) => { 1usize }
                        StructRest::None => { 2usize }
                        StructRest::NoneWithError(ref __binding_0) => { 3usize }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    StructRest::Base(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    StructRest::Rest(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    StructRest::None => {}
                    StructRest::NoneWithError(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for StructRest {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => {
                        StructRest::Base(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    1usize => {
                        StructRest::Rest(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    2usize => { StructRest::None }
                    3usize => {
                        StructRest::NoneWithError(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `StructRest`, expected 0..4, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for StructRest {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            StructRest::Base(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Base",
                    &__self_0),
            StructRest::Rest(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Rest",
                    &__self_0),
            StructRest::None => ::core::fmt::Formatter::write_str(f, "None"),
            StructRest::NoneWithError(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "NoneWithError", &__self_0),
        }
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for StructRest
            where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    StructRest::Base(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    StructRest::Rest(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    StructRest::None => {}
                    StructRest::NoneWithError(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for StructRest where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    StructRest::Base(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                    StructRest::Rest(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                    StructRest::None => {}
                    StructRest::NoneWithError(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
1722pub enum StructRest {
1723    /// `..x`.
1724    Base(Box<Expr>),
1725    /// `..`.
1726    Rest(Span),
1727    /// No trailing `..` or expression.
1728    None,
1729    /// No trailing `..` or expression, and also, a parse error occurred inside the struct braces.
1730    ///
1731    /// This struct should be treated similarly to as if it had an `..` in it,
1732    /// in particular rather than reporting missing fields, because the parse error
1733    /// makes which fields the struct was intended to have not fully known.
1734    NoneWithError(ErrorGuaranteed),
1735}
1736
1737#[derive(#[automatically_derived]
impl ::core::clone::Clone for StructExpr {
    #[inline]
    fn clone(&self) -> StructExpr {
        StructExpr {
            qself: ::core::clone::Clone::clone(&self.qself),
            path: ::core::clone::Clone::clone(&self.path),
            fields: ::core::clone::Clone::clone(&self.fields),
            rest: ::core::clone::Clone::clone(&self.rest),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for StructExpr {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    StructExpr {
                        qself: ref __binding_0,
                        path: ref __binding_1,
                        fields: ref __binding_2,
                        rest: ref __binding_3 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_3,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for StructExpr {
            fn decode(__decoder: &mut __D) -> Self {
                StructExpr {
                    qself: ::rustc_serialize::Decodable::decode(__decoder),
                    path: ::rustc_serialize::Decodable::decode(__decoder),
                    fields: ::rustc_serialize::Decodable::decode(__decoder),
                    rest: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for StructExpr {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field4_finish(f, "StructExpr",
            "qself", &self.qself, "path", &self.path, "fields", &self.fields,
            "rest", &&self.rest)
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for StructExpr
            where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    StructExpr {
                        qself: ref __binding_0,
                        path: ref __binding_1,
                        fields: ref __binding_2,
                        rest: ref __binding_3 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_2,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_3,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for StructExpr where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    StructExpr {
                        qself: ref mut __binding_0,
                        path: ref mut __binding_1,
                        fields: ref mut __binding_2,
                        rest: ref mut __binding_3 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_2,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_3,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
1738pub struct StructExpr {
1739    pub qself: Option<Box<QSelf>>,
1740    pub path: Path,
1741    pub fields: ThinVec<ExprField>,
1742    pub rest: StructRest,
1743}
1744
1745// Adding a new variant? Please update `test_expr` in `tests/ui/macros/stringify.rs`.
1746#[derive(#[automatically_derived]
impl ::core::clone::Clone for ExprKind {
    #[inline]
    fn clone(&self) -> ExprKind {
        match self {
            ExprKind::Array(__self_0) =>
                ExprKind::Array(::core::clone::Clone::clone(__self_0)),
            ExprKind::ConstBlock(__self_0) =>
                ExprKind::ConstBlock(::core::clone::Clone::clone(__self_0)),
            ExprKind::Call(__self_0, __self_1) =>
                ExprKind::Call(::core::clone::Clone::clone(__self_0),
                    ::core::clone::Clone::clone(__self_1)),
            ExprKind::MethodCall(__self_0) =>
                ExprKind::MethodCall(::core::clone::Clone::clone(__self_0)),
            ExprKind::Tup(__self_0) =>
                ExprKind::Tup(::core::clone::Clone::clone(__self_0)),
            ExprKind::Binary(__self_0, __self_1, __self_2) =>
                ExprKind::Binary(::core::clone::Clone::clone(__self_0),
                    ::core::clone::Clone::clone(__self_1),
                    ::core::clone::Clone::clone(__self_2)),
            ExprKind::Unary(__self_0, __self_1) =>
                ExprKind::Unary(::core::clone::Clone::clone(__self_0),
                    ::core::clone::Clone::clone(__self_1)),
            ExprKind::Lit(__self_0) =>
                ExprKind::Lit(::core::clone::Clone::clone(__self_0)),
            ExprKind::Cast(__self_0, __self_1) =>
                ExprKind::Cast(::core::clone::Clone::clone(__self_0),
                    ::core::clone::Clone::clone(__self_1)),
            ExprKind::Type(__self_0, __self_1) =>
                ExprKind::Type(::core::clone::Clone::clone(__self_0),
                    ::core::clone::Clone::clone(__self_1)),
            ExprKind::Let(__self_0, __self_1, __self_2, __self_3) =>
                ExprKind::Let(::core::clone::Clone::clone(__self_0),
                    ::core::clone::Clone::clone(__self_1),
                    ::core::clone::Clone::clone(__self_2),
                    ::core::clone::Clone::clone(__self_3)),
            ExprKind::If(__self_0, __self_1, __self_2) =>
                ExprKind::If(::core::clone::Clone::clone(__self_0),
                    ::core::clone::Clone::clone(__self_1),
                    ::core::clone::Clone::clone(__self_2)),
            ExprKind::While(__self_0, __self_1, __self_2) =>
                ExprKind::While(::core::clone::Clone::clone(__self_0),
                    ::core::clone::Clone::clone(__self_1),
                    ::core::clone::Clone::clone(__self_2)),
            ExprKind::ForLoop {
                pat: __self_0,
                iter: __self_1,
                body: __self_2,
                label: __self_3,
                kind: __self_4 } =>
                ExprKind::ForLoop {
                    pat: ::core::clone::Clone::clone(__self_0),
                    iter: ::core::clone::Clone::clone(__self_1),
                    body: ::core::clone::Clone::clone(__self_2),
                    label: ::core::clone::Clone::clone(__self_3),
                    kind: ::core::clone::Clone::clone(__self_4),
                },
            ExprKind::Loop(__self_0, __self_1, __self_2) =>
                ExprKind::Loop(::core::clone::Clone::clone(__self_0),
                    ::core::clone::Clone::clone(__self_1),
                    ::core::clone::Clone::clone(__self_2)),
            ExprKind::Match(__self_0, __self_1, __self_2) =>
                ExprKind::Match(::core::clone::Clone::clone(__self_0),
                    ::core::clone::Clone::clone(__self_1),
                    ::core::clone::Clone::clone(__self_2)),
            ExprKind::Closure(__self_0) =>
                ExprKind::Closure(::core::clone::Clone::clone(__self_0)),
            ExprKind::Block(__self_0, __self_1) =>
                ExprKind::Block(::core::clone::Clone::clone(__self_0),
                    ::core::clone::Clone::clone(__self_1)),
            ExprKind::Gen(__self_0, __self_1, __self_2, __self_3) =>
                ExprKind::Gen(::core::clone::Clone::clone(__self_0),
                    ::core::clone::Clone::clone(__self_1),
                    ::core::clone::Clone::clone(__self_2),
                    ::core::clone::Clone::clone(__self_3)),
            ExprKind::Await(__self_0, __self_1) =>
                ExprKind::Await(::core::clone::Clone::clone(__self_0),
                    ::core::clone::Clone::clone(__self_1)),
            ExprKind::Use(__self_0, __self_1) =>
                ExprKind::Use(::core::clone::Clone::clone(__self_0),
                    ::core::clone::Clone::clone(__self_1)),
            ExprKind::TryBlock(__self_0, __self_1) =>
                ExprKind::TryBlock(::core::clone::Clone::clone(__self_0),
                    ::core::clone::Clone::clone(__self_1)),
            ExprKind::Assign(__self_0, __self_1, __self_2) =>
                ExprKind::Assign(::core::clone::Clone::clone(__self_0),
                    ::core::clone::Clone::clone(__self_1),
                    ::core::clone::Clone::clone(__self_2)),
            ExprKind::AssignOp(__self_0, __self_1, __self_2) =>
                ExprKind::AssignOp(::core::clone::Clone::clone(__self_0),
                    ::core::clone::Clone::clone(__self_1),
                    ::core::clone::Clone::clone(__self_2)),
            ExprKind::Field(__self_0, __self_1) =>
                ExprKind::Field(::core::clone::Clone::clone(__self_0),
                    ::core::clone::Clone::clone(__self_1)),
            ExprKind::Index(__self_0, __self_1, __self_2) =>
                ExprKind::Index(::core::clone::Clone::clone(__self_0),
                    ::core::clone::Clone::clone(__self_1),
                    ::core::clone::Clone::clone(__self_2)),
            ExprKind::Range(__self_0, __self_1, __self_2) =>
                ExprKind::Range(::core::clone::Clone::clone(__self_0),
                    ::core::clone::Clone::clone(__self_1),
                    ::core::clone::Clone::clone(__self_2)),
            ExprKind::Underscore => ExprKind::Underscore,
            ExprKind::Path(__self_0, __self_1) =>
                ExprKind::Path(::core::clone::Clone::clone(__self_0),
                    ::core::clone::Clone::clone(__self_1)),
            ExprKind::AddrOf(__self_0, __self_1, __self_2) =>
                ExprKind::AddrOf(::core::clone::Clone::clone(__self_0),
                    ::core::clone::Clone::clone(__self_1),
                    ::core::clone::Clone::clone(__self_2)),
            ExprKind::Break(__self_0, __self_1) =>
                ExprKind::Break(::core::clone::Clone::clone(__self_0),
                    ::core::clone::Clone::clone(__self_1)),
            ExprKind::Continue(__self_0) =>
                ExprKind::Continue(::core::clone::Clone::clone(__self_0)),
            ExprKind::Ret(__self_0) =>
                ExprKind::Ret(::core::clone::Clone::clone(__self_0)),
            ExprKind::InlineAsm(__self_0) =>
                ExprKind::InlineAsm(::core::clone::Clone::clone(__self_0)),
            ExprKind::OffsetOf(__self_0, __self_1) =>
                ExprKind::OffsetOf(::core::clone::Clone::clone(__self_0),
                    ::core::clone::Clone::clone(__self_1)),
            ExprKind::MacCall(__self_0) =>
                ExprKind::MacCall(::core::clone::Clone::clone(__self_0)),
            ExprKind::Struct(__self_0) =>
                ExprKind::Struct(::core::clone::Clone::clone(__self_0)),
            ExprKind::Repeat(__self_0, __self_1) =>
                ExprKind::Repeat(::core::clone::Clone::clone(__self_0),
                    ::core::clone::Clone::clone(__self_1)),
            ExprKind::Paren(__self_0) =>
                ExprKind::Paren(::core::clone::Clone::clone(__self_0)),
            ExprKind::Try(__self_0) =>
                ExprKind::Try(::core::clone::Clone::clone(__self_0)),
            ExprKind::Yield(__self_0) =>
                ExprKind::Yield(::core::clone::Clone::clone(__self_0)),
            ExprKind::Yeet(__self_0) =>
                ExprKind::Yeet(::core::clone::Clone::clone(__self_0)),
            ExprKind::Become(__self_0) =>
                ExprKind::Become(::core::clone::Clone::clone(__self_0)),
            ExprKind::IncludedBytes(__self_0) =>
                ExprKind::IncludedBytes(::core::clone::Clone::clone(__self_0)),
            ExprKind::FormatArgs(__self_0) =>
                ExprKind::FormatArgs(::core::clone::Clone::clone(__self_0)),
            ExprKind::UnsafeBinderCast(__self_0, __self_1, __self_2) =>
                ExprKind::UnsafeBinderCast(::core::clone::Clone::clone(__self_0),
                    ::core::clone::Clone::clone(__self_1),
                    ::core::clone::Clone::clone(__self_2)),
            ExprKind::Err(__self_0) =>
                ExprKind::Err(::core::clone::Clone::clone(__self_0)),
            ExprKind::Dummy => ExprKind::Dummy,
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for ExprKind {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        ExprKind::Array(ref __binding_0) => { 0usize }
                        ExprKind::ConstBlock(ref __binding_0) => { 1usize }
                        ExprKind::Call(ref __binding_0, ref __binding_1) => {
                            2usize
                        }
                        ExprKind::MethodCall(ref __binding_0) => { 3usize }
                        ExprKind::Tup(ref __binding_0) => { 4usize }
                        ExprKind::Binary(ref __binding_0, ref __binding_1,
                            ref __binding_2) => {
                            5usize
                        }
                        ExprKind::Unary(ref __binding_0, ref __binding_1) => {
                            6usize
                        }
                        ExprKind::Lit(ref __binding_0) => { 7usize }
                        ExprKind::Cast(ref __binding_0, ref __binding_1) => {
                            8usize
                        }
                        ExprKind::Type(ref __binding_0, ref __binding_1) => {
                            9usize
                        }
                        ExprKind::Let(ref __binding_0, ref __binding_1,
                            ref __binding_2, ref __binding_3) => {
                            10usize
                        }
                        ExprKind::If(ref __binding_0, ref __binding_1,
                            ref __binding_2) => {
                            11usize
                        }
                        ExprKind::While(ref __binding_0, ref __binding_1,
                            ref __binding_2) => {
                            12usize
                        }
                        ExprKind::ForLoop {
                            pat: ref __binding_0,
                            iter: ref __binding_1,
                            body: ref __binding_2,
                            label: ref __binding_3,
                            kind: ref __binding_4 } => {
                            13usize
                        }
                        ExprKind::Loop(ref __binding_0, ref __binding_1,
                            ref __binding_2) => {
                            14usize
                        }
                        ExprKind::Match(ref __binding_0, ref __binding_1,
                            ref __binding_2) => {
                            15usize
                        }
                        ExprKind::Closure(ref __binding_0) => { 16usize }
                        ExprKind::Block(ref __binding_0, ref __binding_1) => {
                            17usize
                        }
                        ExprKind::Gen(ref __binding_0, ref __binding_1,
                            ref __binding_2, ref __binding_3) => {
                            18usize
                        }
                        ExprKind::Await(ref __binding_0, ref __binding_1) => {
                            19usize
                        }
                        ExprKind::Use(ref __binding_0, ref __binding_1) => {
                            20usize
                        }
                        ExprKind::TryBlock(ref __binding_0, ref __binding_1) => {
                            21usize
                        }
                        ExprKind::Assign(ref __binding_0, ref __binding_1,
                            ref __binding_2) => {
                            22usize
                        }
                        ExprKind::AssignOp(ref __binding_0, ref __binding_1,
                            ref __binding_2) => {
                            23usize
                        }
                        ExprKind::Field(ref __binding_0, ref __binding_1) => {
                            24usize
                        }
                        ExprKind::Index(ref __binding_0, ref __binding_1,
                            ref __binding_2) => {
                            25usize
                        }
                        ExprKind::Range(ref __binding_0, ref __binding_1,
                            ref __binding_2) => {
                            26usize
                        }
                        ExprKind::Underscore => { 27usize }
                        ExprKind::Path(ref __binding_0, ref __binding_1) => {
                            28usize
                        }
                        ExprKind::AddrOf(ref __binding_0, ref __binding_1,
                            ref __binding_2) => {
                            29usize
                        }
                        ExprKind::Break(ref __binding_0, ref __binding_1) => {
                            30usize
                        }
                        ExprKind::Continue(ref __binding_0) => { 31usize }
                        ExprKind::Ret(ref __binding_0) => { 32usize }
                        ExprKind::InlineAsm(ref __binding_0) => { 33usize }
                        ExprKind::OffsetOf(ref __binding_0, ref __binding_1) => {
                            34usize
                        }
                        ExprKind::MacCall(ref __binding_0) => { 35usize }
                        ExprKind::Struct(ref __binding_0) => { 36usize }
                        ExprKind::Repeat(ref __binding_0, ref __binding_1) => {
                            37usize
                        }
                        ExprKind::Paren(ref __binding_0) => { 38usize }
                        ExprKind::Try(ref __binding_0) => { 39usize }
                        ExprKind::Yield(ref __binding_0) => { 40usize }
                        ExprKind::Yeet(ref __binding_0) => { 41usize }
                        ExprKind::Become(ref __binding_0) => { 42usize }
                        ExprKind::IncludedBytes(ref __binding_0) => { 43usize }
                        ExprKind::FormatArgs(ref __binding_0) => { 44usize }
                        ExprKind::UnsafeBinderCast(ref __binding_0, ref __binding_1,
                            ref __binding_2) => {
                            45usize
                        }
                        ExprKind::Err(ref __binding_0) => { 46usize }
                        ExprKind::Dummy => { 47usize }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    ExprKind::Array(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    ExprKind::ConstBlock(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    ExprKind::Call(ref __binding_0, ref __binding_1) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                    }
                    ExprKind::MethodCall(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    ExprKind::Tup(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    ExprKind::Binary(ref __binding_0, ref __binding_1,
                        ref __binding_2) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                    }
                    ExprKind::Unary(ref __binding_0, ref __binding_1) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                    }
                    ExprKind::Lit(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    ExprKind::Cast(ref __binding_0, ref __binding_1) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                    }
                    ExprKind::Type(ref __binding_0, ref __binding_1) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                    }
                    ExprKind::Let(ref __binding_0, ref __binding_1,
                        ref __binding_2, ref __binding_3) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_3,
                            __encoder);
                    }
                    ExprKind::If(ref __binding_0, ref __binding_1,
                        ref __binding_2) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                    }
                    ExprKind::While(ref __binding_0, ref __binding_1,
                        ref __binding_2) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                    }
                    ExprKind::ForLoop {
                        pat: ref __binding_0,
                        iter: ref __binding_1,
                        body: ref __binding_2,
                        label: ref __binding_3,
                        kind: ref __binding_4 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_3,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_4,
                            __encoder);
                    }
                    ExprKind::Loop(ref __binding_0, ref __binding_1,
                        ref __binding_2) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                    }
                    ExprKind::Match(ref __binding_0, ref __binding_1,
                        ref __binding_2) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                    }
                    ExprKind::Closure(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    ExprKind::Block(ref __binding_0, ref __binding_1) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                    }
                    ExprKind::Gen(ref __binding_0, ref __binding_1,
                        ref __binding_2, ref __binding_3) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_3,
                            __encoder);
                    }
                    ExprKind::Await(ref __binding_0, ref __binding_1) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                    }
                    ExprKind::Use(ref __binding_0, ref __binding_1) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                    }
                    ExprKind::TryBlock(ref __binding_0, ref __binding_1) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                    }
                    ExprKind::Assign(ref __binding_0, ref __binding_1,
                        ref __binding_2) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                    }
                    ExprKind::AssignOp(ref __binding_0, ref __binding_1,
                        ref __binding_2) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                    }
                    ExprKind::Field(ref __binding_0, ref __binding_1) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                    }
                    ExprKind::Index(ref __binding_0, ref __binding_1,
                        ref __binding_2) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                    }
                    ExprKind::Range(ref __binding_0, ref __binding_1,
                        ref __binding_2) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                    }
                    ExprKind::Underscore => {}
                    ExprKind::Path(ref __binding_0, ref __binding_1) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                    }
                    ExprKind::AddrOf(ref __binding_0, ref __binding_1,
                        ref __binding_2) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                    }
                    ExprKind::Break(ref __binding_0, ref __binding_1) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                    }
                    ExprKind::Continue(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    ExprKind::Ret(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    ExprKind::InlineAsm(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    ExprKind::OffsetOf(ref __binding_0, ref __binding_1) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                    }
                    ExprKind::MacCall(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    ExprKind::Struct(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    ExprKind::Repeat(ref __binding_0, ref __binding_1) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                    }
                    ExprKind::Paren(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    ExprKind::Try(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    ExprKind::Yield(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    ExprKind::Yeet(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    ExprKind::Become(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    ExprKind::IncludedBytes(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    ExprKind::FormatArgs(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    ExprKind::UnsafeBinderCast(ref __binding_0, ref __binding_1,
                        ref __binding_2) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                    }
                    ExprKind::Err(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    ExprKind::Dummy => {}
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for ExprKind {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => {
                        ExprKind::Array(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    1usize => {
                        ExprKind::ConstBlock(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    2usize => {
                        ExprKind::Call(::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder))
                    }
                    3usize => {
                        ExprKind::MethodCall(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    4usize => {
                        ExprKind::Tup(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    5usize => {
                        ExprKind::Binary(::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder))
                    }
                    6usize => {
                        ExprKind::Unary(::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder))
                    }
                    7usize => {
                        ExprKind::Lit(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    8usize => {
                        ExprKind::Cast(::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder))
                    }
                    9usize => {
                        ExprKind::Type(::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder))
                    }
                    10usize => {
                        ExprKind::Let(::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder))
                    }
                    11usize => {
                        ExprKind::If(::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder))
                    }
                    12usize => {
                        ExprKind::While(::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder))
                    }
                    13usize => {
                        ExprKind::ForLoop {
                            pat: ::rustc_serialize::Decodable::decode(__decoder),
                            iter: ::rustc_serialize::Decodable::decode(__decoder),
                            body: ::rustc_serialize::Decodable::decode(__decoder),
                            label: ::rustc_serialize::Decodable::decode(__decoder),
                            kind: ::rustc_serialize::Decodable::decode(__decoder),
                        }
                    }
                    14usize => {
                        ExprKind::Loop(::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder))
                    }
                    15usize => {
                        ExprKind::Match(::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder))
                    }
                    16usize => {
                        ExprKind::Closure(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    17usize => {
                        ExprKind::Block(::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder))
                    }
                    18usize => {
                        ExprKind::Gen(::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder))
                    }
                    19usize => {
                        ExprKind::Await(::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder))
                    }
                    20usize => {
                        ExprKind::Use(::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder))
                    }
                    21usize => {
                        ExprKind::TryBlock(::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder))
                    }
                    22usize => {
                        ExprKind::Assign(::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder))
                    }
                    23usize => {
                        ExprKind::AssignOp(::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder))
                    }
                    24usize => {
                        ExprKind::Field(::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder))
                    }
                    25usize => {
                        ExprKind::Index(::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder))
                    }
                    26usize => {
                        ExprKind::Range(::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder))
                    }
                    27usize => { ExprKind::Underscore }
                    28usize => {
                        ExprKind::Path(::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder))
                    }
                    29usize => {
                        ExprKind::AddrOf(::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder))
                    }
                    30usize => {
                        ExprKind::Break(::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder))
                    }
                    31usize => {
                        ExprKind::Continue(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    32usize => {
                        ExprKind::Ret(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    33usize => {
                        ExprKind::InlineAsm(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    34usize => {
                        ExprKind::OffsetOf(::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder))
                    }
                    35usize => {
                        ExprKind::MacCall(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    36usize => {
                        ExprKind::Struct(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    37usize => {
                        ExprKind::Repeat(::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder))
                    }
                    38usize => {
                        ExprKind::Paren(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    39usize => {
                        ExprKind::Try(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    40usize => {
                        ExprKind::Yield(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    41usize => {
                        ExprKind::Yeet(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    42usize => {
                        ExprKind::Become(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    43usize => {
                        ExprKind::IncludedBytes(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    44usize => {
                        ExprKind::FormatArgs(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    45usize => {
                        ExprKind::UnsafeBinderCast(::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder))
                    }
                    46usize => {
                        ExprKind::Err(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    47usize => { ExprKind::Dummy }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `ExprKind`, expected 0..48, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for ExprKind {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            ExprKind::Array(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Array",
                    &__self_0),
            ExprKind::ConstBlock(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "ConstBlock", &__self_0),
            ExprKind::Call(__self_0, __self_1) =>
                ::core::fmt::Formatter::debug_tuple_field2_finish(f, "Call",
                    __self_0, &__self_1),
            ExprKind::MethodCall(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "MethodCall", &__self_0),
            ExprKind::Tup(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Tup",
                    &__self_0),
            ExprKind::Binary(__self_0, __self_1, __self_2) =>
                ::core::fmt::Formatter::debug_tuple_field3_finish(f, "Binary",
                    __self_0, __self_1, &__self_2),
            ExprKind::Unary(__self_0, __self_1) =>
                ::core::fmt::Formatter::debug_tuple_field2_finish(f, "Unary",
                    __self_0, &__self_1),
            ExprKind::Lit(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Lit",
                    &__self_0),
            ExprKind::Cast(__self_0, __self_1) =>
                ::core::fmt::Formatter::debug_tuple_field2_finish(f, "Cast",
                    __self_0, &__self_1),
            ExprKind::Type(__self_0, __self_1) =>
                ::core::fmt::Formatter::debug_tuple_field2_finish(f, "Type",
                    __self_0, &__self_1),
            ExprKind::Let(__self_0, __self_1, __self_2, __self_3) =>
                ::core::fmt::Formatter::debug_tuple_field4_finish(f, "Let",
                    __self_0, __self_1, __self_2, &__self_3),
            ExprKind::If(__self_0, __self_1, __self_2) =>
                ::core::fmt::Formatter::debug_tuple_field3_finish(f, "If",
                    __self_0, __self_1, &__self_2),
            ExprKind::While(__self_0, __self_1, __self_2) =>
                ::core::fmt::Formatter::debug_tuple_field3_finish(f, "While",
                    __self_0, __self_1, &__self_2),
            ExprKind::ForLoop {
                pat: __self_0,
                iter: __self_1,
                body: __self_2,
                label: __self_3,
                kind: __self_4 } =>
                ::core::fmt::Formatter::debug_struct_field5_finish(f,
                    "ForLoop", "pat", __self_0, "iter", __self_1, "body",
                    __self_2, "label", __self_3, "kind", &__self_4),
            ExprKind::Loop(__self_0, __self_1, __self_2) =>
                ::core::fmt::Formatter::debug_tuple_field3_finish(f, "Loop",
                    __self_0, __self_1, &__self_2),
            ExprKind::Match(__self_0, __self_1, __self_2) =>
                ::core::fmt::Formatter::debug_tuple_field3_finish(f, "Match",
                    __self_0, __self_1, &__self_2),
            ExprKind::Closure(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "Closure", &__self_0),
            ExprKind::Block(__self_0, __self_1) =>
                ::core::fmt::Formatter::debug_tuple_field2_finish(f, "Block",
                    __self_0, &__self_1),
            ExprKind::Gen(__self_0, __self_1, __self_2, __self_3) =>
                ::core::fmt::Formatter::debug_tuple_field4_finish(f, "Gen",
                    __self_0, __self_1, __self_2, &__self_3),
            ExprKind::Await(__self_0, __self_1) =>
                ::core::fmt::Formatter::debug_tuple_field2_finish(f, "Await",
                    __self_0, &__self_1),
            ExprKind::Use(__self_0, __self_1) =>
                ::core::fmt::Formatter::debug_tuple_field2_finish(f, "Use",
                    __self_0, &__self_1),
            ExprKind::TryBlock(__self_0, __self_1) =>
                ::core::fmt::Formatter::debug_tuple_field2_finish(f,
                    "TryBlock", __self_0, &__self_1),
            ExprKind::Assign(__self_0, __self_1, __self_2) =>
                ::core::fmt::Formatter::debug_tuple_field3_finish(f, "Assign",
                    __self_0, __self_1, &__self_2),
            ExprKind::AssignOp(__self_0, __self_1, __self_2) =>
                ::core::fmt::Formatter::debug_tuple_field3_finish(f,
                    "AssignOp", __self_0, __self_1, &__self_2),
            ExprKind::Field(__self_0, __self_1) =>
                ::core::fmt::Formatter::debug_tuple_field2_finish(f, "Field",
                    __self_0, &__self_1),
            ExprKind::Index(__self_0, __self_1, __self_2) =>
                ::core::fmt::Formatter::debug_tuple_field3_finish(f, "Index",
                    __self_0, __self_1, &__self_2),
            ExprKind::Range(__self_0, __self_1, __self_2) =>
                ::core::fmt::Formatter::debug_tuple_field3_finish(f, "Range",
                    __self_0, __self_1, &__self_2),
            ExprKind::Underscore =>
                ::core::fmt::Formatter::write_str(f, "Underscore"),
            ExprKind::Path(__self_0, __self_1) =>
                ::core::fmt::Formatter::debug_tuple_field2_finish(f, "Path",
                    __self_0, &__self_1),
            ExprKind::AddrOf(__self_0, __self_1, __self_2) =>
                ::core::fmt::Formatter::debug_tuple_field3_finish(f, "AddrOf",
                    __self_0, __self_1, &__self_2),
            ExprKind::Break(__self_0, __self_1) =>
                ::core::fmt::Formatter::debug_tuple_field2_finish(f, "Break",
                    __self_0, &__self_1),
            ExprKind::Continue(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "Continue", &__self_0),
            ExprKind::Ret(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Ret",
                    &__self_0),
            ExprKind::InlineAsm(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "InlineAsm", &__self_0),
            ExprKind::OffsetOf(__self_0, __self_1) =>
                ::core::fmt::Formatter::debug_tuple_field2_finish(f,
                    "OffsetOf", __self_0, &__self_1),
            ExprKind::MacCall(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "MacCall", &__self_0),
            ExprKind::Struct(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Struct",
                    &__self_0),
            ExprKind::Repeat(__self_0, __self_1) =>
                ::core::fmt::Formatter::debug_tuple_field2_finish(f, "Repeat",
                    __self_0, &__self_1),
            ExprKind::Paren(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Paren",
                    &__self_0),
            ExprKind::Try(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Try",
                    &__self_0),
            ExprKind::Yield(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Yield",
                    &__self_0),
            ExprKind::Yeet(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Yeet",
                    &__self_0),
            ExprKind::Become(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Become",
                    &__self_0),
            ExprKind::IncludedBytes(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "IncludedBytes", &__self_0),
            ExprKind::FormatArgs(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "FormatArgs", &__self_0),
            ExprKind::UnsafeBinderCast(__self_0, __self_1, __self_2) =>
                ::core::fmt::Formatter::debug_tuple_field3_finish(f,
                    "UnsafeBinderCast", __self_0, __self_1, &__self_2),
            ExprKind::Err(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Err",
                    &__self_0),
            ExprKind::Dummy => ::core::fmt::Formatter::write_str(f, "Dummy"),
        }
    }
}Debug)]
1747pub enum ExprKind {
1748    /// An array (e.g, `[a, b, c, d]`).
1749    Array(ThinVec<Box<Expr>>),
1750    /// Allow anonymous constants from an inline `const` block.
1751    ConstBlock(AnonConst),
1752    /// A function call.
1753    ///
1754    /// The first field resolves to the function itself,
1755    /// and the second field is the list of arguments.
1756    /// This also represents calling the constructor of
1757    /// tuple-like ADTs such as tuple structs and enum variants.
1758    Call(Box<Expr>, ThinVec<Box<Expr>>),
1759    /// A method call (e.g., `x.foo::<Bar, Baz>(a, b, c)`).
1760    MethodCall(Box<MethodCall>),
1761    /// A tuple (e.g., `(a, b, c, d)`).
1762    Tup(ThinVec<Box<Expr>>),
1763    /// A binary operation (e.g., `a + b`, `a * b`).
1764    Binary(BinOp, Box<Expr>, Box<Expr>),
1765    /// A unary operation (e.g., `!x`, `*x`).
1766    Unary(UnOp, Box<Expr>),
1767    /// A literal (e.g., `1`, `"foo"`).
1768    Lit(token::Lit),
1769    /// A cast (e.g., `foo as f64`).
1770    Cast(Box<Expr>, Box<Ty>),
1771    /// A type ascription (e.g., `builtin # type_ascribe(42, usize)`).
1772    ///
1773    /// Usually not written directly in user code but
1774    /// indirectly via the macro `type_ascribe!(...)`.
1775    Type(Box<Expr>, Box<Ty>),
1776    /// A `let pat = expr` expression that is only semantically allowed in the condition
1777    /// of `if` / `while` expressions. (e.g., `if let 0 = x { .. }`).
1778    ///
1779    /// `Span` represents the whole `let pat = expr` statement.
1780    Let(Box<Pat>, Box<Expr>, Span, Recovered),
1781    /// An `if` block, with an optional `else` block.
1782    ///
1783    /// `if expr { block } else { expr }`
1784    ///
1785    /// If present, the "else" expr is always `ExprKind::Block` (for `else`) or
1786    /// `ExprKind::If` (for `else if`).
1787    If(Box<Expr>, Box<Block>, Option<Box<Expr>>),
1788    /// A while loop, with an optional label.
1789    ///
1790    /// `'label: while expr { block }`
1791    While(Box<Expr>, Box<Block>, Option<Label>),
1792    /// A `for` loop, with an optional label.
1793    ///
1794    /// `'label: for await? pat in iter { block }`
1795    ///
1796    /// This is desugared to a combination of `loop` and `match` expressions.
1797    ForLoop {
1798        pat: Box<Pat>,
1799        iter: Box<Expr>,
1800        body: Box<Block>,
1801        label: Option<Label>,
1802        kind: ForLoopKind,
1803    },
1804    /// Conditionless loop (can be exited with `break`, `continue`, or `return`).
1805    ///
1806    /// `'label: loop { block }`
1807    Loop(Box<Block>, Option<Label>, Span),
1808    /// A `match` block.
1809    Match(Box<Expr>, ThinVec<Arm>, MatchKind),
1810    /// A closure (e.g., `move |a, b, c| a + b + c`).
1811    Closure(Box<Closure>),
1812    /// A block (`'label: { ... }`).
1813    Block(Box<Block>, Option<Label>),
1814    /// An `async` block (`async move { ... }`),
1815    /// or a `gen` block (`gen move { ... }`).
1816    ///
1817    /// The span is the "decl", which is the header before the body `{ }`
1818    /// including the `async`/`gen` keywords and possibly `move`.
1819    Gen(CaptureBy, Box<Block>, GenBlockKind, Span),
1820    /// An await expression (`my_future.await`). Span is of await keyword.
1821    Await(Box<Expr>, Span),
1822    /// A use expression (`x.use`). Span is of use keyword.
1823    Use(Box<Expr>, Span),
1824
1825    /// A try block (`try { ... }`), if the type is `None`, or
1826    /// A try block (`try bikeshed Ty { ... }`) if the type is `Some`.
1827    ///
1828    /// Note that `try bikeshed` is a *deliberately ridiculous* placeholder
1829    /// syntax to avoid deciding what keyword or symbol should go there.
1830    /// It's that way for experimentation only; an RFC to decide the final
1831    /// semantics and syntax would be needed to put it on stabilization-track.
1832    TryBlock(Box<Block>, Option<Box<Ty>>),
1833
1834    /// An assignment (`a = foo()`).
1835    /// The `Span` argument is the span of the `=` token.
1836    Assign(Box<Expr>, Box<Expr>, Span),
1837    /// An assignment with an operator.
1838    ///
1839    /// E.g., `a += 1`.
1840    AssignOp(AssignOp, Box<Expr>, Box<Expr>),
1841    /// Access of a named (e.g., `obj.foo`) or unnamed (e.g., `obj.0`) struct field.
1842    Field(Box<Expr>, Ident),
1843    /// An indexing operation (e.g., `foo[2]`).
1844    /// The span represents the span of the `[2]`, including brackets.
1845    Index(Box<Expr>, Box<Expr>, Span),
1846    /// A range (e.g., `1..2`, `1..`, `..2`, `1..=2`, `..=2`; and `..` in destructuring assignment).
1847    Range(Option<Box<Expr>>, Option<Box<Expr>>, RangeLimits),
1848    /// An underscore, used in destructuring assignment to ignore a value.
1849    Underscore,
1850
1851    /// Variable reference, possibly containing `::` and/or type
1852    /// parameters (e.g., `foo::bar::<baz>`).
1853    ///
1854    /// Optionally "qualified" (e.g., `<Vec<T> as SomeTrait>::SomeType`).
1855    Path(Option<Box<QSelf>>, Path),
1856
1857    /// A referencing operation (`&a`, `&mut a`, `&raw const a` or `&raw mut a`).
1858    AddrOf(BorrowKind, Mutability, Box<Expr>),
1859    /// A `break`, with an optional label to break, and an optional expression.
1860    Break(Option<Label>, Option<Box<Expr>>),
1861    /// A `continue`, with an optional label.
1862    Continue(Option<Label>),
1863    /// A `return`, with an optional value to be returned.
1864    Ret(Option<Box<Expr>>),
1865
1866    /// Output of the `asm!()` macro.
1867    InlineAsm(Box<InlineAsm>),
1868
1869    /// An `offset_of` expression (e.g., `builtin # offset_of(Struct, field)`).
1870    ///
1871    /// Usually not written directly in user code but
1872    /// indirectly via the macro `core::mem::offset_of!(...)`.
1873    OffsetOf(Box<Ty>, Vec<Ident>),
1874
1875    /// A macro invocation; pre-expansion.
1876    MacCall(Box<MacCall>),
1877
1878    /// A struct literal expression.
1879    ///
1880    /// E.g., `Foo {x: 1, y: 2}`, or `Foo {x: 1, .. rest}`.
1881    Struct(Box<StructExpr>),
1882
1883    /// An array literal constructed from one repeated element.
1884    ///
1885    /// E.g., `[1; 5]`. The expression is the element to be
1886    /// repeated; the constant is the number of times to repeat it.
1887    Repeat(Box<Expr>, AnonConst),
1888
1889    /// No-op: used solely so we can pretty-print faithfully.
1890    Paren(Box<Expr>),
1891
1892    /// A try expression (`expr?`).
1893    Try(Box<Expr>),
1894
1895    /// A `yield`, with an optional value to be yielded.
1896    Yield(YieldKind),
1897
1898    /// A `do yeet` (aka `throw`/`fail`/`bail`/`raise`/whatever),
1899    /// with an optional value to be returned.
1900    Yeet(Option<Box<Expr>>),
1901
1902    /// A tail call return, with the value to be returned.
1903    ///
1904    /// While `.0` must be a function call, we check this later, after parsing.
1905    Become(Box<Expr>),
1906
1907    /// Bytes included via `include_bytes!`
1908    ///
1909    /// Added for optimization purposes to avoid the need to escape
1910    /// large binary blobs - should always behave like [`ExprKind::Lit`]
1911    /// with a `ByteStr` literal.
1912    ///
1913    /// The value is stored as a `ByteSymbol`. It's unfortunate that we need to
1914    /// intern (hash) the bytes because they're likely to be large and unique.
1915    /// But it's necessary because this will eventually be lowered to
1916    /// `LitKind::ByteStr`, which needs a `ByteSymbol` to impl `Copy` and avoid
1917    /// arena allocation.
1918    IncludedBytes(ByteSymbol),
1919
1920    /// A `format_args!()` expression.
1921    FormatArgs(Box<FormatArgs>),
1922
1923    UnsafeBinderCast(UnsafeBinderCastKind, Box<Expr>, Option<Box<Ty>>),
1924
1925    /// Placeholder for an expression that wasn't syntactically well formed in some way.
1926    Err(ErrorGuaranteed),
1927
1928    /// Acts as a null expression. Lowering it will always emit a bug.
1929    Dummy,
1930}
1931
1932/// Used to differentiate between `for` loops and `for await` loops.
1933#[derive(#[automatically_derived]
impl ::core::clone::Clone for ForLoopKind {
    #[inline]
    fn clone(&self) -> ForLoopKind { *self }
}Clone, #[automatically_derived]
impl ::core::marker::Copy for ForLoopKind { }Copy, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for ForLoopKind {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        ForLoopKind::For => { 0usize }
                        ForLoopKind::ForAwait => { 1usize }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    ForLoopKind::For => {}
                    ForLoopKind::ForAwait => {}
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for ForLoopKind {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => { ForLoopKind::For }
                    1usize => { ForLoopKind::ForAwait }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `ForLoopKind`, expected 0..2, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for ForLoopKind {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::write_str(f,
            match self {
                ForLoopKind::For => "For",
                ForLoopKind::ForAwait => "ForAwait",
            })
    }
}Debug, #[automatically_derived]
impl ::core::cmp::PartialEq for ForLoopKind {
    #[inline]
    fn eq(&self, other: &ForLoopKind) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::Eq for ForLoopKind {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {}
}Eq, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for ForLoopKind
            where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    ForLoopKind::For => {}
                    ForLoopKind::ForAwait => {}
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for ForLoopKind where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    ForLoopKind::For => {}
                    ForLoopKind::ForAwait => {}
                }
            }
        }
    };Walkable)]
1934pub enum ForLoopKind {
1935    For,
1936    ForAwait,
1937}
1938
1939/// Used to differentiate between `async {}` blocks and `gen {}` blocks.
1940#[derive(#[automatically_derived]
impl ::core::clone::Clone for GenBlockKind {
    #[inline]
    fn clone(&self) -> GenBlockKind { *self }
}Clone, #[automatically_derived]
impl ::core::marker::Copy for GenBlockKind { }Copy, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for GenBlockKind {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        GenBlockKind::Async => { 0usize }
                        GenBlockKind::Gen => { 1usize }
                        GenBlockKind::AsyncGen => { 2usize }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    GenBlockKind::Async => {}
                    GenBlockKind::Gen => {}
                    GenBlockKind::AsyncGen => {}
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for GenBlockKind {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => { GenBlockKind::Async }
                    1usize => { GenBlockKind::Gen }
                    2usize => { GenBlockKind::AsyncGen }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `GenBlockKind`, expected 0..3, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for GenBlockKind {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::write_str(f,
            match self {
                GenBlockKind::Async => "Async",
                GenBlockKind::Gen => "Gen",
                GenBlockKind::AsyncGen => "AsyncGen",
            })
    }
}Debug, #[automatically_derived]
impl ::core::cmp::PartialEq for GenBlockKind {
    #[inline]
    fn eq(&self, other: &GenBlockKind) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::Eq for GenBlockKind {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {}
}Eq, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for GenBlockKind
            where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    GenBlockKind::Async => {}
                    GenBlockKind::Gen => {}
                    GenBlockKind::AsyncGen => {}
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for GenBlockKind where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    GenBlockKind::Async => {}
                    GenBlockKind::Gen => {}
                    GenBlockKind::AsyncGen => {}
                }
            }
        }
    };Walkable)]
1941pub enum GenBlockKind {
1942    Async,
1943    Gen,
1944    AsyncGen,
1945}
1946
1947impl fmt::Display for GenBlockKind {
1948    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
1949        self.modifier().fmt(f)
1950    }
1951}
1952
1953impl GenBlockKind {
1954    pub fn modifier(&self) -> &'static str {
1955        match self {
1956            GenBlockKind::Async => "async",
1957            GenBlockKind::Gen => "gen",
1958            GenBlockKind::AsyncGen => "async gen",
1959        }
1960    }
1961}
1962
1963/// Whether we're unwrapping or wrapping an unsafe binder
1964#[derive(#[automatically_derived]
impl ::core::marker::Copy for UnsafeBinderCastKind { }Copy, #[automatically_derived]
impl ::core::clone::Clone for UnsafeBinderCastKind {
    #[inline]
    fn clone(&self) -> UnsafeBinderCastKind { *self }
}Clone, #[automatically_derived]
impl ::core::fmt::Debug for UnsafeBinderCastKind {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::write_str(f,
            match self {
                UnsafeBinderCastKind::Wrap => "Wrap",
                UnsafeBinderCastKind::Unwrap => "Unwrap",
            })
    }
}Debug, #[automatically_derived]
impl ::core::cmp::PartialEq for UnsafeBinderCastKind {
    #[inline]
    fn eq(&self, other: &UnsafeBinderCastKind) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::Eq for UnsafeBinderCastKind {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::hash::Hash for UnsafeBinderCastKind {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        ::core::hash::Hash::hash(&__self_discr, state)
    }
}Hash)]
1965#[derive(const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for UnsafeBinderCastKind {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        UnsafeBinderCastKind::Wrap => { 0usize }
                        UnsafeBinderCastKind::Unwrap => { 1usize }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    UnsafeBinderCastKind::Wrap => {}
                    UnsafeBinderCastKind::Unwrap => {}
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for UnsafeBinderCastKind {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => { UnsafeBinderCastKind::Wrap }
                    1usize => { UnsafeBinderCastKind::Unwrap }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `UnsafeBinderCastKind`, expected 0..2, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, const _: () =
    {
        impl<__CTX> ::rustc_data_structures::stable_hasher::HashStable<__CTX>
            for UnsafeBinderCastKind where
            __CTX: ::rustc_span::HashStableContext {
            #[inline]
            fn hash_stable(&self, __hcx: &mut __CTX,
                __hasher:
                    &mut ::rustc_data_structures::stable_hasher::StableHasher) {
                ::std::mem::discriminant(self).hash_stable(__hcx, __hasher);
                match *self {
                    UnsafeBinderCastKind::Wrap => {}
                    UnsafeBinderCastKind::Unwrap => {}
                }
            }
        }
    };HashStable_Generic, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for
            UnsafeBinderCastKind where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    UnsafeBinderCastKind::Wrap => {}
                    UnsafeBinderCastKind::Unwrap => {}
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for UnsafeBinderCastKind
            where __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    UnsafeBinderCastKind::Wrap => {}
                    UnsafeBinderCastKind::Unwrap => {}
                }
            }
        }
    };Walkable)]
1966pub enum UnsafeBinderCastKind {
1967    // e.g. `&i32` -> `unsafe<'a> &'a i32`
1968    Wrap,
1969    // e.g. `unsafe<'a> &'a i32` -> `&i32`
1970    Unwrap,
1971}
1972
1973/// The explicit `Self` type in a "qualified path". The actual
1974/// path, including the trait and the associated item, is stored
1975/// separately. `position` represents the index of the associated
1976/// item qualified with this `Self` type.
1977///
1978/// ```ignore (only-for-syntax-highlight)
1979/// <Vec<T> as a::b::Trait>::AssociatedItem
1980///  ^~~~~     ~~~~~~~~~~~~~~^
1981///  ty        position = 3
1982///
1983/// <Vec<T>>::AssociatedItem
1984///  ^~~~~    ^
1985///  ty       position = 0
1986/// ```
1987#[derive(#[automatically_derived]
impl ::core::clone::Clone for QSelf {
    #[inline]
    fn clone(&self) -> QSelf {
        QSelf {
            ty: ::core::clone::Clone::clone(&self.ty),
            path_span: ::core::clone::Clone::clone(&self.path_span),
            position: ::core::clone::Clone::clone(&self.position),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for QSelf {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    QSelf {
                        ty: ref __binding_0,
                        path_span: ref __binding_1,
                        position: ref __binding_2 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for QSelf {
            fn decode(__decoder: &mut __D) -> Self {
                QSelf {
                    ty: ::rustc_serialize::Decodable::decode(__decoder),
                    path_span: ::rustc_serialize::Decodable::decode(__decoder),
                    position: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for QSelf {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field3_finish(f, "QSelf", "ty",
            &self.ty, "path_span", &self.path_span, "position",
            &&self.position)
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for QSelf where
            __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    QSelf {
                        ty: ref __binding_0,
                        path_span: ref __binding_1,
                        position: ref __binding_2 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_2,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for QSelf where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    QSelf {
                        ty: ref mut __binding_0,
                        path_span: ref mut __binding_1,
                        position: ref mut __binding_2 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_2,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
1988pub struct QSelf {
1989    pub ty: Box<Ty>,
1990
1991    /// The span of `a::b::Trait` in a path like `<Vec<T> as
1992    /// a::b::Trait>::AssociatedItem`; in the case where `position ==
1993    /// 0`, this is an empty span.
1994    pub path_span: Span,
1995    pub position: usize,
1996}
1997
1998/// A capture clause used in closures and `async` blocks.
1999#[derive(#[automatically_derived]
impl ::core::clone::Clone for CaptureBy {
    #[inline]
    fn clone(&self) -> CaptureBy {
        let _: ::core::clone::AssertParamIsClone<Span>;
        *self
    }
}Clone, #[automatically_derived]
impl ::core::marker::Copy for CaptureBy { }Copy, #[automatically_derived]
impl ::core::cmp::PartialEq for CaptureBy {
    #[inline]
    fn eq(&self, other: &CaptureBy) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr &&
            match (self, other) {
                (CaptureBy::Value { move_kw: __self_0 }, CaptureBy::Value {
                    move_kw: __arg1_0 }) => __self_0 == __arg1_0,
                (CaptureBy::Use { use_kw: __self_0 }, CaptureBy::Use {
                    use_kw: __arg1_0 }) => __self_0 == __arg1_0,
                _ => true,
            }
    }
}PartialEq, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for CaptureBy {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        CaptureBy::Value { move_kw: ref __binding_0 } => { 0usize }
                        CaptureBy::Ref => { 1usize }
                        CaptureBy::Use { use_kw: ref __binding_0 } => { 2usize }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    CaptureBy::Value { move_kw: ref __binding_0 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    CaptureBy::Ref => {}
                    CaptureBy::Use { use_kw: ref __binding_0 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for CaptureBy {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => {
                        CaptureBy::Value {
                            move_kw: ::rustc_serialize::Decodable::decode(__decoder),
                        }
                    }
                    1usize => { CaptureBy::Ref }
                    2usize => {
                        CaptureBy::Use {
                            use_kw: ::rustc_serialize::Decodable::decode(__decoder),
                        }
                    }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `CaptureBy`, expected 0..3, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for CaptureBy {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            CaptureBy::Value { move_kw: __self_0 } =>
                ::core::fmt::Formatter::debug_struct_field1_finish(f, "Value",
                    "move_kw", &__self_0),
            CaptureBy::Ref => ::core::fmt::Formatter::write_str(f, "Ref"),
            CaptureBy::Use { use_kw: __self_0 } =>
                ::core::fmt::Formatter::debug_struct_field1_finish(f, "Use",
                    "use_kw", &__self_0),
        }
    }
}Debug, const _: () =
    {
        impl<__CTX> ::rustc_data_structures::stable_hasher::HashStable<__CTX>
            for CaptureBy where __CTX: ::rustc_span::HashStableContext {
            #[inline]
            fn hash_stable(&self, __hcx: &mut __CTX,
                __hasher:
                    &mut ::rustc_data_structures::stable_hasher::StableHasher) {
                ::std::mem::discriminant(self).hash_stable(__hcx, __hasher);
                match *self {
                    CaptureBy::Value { move_kw: ref __binding_0 } => {
                        { __binding_0.hash_stable(__hcx, __hasher); }
                    }
                    CaptureBy::Ref => {}
                    CaptureBy::Use { use_kw: ref __binding_0 } => {
                        { __binding_0.hash_stable(__hcx, __hasher); }
                    }
                }
            }
        }
    };HashStable_Generic, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for CaptureBy
            where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    CaptureBy::Value { move_kw: ref __binding_0 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    CaptureBy::Ref => {}
                    CaptureBy::Use { use_kw: ref __binding_0 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for CaptureBy where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    CaptureBy::Value { move_kw: ref mut __binding_0 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                    CaptureBy::Ref => {}
                    CaptureBy::Use { use_kw: ref mut __binding_0 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
2000pub enum CaptureBy {
2001    /// `move |x| y + x`.
2002    Value {
2003        /// The span of the `move` keyword.
2004        move_kw: Span,
2005    },
2006    /// `move` or `use` keywords were not specified.
2007    Ref,
2008    /// `use |x| y + x`.
2009    ///
2010    /// Note that if you have a regular closure like `|| x.use`, this will *not* result
2011    /// in a `Use` capture. Instead, the `ExprUseVisitor` will look at the type
2012    /// of `x` and treat `x.use` as either a copy/clone/move as appropriate.
2013    Use {
2014        /// The span of the `use` keyword.
2015        use_kw: Span,
2016    },
2017}
2018
2019/// Closure lifetime binder, `for<'a, 'b>` in `for<'a, 'b> |_: &'a (), _: &'b ()|`.
2020#[derive(#[automatically_derived]
impl ::core::clone::Clone for ClosureBinder {
    #[inline]
    fn clone(&self) -> ClosureBinder {
        match self {
            ClosureBinder::NotPresent => ClosureBinder::NotPresent,
            ClosureBinder::For { span: __self_0, generic_params: __self_1 } =>
                ClosureBinder::For {
                    span: ::core::clone::Clone::clone(__self_0),
                    generic_params: ::core::clone::Clone::clone(__self_1),
                },
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for ClosureBinder {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        ClosureBinder::NotPresent => { 0usize }
                        ClosureBinder::For {
                            span: ref __binding_0, generic_params: ref __binding_1 } =>
                            {
                            1usize
                        }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    ClosureBinder::NotPresent => {}
                    ClosureBinder::For {
                        span: ref __binding_0, generic_params: ref __binding_1 } =>
                        {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for ClosureBinder {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => { ClosureBinder::NotPresent }
                    1usize => {
                        ClosureBinder::For {
                            span: ::rustc_serialize::Decodable::decode(__decoder),
                            generic_params: ::rustc_serialize::Decodable::decode(__decoder),
                        }
                    }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `ClosureBinder`, expected 0..2, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for ClosureBinder {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            ClosureBinder::NotPresent =>
                ::core::fmt::Formatter::write_str(f, "NotPresent"),
            ClosureBinder::For { span: __self_0, generic_params: __self_1 } =>
                ::core::fmt::Formatter::debug_struct_field2_finish(f, "For",
                    "span", __self_0, "generic_params", &__self_1),
        }
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for
            ClosureBinder where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    ClosureBinder::NotPresent => {}
                    ClosureBinder::For {
                        span: ref __binding_0, generic_params: ref __binding_1 } =>
                        {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for ClosureBinder where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    ClosureBinder::NotPresent => {}
                    ClosureBinder::For {
                        span: ref mut __binding_0,
                        generic_params: ref mut __binding_1 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
2021pub enum ClosureBinder {
2022    /// The binder is not present, all closure lifetimes are inferred.
2023    NotPresent,
2024    /// The binder is present.
2025    For {
2026        /// Span of the whole `for<>` clause
2027        ///
2028        /// ```text
2029        /// for<'a, 'b> |_: &'a (), _: &'b ()| { ... }
2030        /// ^^^^^^^^^^^ -- this
2031        /// ```
2032        span: Span,
2033
2034        /// Lifetimes in the `for<>` closure
2035        ///
2036        /// ```text
2037        /// for<'a, 'b> |_: &'a (), _: &'b ()| { ... }
2038        ///     ^^^^^^ -- this
2039        /// ```
2040        generic_params: ThinVec<GenericParam>,
2041    },
2042}
2043
2044/// Represents a macro invocation. The `path` indicates which macro
2045/// is being invoked, and the `args` are arguments passed to it.
2046#[derive(#[automatically_derived]
impl ::core::clone::Clone for MacCall {
    #[inline]
    fn clone(&self) -> MacCall {
        MacCall {
            path: ::core::clone::Clone::clone(&self.path),
            args: ::core::clone::Clone::clone(&self.args),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for MacCall {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    MacCall { path: ref __binding_0, args: ref __binding_1 } =>
                        {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for MacCall {
            fn decode(__decoder: &mut __D) -> Self {
                MacCall {
                    path: ::rustc_serialize::Decodable::decode(__decoder),
                    args: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for MacCall {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field2_finish(f, "MacCall",
            "path", &self.path, "args", &&self.args)
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for MacCall
            where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    MacCall { path: ref __binding_0, args: ref __binding_1 } =>
                        {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for MacCall where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    MacCall {
                        path: ref mut __binding_0, args: ref mut __binding_1 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
2047pub struct MacCall {
2048    pub path: Path,
2049    pub args: Box<DelimArgs>,
2050}
2051
2052impl MacCall {
2053    pub fn span(&self) -> Span {
2054        self.path.span.to(self.args.dspan.entire())
2055    }
2056}
2057
2058/// Arguments passed to an attribute macro.
2059#[derive(#[automatically_derived]
impl ::core::clone::Clone for AttrArgs {
    #[inline]
    fn clone(&self) -> AttrArgs {
        match self {
            AttrArgs::Empty => AttrArgs::Empty,
            AttrArgs::Delimited(__self_0) =>
                AttrArgs::Delimited(::core::clone::Clone::clone(__self_0)),
            AttrArgs::Eq { eq_span: __self_0, expr: __self_1 } =>
                AttrArgs::Eq {
                    eq_span: ::core::clone::Clone::clone(__self_0),
                    expr: ::core::clone::Clone::clone(__self_1),
                },
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for AttrArgs {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        AttrArgs::Empty => { 0usize }
                        AttrArgs::Delimited(ref __binding_0) => { 1usize }
                        AttrArgs::Eq {
                            eq_span: ref __binding_0, expr: ref __binding_1 } => {
                            2usize
                        }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    AttrArgs::Empty => {}
                    AttrArgs::Delimited(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    AttrArgs::Eq {
                        eq_span: ref __binding_0, expr: ref __binding_1 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for AttrArgs {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => { AttrArgs::Empty }
                    1usize => {
                        AttrArgs::Delimited(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    2usize => {
                        AttrArgs::Eq {
                            eq_span: ::rustc_serialize::Decodable::decode(__decoder),
                            expr: ::rustc_serialize::Decodable::decode(__decoder),
                        }
                    }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `AttrArgs`, expected 0..3, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for AttrArgs {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            AttrArgs::Empty => ::core::fmt::Formatter::write_str(f, "Empty"),
            AttrArgs::Delimited(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "Delimited", &__self_0),
            AttrArgs::Eq { eq_span: __self_0, expr: __self_1 } =>
                ::core::fmt::Formatter::debug_struct_field2_finish(f, "Eq",
                    "eq_span", __self_0, "expr", &__self_1),
        }
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for AttrArgs
            where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    AttrArgs::Empty => {}
                    AttrArgs::Delimited(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    AttrArgs::Eq {
                        eq_span: ref __binding_0, expr: ref __binding_1 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for AttrArgs where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    AttrArgs::Empty => {}
                    AttrArgs::Delimited(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                    AttrArgs::Eq {
                        eq_span: ref mut __binding_0, expr: ref mut __binding_1 } =>
                        {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
2060pub enum AttrArgs {
2061    /// No arguments: `#[attr]`.
2062    Empty,
2063    /// Delimited arguments: `#[attr()/[]/{}]`.
2064    Delimited(DelimArgs),
2065    /// Arguments of a key-value attribute: `#[attr = "value"]`.
2066    Eq {
2067        /// Span of the `=` token.
2068        eq_span: Span,
2069        expr: Box<Expr>,
2070    },
2071}
2072
2073impl AttrArgs {
2074    pub fn span(&self) -> Option<Span> {
2075        match self {
2076            AttrArgs::Empty => None,
2077            AttrArgs::Delimited(args) => Some(args.dspan.entire()),
2078            AttrArgs::Eq { eq_span, expr } => Some(eq_span.to(expr.span)),
2079        }
2080    }
2081
2082    /// Tokens inside the delimiters or after `=`.
2083    /// Proc macros see these tokens, for example.
2084    pub fn inner_tokens(&self) -> TokenStream {
2085        match self {
2086            AttrArgs::Empty => TokenStream::default(),
2087            AttrArgs::Delimited(args) => args.tokens.clone(),
2088            AttrArgs::Eq { expr, .. } => TokenStream::from_ast(expr),
2089        }
2090    }
2091}
2092
2093/// Delimited arguments, as used in `#[attr()/[]/{}]` or `mac!()/[]/{}`.
2094#[derive(#[automatically_derived]
impl ::core::clone::Clone for DelimArgs {
    #[inline]
    fn clone(&self) -> DelimArgs {
        DelimArgs {
            dspan: ::core::clone::Clone::clone(&self.dspan),
            delim: ::core::clone::Clone::clone(&self.delim),
            tokens: ::core::clone::Clone::clone(&self.tokens),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for DelimArgs {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    DelimArgs {
                        dspan: ref __binding_0,
                        delim: ref __binding_1,
                        tokens: ref __binding_2 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for DelimArgs {
            fn decode(__decoder: &mut __D) -> Self {
                DelimArgs {
                    dspan: ::rustc_serialize::Decodable::decode(__decoder),
                    delim: ::rustc_serialize::Decodable::decode(__decoder),
                    tokens: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for DelimArgs {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field3_finish(f, "DelimArgs",
            "dspan", &self.dspan, "delim", &self.delim, "tokens",
            &&self.tokens)
    }
}Debug, const _: () =
    {
        impl<__CTX> ::rustc_data_structures::stable_hasher::HashStable<__CTX>
            for DelimArgs where __CTX: ::rustc_span::HashStableContext {
            #[inline]
            fn hash_stable(&self, __hcx: &mut __CTX,
                __hasher:
                    &mut ::rustc_data_structures::stable_hasher::StableHasher) {
                match *self {
                    DelimArgs {
                        dspan: ref __binding_0,
                        delim: ref __binding_1,
                        tokens: ref __binding_2 } => {
                        { __binding_0.hash_stable(__hcx, __hasher); }
                        { __binding_1.hash_stable(__hcx, __hasher); }
                        { __binding_2.hash_stable(__hcx, __hasher); }
                    }
                }
            }
        }
    };HashStable_Generic, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for DelimArgs
            where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    DelimArgs {
                        dspan: ref __binding_0,
                        delim: ref __binding_1,
                        tokens: ref __binding_2 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_2,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for DelimArgs where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    DelimArgs {
                        dspan: ref mut __binding_0,
                        delim: ref mut __binding_1,
                        tokens: ref mut __binding_2 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_2,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
2095pub struct DelimArgs {
2096    pub dspan: DelimSpan,
2097    pub delim: Delimiter, // Note: `Delimiter::Invisible` never occurs
2098    pub tokens: TokenStream,
2099}
2100
2101impl DelimArgs {
2102    /// Whether a macro with these arguments needs a semicolon
2103    /// when used as a standalone item or statement.
2104    pub fn need_semicolon(&self) -> bool {
2105        !#[allow(non_exhaustive_omitted_patterns)] match self {
    DelimArgs { delim: Delimiter::Brace, .. } => true,
    _ => false,
}matches!(self, DelimArgs { delim: Delimiter::Brace, .. })
2106    }
2107}
2108
2109/// Represents a macro definition.
2110#[derive(#[automatically_derived]
impl ::core::clone::Clone for MacroDef {
    #[inline]
    fn clone(&self) -> MacroDef {
        MacroDef {
            body: ::core::clone::Clone::clone(&self.body),
            macro_rules: ::core::clone::Clone::clone(&self.macro_rules),
            eii_declaration: ::core::clone::Clone::clone(&self.eii_declaration),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for MacroDef {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    MacroDef {
                        body: ref __binding_0,
                        macro_rules: ref __binding_1,
                        eii_declaration: ref __binding_2 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for MacroDef {
            fn decode(__decoder: &mut __D) -> Self {
                MacroDef {
                    body: ::rustc_serialize::Decodable::decode(__decoder),
                    macro_rules: ::rustc_serialize::Decodable::decode(__decoder),
                    eii_declaration: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for MacroDef {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field3_finish(f, "MacroDef",
            "body", &self.body, "macro_rules", &self.macro_rules,
            "eii_declaration", &&self.eii_declaration)
    }
}Debug, const _: () =
    {
        impl<__CTX> ::rustc_data_structures::stable_hasher::HashStable<__CTX>
            for MacroDef where __CTX: ::rustc_span::HashStableContext {
            #[inline]
            fn hash_stable(&self, __hcx: &mut __CTX,
                __hasher:
                    &mut ::rustc_data_structures::stable_hasher::StableHasher) {
                match *self {
                    MacroDef {
                        body: ref __binding_0,
                        macro_rules: ref __binding_1,
                        eii_declaration: ref __binding_2 } => {
                        { __binding_0.hash_stable(__hcx, __hasher); }
                        { __binding_1.hash_stable(__hcx, __hasher); }
                        { __binding_2.hash_stable(__hcx, __hasher); }
                    }
                }
            }
        }
    };HashStable_Generic, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for MacroDef
            where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    MacroDef {
                        body: ref __binding_0,
                        macro_rules: ref __binding_1,
                        eii_declaration: ref __binding_2 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_2,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for MacroDef where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    MacroDef {
                        body: ref mut __binding_0,
                        macro_rules: ref mut __binding_1,
                        eii_declaration: ref mut __binding_2 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_2,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
2111pub struct MacroDef {
2112    pub body: Box<DelimArgs>,
2113    /// `true` if macro was defined with `macro_rules`.
2114    pub macro_rules: bool,
2115
2116    /// Corresponds to `#[eii_declaration(...)]`.
2117    /// `#[eii_declaration(...)]` is a built-in attribute macro, not a built-in attribute,
2118    /// because we require some name resolution to occur in the parameters of this attribute.
2119    /// Name resolution isn't possible in attributes otherwise, so we encode it in the AST.
2120    /// During ast lowering, we turn it back into an attribute again
2121    pub eii_declaration: Option<EiiDecl>,
2122}
2123
2124#[derive(#[automatically_derived]
impl ::core::clone::Clone for EiiDecl {
    #[inline]
    fn clone(&self) -> EiiDecl {
        EiiDecl {
            foreign_item: ::core::clone::Clone::clone(&self.foreign_item),
            impl_unsafe: ::core::clone::Clone::clone(&self.impl_unsafe),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for EiiDecl {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    EiiDecl {
                        foreign_item: ref __binding_0, impl_unsafe: ref __binding_1
                        } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for EiiDecl {
            fn decode(__decoder: &mut __D) -> Self {
                EiiDecl {
                    foreign_item: ::rustc_serialize::Decodable::decode(__decoder),
                    impl_unsafe: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for EiiDecl {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field2_finish(f, "EiiDecl",
            "foreign_item", &self.foreign_item, "impl_unsafe",
            &&self.impl_unsafe)
    }
}Debug, const _: () =
    {
        impl<__CTX> ::rustc_data_structures::stable_hasher::HashStable<__CTX>
            for EiiDecl where __CTX: ::rustc_span::HashStableContext {
            #[inline]
            fn hash_stable(&self, __hcx: &mut __CTX,
                __hasher:
                    &mut ::rustc_data_structures::stable_hasher::StableHasher) {
                match *self {
                    EiiDecl {
                        foreign_item: ref __binding_0, impl_unsafe: ref __binding_1
                        } => {
                        { __binding_0.hash_stable(__hcx, __hasher); }
                        { __binding_1.hash_stable(__hcx, __hasher); }
                    }
                }
            }
        }
    };HashStable_Generic, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for EiiDecl
            where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    EiiDecl {
                        foreign_item: ref __binding_0, impl_unsafe: ref __binding_1
                        } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for EiiDecl where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    EiiDecl {
                        foreign_item: ref mut __binding_0,
                        impl_unsafe: ref mut __binding_1 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
2125pub struct EiiDecl {
2126    /// path to the extern item we're targeting
2127    pub foreign_item: Path,
2128    pub impl_unsafe: bool,
2129}
2130
2131#[derive(#[automatically_derived]
impl ::core::clone::Clone for StrStyle {
    #[inline]
    fn clone(&self) -> StrStyle {
        let _: ::core::clone::AssertParamIsClone<u8>;
        *self
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for StrStyle {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        StrStyle::Cooked => { 0usize }
                        StrStyle::Raw(ref __binding_0) => { 1usize }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    StrStyle::Cooked => {}
                    StrStyle::Raw(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for StrStyle {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => { StrStyle::Cooked }
                    1usize => {
                        StrStyle::Raw(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `StrStyle`, expected 0..2, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for StrStyle {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            StrStyle::Cooked =>
                ::core::fmt::Formatter::write_str(f, "Cooked"),
            StrStyle::Raw(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Raw",
                    &__self_0),
        }
    }
}Debug, #[automatically_derived]
impl ::core::marker::Copy for StrStyle { }Copy, #[automatically_derived]
impl ::core::hash::Hash for StrStyle {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        ::core::hash::Hash::hash(&__self_discr, state);
        match self {
            StrStyle::Raw(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            _ => {}
        }
    }
}Hash, #[automatically_derived]
impl ::core::cmp::Eq for StrStyle {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<u8>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::PartialEq for StrStyle {
    #[inline]
    fn eq(&self, other: &StrStyle) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr &&
            match (self, other) {
                (StrStyle::Raw(__self_0), StrStyle::Raw(__arg1_0)) =>
                    __self_0 == __arg1_0,
                _ => true,
            }
    }
}PartialEq)]
2132#[derive(const _: () =
    {
        impl<__CTX> ::rustc_data_structures::stable_hasher::HashStable<__CTX>
            for StrStyle where __CTX: ::rustc_span::HashStableContext {
            #[inline]
            fn hash_stable(&self, __hcx: &mut __CTX,
                __hasher:
                    &mut ::rustc_data_structures::stable_hasher::StableHasher) {
                ::std::mem::discriminant(self).hash_stable(__hcx, __hasher);
                match *self {
                    StrStyle::Cooked => {}
                    StrStyle::Raw(ref __binding_0) => {
                        { __binding_0.hash_stable(__hcx, __hasher); }
                    }
                }
            }
        }
    };HashStable_Generic, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for StrStyle
            where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    StrStyle::Cooked => {}
                    StrStyle::Raw(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for StrStyle where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    StrStyle::Cooked => {}
                    StrStyle::Raw(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
2133pub enum StrStyle {
2134    /// A regular string, like `"foo"`.
2135    Cooked,
2136    /// A raw string, like `r##"foo"##`.
2137    ///
2138    /// The value is the number of `#` symbols used.
2139    Raw(u8),
2140}
2141
2142/// The kind of match expression
2143#[derive(#[automatically_derived]
impl ::core::clone::Clone for MatchKind {
    #[inline]
    fn clone(&self) -> MatchKind { *self }
}Clone, #[automatically_derived]
impl ::core::marker::Copy for MatchKind { }Copy, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for MatchKind {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        MatchKind::Prefix => { 0usize }
                        MatchKind::Postfix => { 1usize }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    MatchKind::Prefix => {}
                    MatchKind::Postfix => {}
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for MatchKind {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => { MatchKind::Prefix }
                    1usize => { MatchKind::Postfix }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `MatchKind`, expected 0..2, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for MatchKind {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::write_str(f,
            match self {
                MatchKind::Prefix => "Prefix",
                MatchKind::Postfix => "Postfix",
            })
    }
}Debug, #[automatically_derived]
impl ::core::cmp::PartialEq for MatchKind {
    #[inline]
    fn eq(&self, other: &MatchKind) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr
    }
}PartialEq, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for MatchKind
            where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    MatchKind::Prefix => {}
                    MatchKind::Postfix => {}
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for MatchKind where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    MatchKind::Prefix => {}
                    MatchKind::Postfix => {}
                }
            }
        }
    };Walkable)]
2144pub enum MatchKind {
2145    /// match expr { ... }
2146    Prefix,
2147    /// expr.match { ... }
2148    Postfix,
2149}
2150
2151/// The kind of yield expression
2152#[derive(#[automatically_derived]
impl ::core::clone::Clone for YieldKind {
    #[inline]
    fn clone(&self) -> YieldKind {
        match self {
            YieldKind::Prefix(__self_0) =>
                YieldKind::Prefix(::core::clone::Clone::clone(__self_0)),
            YieldKind::Postfix(__self_0) =>
                YieldKind::Postfix(::core::clone::Clone::clone(__self_0)),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for YieldKind {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        YieldKind::Prefix(ref __binding_0) => { 0usize }
                        YieldKind::Postfix(ref __binding_0) => { 1usize }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    YieldKind::Prefix(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    YieldKind::Postfix(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for YieldKind {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => {
                        YieldKind::Prefix(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    1usize => {
                        YieldKind::Postfix(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `YieldKind`, expected 0..2, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for YieldKind {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            YieldKind::Prefix(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Prefix",
                    &__self_0),
            YieldKind::Postfix(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "Postfix", &__self_0),
        }
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for YieldKind
            where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    YieldKind::Prefix(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    YieldKind::Postfix(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for YieldKind where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    YieldKind::Prefix(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                    YieldKind::Postfix(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
2153pub enum YieldKind {
2154    /// yield expr { ... }
2155    Prefix(Option<Box<Expr>>),
2156    /// expr.yield { ... }
2157    Postfix(Box<Expr>),
2158}
2159
2160impl YieldKind {
2161    /// Returns the expression inside the yield expression, if any.
2162    ///
2163    /// For postfix yields, this is guaranteed to be `Some`.
2164    pub const fn expr(&self) -> Option<&Box<Expr>> {
2165        match self {
2166            YieldKind::Prefix(expr) => expr.as_ref(),
2167            YieldKind::Postfix(expr) => Some(expr),
2168        }
2169    }
2170
2171    /// Returns a mutable reference to the expression being yielded, if any.
2172    pub const fn expr_mut(&mut self) -> Option<&mut Box<Expr>> {
2173        match self {
2174            YieldKind::Prefix(expr) => expr.as_mut(),
2175            YieldKind::Postfix(expr) => Some(expr),
2176        }
2177    }
2178
2179    /// Returns true if both yields are prefix or both are postfix.
2180    pub const fn same_kind(&self, other: &Self) -> bool {
2181        match (self, other) {
2182            (YieldKind::Prefix(_), YieldKind::Prefix(_)) => true,
2183            (YieldKind::Postfix(_), YieldKind::Postfix(_)) => true,
2184            _ => false,
2185        }
2186    }
2187}
2188
2189/// A literal in a meta item.
2190#[derive(#[automatically_derived]
impl ::core::clone::Clone for MetaItemLit {
    #[inline]
    fn clone(&self) -> MetaItemLit {
        let _: ::core::clone::AssertParamIsClone<Symbol>;
        let _: ::core::clone::AssertParamIsClone<Option<Symbol>>;
        let _: ::core::clone::AssertParamIsClone<LitKind>;
        let _: ::core::clone::AssertParamIsClone<Span>;
        *self
    }
}Clone, #[automatically_derived]
impl ::core::marker::Copy for MetaItemLit { }Copy, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for MetaItemLit {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    MetaItemLit {
                        symbol: ref __binding_0,
                        suffix: ref __binding_1,
                        kind: ref __binding_2,
                        span: ref __binding_3 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_3,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for MetaItemLit {
            fn decode(__decoder: &mut __D) -> Self {
                MetaItemLit {
                    symbol: ::rustc_serialize::Decodable::decode(__decoder),
                    suffix: ::rustc_serialize::Decodable::decode(__decoder),
                    kind: ::rustc_serialize::Decodable::decode(__decoder),
                    span: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for MetaItemLit {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field4_finish(f, "MetaItemLit",
            "symbol", &self.symbol, "suffix", &self.suffix, "kind",
            &self.kind, "span", &&self.span)
    }
}Debug, const _: () =
    {
        impl<__CTX> ::rustc_data_structures::stable_hasher::HashStable<__CTX>
            for MetaItemLit where __CTX: ::rustc_span::HashStableContext {
            #[inline]
            fn hash_stable(&self, __hcx: &mut __CTX,
                __hasher:
                    &mut ::rustc_data_structures::stable_hasher::StableHasher) {
                match *self {
                    MetaItemLit {
                        symbol: ref __binding_0,
                        suffix: ref __binding_1,
                        kind: ref __binding_2,
                        span: ref __binding_3 } => {
                        { __binding_0.hash_stable(__hcx, __hasher); }
                        { __binding_1.hash_stable(__hcx, __hasher); }
                        { __binding_2.hash_stable(__hcx, __hasher); }
                        { __binding_3.hash_stable(__hcx, __hasher); }
                    }
                }
            }
        }
    };HashStable_Generic)]
2191pub struct MetaItemLit {
2192    /// The original literal as written in the source code.
2193    pub symbol: Symbol,
2194    /// The original suffix as written in the source code.
2195    pub suffix: Option<Symbol>,
2196    /// The "semantic" representation of the literal lowered from the original tokens.
2197    /// Strings are unescaped, hexadecimal forms are eliminated, etc.
2198    pub kind: LitKind,
2199    pub span: Span,
2200}
2201
2202/// Similar to `MetaItemLit`, but restricted to string literals.
2203#[derive(#[automatically_derived]
impl ::core::clone::Clone for StrLit {
    #[inline]
    fn clone(&self) -> StrLit {
        let _: ::core::clone::AssertParamIsClone<Symbol>;
        let _: ::core::clone::AssertParamIsClone<Option<Symbol>>;
        let _: ::core::clone::AssertParamIsClone<StrStyle>;
        let _: ::core::clone::AssertParamIsClone<Span>;
        *self
    }
}Clone, #[automatically_derived]
impl ::core::marker::Copy for StrLit { }Copy, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for StrLit {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    StrLit {
                        symbol: ref __binding_0,
                        suffix: ref __binding_1,
                        symbol_unescaped: ref __binding_2,
                        style: ref __binding_3,
                        span: ref __binding_4 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_3,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_4,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for StrLit {
            fn decode(__decoder: &mut __D) -> Self {
                StrLit {
                    symbol: ::rustc_serialize::Decodable::decode(__decoder),
                    suffix: ::rustc_serialize::Decodable::decode(__decoder),
                    symbol_unescaped: ::rustc_serialize::Decodable::decode(__decoder),
                    style: ::rustc_serialize::Decodable::decode(__decoder),
                    span: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for StrLit {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field5_finish(f, "StrLit",
            "symbol", &self.symbol, "suffix", &self.suffix,
            "symbol_unescaped", &self.symbol_unescaped, "style", &self.style,
            "span", &&self.span)
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for StrLit where
            __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    StrLit {
                        symbol: ref __binding_0,
                        suffix: ref __binding_1,
                        symbol_unescaped: ref __binding_2,
                        style: ref __binding_3,
                        span: ref __binding_4 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_2,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_3,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_4,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for StrLit where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    StrLit {
                        symbol: ref mut __binding_0,
                        suffix: ref mut __binding_1,
                        symbol_unescaped: ref mut __binding_2,
                        style: ref mut __binding_3,
                        span: ref mut __binding_4 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_2,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_3,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_4,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
2204pub struct StrLit {
2205    /// The original literal as written in source code.
2206    pub symbol: Symbol,
2207    /// The original suffix as written in source code.
2208    pub suffix: Option<Symbol>,
2209    /// The semantic (unescaped) representation of the literal.
2210    pub symbol_unescaped: Symbol,
2211    pub style: StrStyle,
2212    pub span: Span,
2213}
2214
2215impl StrLit {
2216    pub fn as_token_lit(&self) -> token::Lit {
2217        let token_kind = match self.style {
2218            StrStyle::Cooked => token::Str,
2219            StrStyle::Raw(n) => token::StrRaw(n),
2220        };
2221        token::Lit::new(token_kind, self.symbol, self.suffix)
2222    }
2223}
2224
2225/// Type of the integer literal based on provided suffix.
2226#[derive(#[automatically_derived]
impl ::core::clone::Clone for LitIntType {
    #[inline]
    fn clone(&self) -> LitIntType {
        let _: ::core::clone::AssertParamIsClone<IntTy>;
        let _: ::core::clone::AssertParamIsClone<UintTy>;
        *self
    }
}Clone, #[automatically_derived]
impl ::core::marker::Copy for LitIntType { }Copy, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for LitIntType {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        LitIntType::Signed(ref __binding_0) => { 0usize }
                        LitIntType::Unsigned(ref __binding_0) => { 1usize }
                        LitIntType::Unsuffixed => { 2usize }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    LitIntType::Signed(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    LitIntType::Unsigned(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    LitIntType::Unsuffixed => {}
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for LitIntType {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => {
                        LitIntType::Signed(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    1usize => {
                        LitIntType::Unsigned(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    2usize => { LitIntType::Unsuffixed }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `LitIntType`, expected 0..3, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for LitIntType {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            LitIntType::Signed(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Signed",
                    &__self_0),
            LitIntType::Unsigned(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "Unsigned", &__self_0),
            LitIntType::Unsuffixed =>
                ::core::fmt::Formatter::write_str(f, "Unsuffixed"),
        }
    }
}Debug, #[automatically_derived]
impl ::core::hash::Hash for LitIntType {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        ::core::hash::Hash::hash(&__self_discr, state);
        match self {
            LitIntType::Signed(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            LitIntType::Unsigned(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            _ => {}
        }
    }
}Hash, #[automatically_derived]
impl ::core::cmp::Eq for LitIntType {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<IntTy>;
        let _: ::core::cmp::AssertParamIsEq<UintTy>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::PartialEq for LitIntType {
    #[inline]
    fn eq(&self, other: &LitIntType) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr &&
            match (self, other) {
                (LitIntType::Signed(__self_0), LitIntType::Signed(__arg1_0))
                    => __self_0 == __arg1_0,
                (LitIntType::Unsigned(__self_0),
                    LitIntType::Unsigned(__arg1_0)) => __self_0 == __arg1_0,
                _ => true,
            }
    }
}PartialEq)]
2227#[derive(const _: () =
    {
        impl<__CTX> ::rustc_data_structures::stable_hasher::HashStable<__CTX>
            for LitIntType where __CTX: ::rustc_span::HashStableContext {
            #[inline]
            fn hash_stable(&self, __hcx: &mut __CTX,
                __hasher:
                    &mut ::rustc_data_structures::stable_hasher::StableHasher) {
                ::std::mem::discriminant(self).hash_stable(__hcx, __hasher);
                match *self {
                    LitIntType::Signed(ref __binding_0) => {
                        { __binding_0.hash_stable(__hcx, __hasher); }
                    }
                    LitIntType::Unsigned(ref __binding_0) => {
                        { __binding_0.hash_stable(__hcx, __hasher); }
                    }
                    LitIntType::Unsuffixed => {}
                }
            }
        }
    };HashStable_Generic)]
2228pub enum LitIntType {
2229    /// e.g. `42_i32`.
2230    Signed(IntTy),
2231    /// e.g. `42_u32`.
2232    Unsigned(UintTy),
2233    /// e.g. `42`.
2234    Unsuffixed,
2235}
2236
2237/// Type of the float literal based on provided suffix.
2238#[derive(#[automatically_derived]
impl ::core::clone::Clone for LitFloatType {
    #[inline]
    fn clone(&self) -> LitFloatType {
        let _: ::core::clone::AssertParamIsClone<FloatTy>;
        *self
    }
}Clone, #[automatically_derived]
impl ::core::marker::Copy for LitFloatType { }Copy, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for LitFloatType {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        LitFloatType::Suffixed(ref __binding_0) => { 0usize }
                        LitFloatType::Unsuffixed => { 1usize }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    LitFloatType::Suffixed(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    LitFloatType::Unsuffixed => {}
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for LitFloatType {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => {
                        LitFloatType::Suffixed(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    1usize => { LitFloatType::Unsuffixed }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `LitFloatType`, expected 0..2, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for LitFloatType {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            LitFloatType::Suffixed(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "Suffixed", &__self_0),
            LitFloatType::Unsuffixed =>
                ::core::fmt::Formatter::write_str(f, "Unsuffixed"),
        }
    }
}Debug, #[automatically_derived]
impl ::core::hash::Hash for LitFloatType {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        ::core::hash::Hash::hash(&__self_discr, state);
        match self {
            LitFloatType::Suffixed(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            _ => {}
        }
    }
}Hash, #[automatically_derived]
impl ::core::cmp::Eq for LitFloatType {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<FloatTy>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::PartialEq for LitFloatType {
    #[inline]
    fn eq(&self, other: &LitFloatType) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr &&
            match (self, other) {
                (LitFloatType::Suffixed(__self_0),
                    LitFloatType::Suffixed(__arg1_0)) => __self_0 == __arg1_0,
                _ => true,
            }
    }
}PartialEq)]
2239#[derive(const _: () =
    {
        impl<__CTX> ::rustc_data_structures::stable_hasher::HashStable<__CTX>
            for LitFloatType where __CTX: ::rustc_span::HashStableContext {
            #[inline]
            fn hash_stable(&self, __hcx: &mut __CTX,
                __hasher:
                    &mut ::rustc_data_structures::stable_hasher::StableHasher) {
                ::std::mem::discriminant(self).hash_stable(__hcx, __hasher);
                match *self {
                    LitFloatType::Suffixed(ref __binding_0) => {
                        { __binding_0.hash_stable(__hcx, __hasher); }
                    }
                    LitFloatType::Unsuffixed => {}
                }
            }
        }
    };HashStable_Generic)]
2240pub enum LitFloatType {
2241    /// A float literal with a suffix (`1f32` or `1E10f32`).
2242    Suffixed(FloatTy),
2243    /// A float literal without a suffix (`1.0 or 1.0E10`).
2244    Unsuffixed,
2245}
2246
2247/// This type is used within both `ast::MetaItemLit` and `hir::Lit`.
2248///
2249/// Note that the entire literal (including the suffix) is considered when
2250/// deciding the `LitKind`. This means that float literals like `1f32` are
2251/// classified by this type as `Float`. This is different to `token::LitKind`
2252/// which does *not* consider the suffix.
2253#[derive(#[automatically_derived]
impl ::core::clone::Clone for LitKind {
    #[inline]
    fn clone(&self) -> LitKind {
        let _: ::core::clone::AssertParamIsClone<Symbol>;
        let _: ::core::clone::AssertParamIsClone<StrStyle>;
        let _: ::core::clone::AssertParamIsClone<ByteSymbol>;
        let _: ::core::clone::AssertParamIsClone<u8>;
        let _: ::core::clone::AssertParamIsClone<char>;
        let _: ::core::clone::AssertParamIsClone<Pu128>;
        let _: ::core::clone::AssertParamIsClone<LitIntType>;
        let _: ::core::clone::AssertParamIsClone<LitFloatType>;
        let _: ::core::clone::AssertParamIsClone<bool>;
        let _: ::core::clone::AssertParamIsClone<ErrorGuaranteed>;
        *self
    }
}Clone, #[automatically_derived]
impl ::core::marker::Copy for LitKind { }Copy, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for LitKind {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        LitKind::Str(ref __binding_0, ref __binding_1) => { 0usize }
                        LitKind::ByteStr(ref __binding_0, ref __binding_1) => {
                            1usize
                        }
                        LitKind::CStr(ref __binding_0, ref __binding_1) => {
                            2usize
                        }
                        LitKind::Byte(ref __binding_0) => { 3usize }
                        LitKind::Char(ref __binding_0) => { 4usize }
                        LitKind::Int(ref __binding_0, ref __binding_1) => { 5usize }
                        LitKind::Float(ref __binding_0, ref __binding_1) => {
                            6usize
                        }
                        LitKind::Bool(ref __binding_0) => { 7usize }
                        LitKind::Err(ref __binding_0) => { 8usize }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    LitKind::Str(ref __binding_0, ref __binding_1) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                    }
                    LitKind::ByteStr(ref __binding_0, ref __binding_1) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                    }
                    LitKind::CStr(ref __binding_0, ref __binding_1) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                    }
                    LitKind::Byte(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    LitKind::Char(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    LitKind::Int(ref __binding_0, ref __binding_1) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                    }
                    LitKind::Float(ref __binding_0, ref __binding_1) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                    }
                    LitKind::Bool(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    LitKind::Err(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for LitKind {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => {
                        LitKind::Str(::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder))
                    }
                    1usize => {
                        LitKind::ByteStr(::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder))
                    }
                    2usize => {
                        LitKind::CStr(::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder))
                    }
                    3usize => {
                        LitKind::Byte(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    4usize => {
                        LitKind::Char(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    5usize => {
                        LitKind::Int(::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder))
                    }
                    6usize => {
                        LitKind::Float(::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder))
                    }
                    7usize => {
                        LitKind::Bool(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    8usize => {
                        LitKind::Err(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `LitKind`, expected 0..9, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for LitKind {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            LitKind::Str(__self_0, __self_1) =>
                ::core::fmt::Formatter::debug_tuple_field2_finish(f, "Str",
                    __self_0, &__self_1),
            LitKind::ByteStr(__self_0, __self_1) =>
                ::core::fmt::Formatter::debug_tuple_field2_finish(f,
                    "ByteStr", __self_0, &__self_1),
            LitKind::CStr(__self_0, __self_1) =>
                ::core::fmt::Formatter::debug_tuple_field2_finish(f, "CStr",
                    __self_0, &__self_1),
            LitKind::Byte(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Byte",
                    &__self_0),
            LitKind::Char(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Char",
                    &__self_0),
            LitKind::Int(__self_0, __self_1) =>
                ::core::fmt::Formatter::debug_tuple_field2_finish(f, "Int",
                    __self_0, &__self_1),
            LitKind::Float(__self_0, __self_1) =>
                ::core::fmt::Formatter::debug_tuple_field2_finish(f, "Float",
                    __self_0, &__self_1),
            LitKind::Bool(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Bool",
                    &__self_0),
            LitKind::Err(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Err",
                    &__self_0),
        }
    }
}Debug, #[automatically_derived]
impl ::core::hash::Hash for LitKind {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        ::core::hash::Hash::hash(&__self_discr, state);
        match self {
            LitKind::Str(__self_0, __self_1) => {
                ::core::hash::Hash::hash(__self_0, state);
                ::core::hash::Hash::hash(__self_1, state)
            }
            LitKind::ByteStr(__self_0, __self_1) => {
                ::core::hash::Hash::hash(__self_0, state);
                ::core::hash::Hash::hash(__self_1, state)
            }
            LitKind::CStr(__self_0, __self_1) => {
                ::core::hash::Hash::hash(__self_0, state);
                ::core::hash::Hash::hash(__self_1, state)
            }
            LitKind::Byte(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            LitKind::Char(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            LitKind::Int(__self_0, __self_1) => {
                ::core::hash::Hash::hash(__self_0, state);
                ::core::hash::Hash::hash(__self_1, state)
            }
            LitKind::Float(__self_0, __self_1) => {
                ::core::hash::Hash::hash(__self_0, state);
                ::core::hash::Hash::hash(__self_1, state)
            }
            LitKind::Bool(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            LitKind::Err(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
        }
    }
}Hash, #[automatically_derived]
impl ::core::cmp::Eq for LitKind {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<Symbol>;
        let _: ::core::cmp::AssertParamIsEq<StrStyle>;
        let _: ::core::cmp::AssertParamIsEq<ByteSymbol>;
        let _: ::core::cmp::AssertParamIsEq<u8>;
        let _: ::core::cmp::AssertParamIsEq<char>;
        let _: ::core::cmp::AssertParamIsEq<Pu128>;
        let _: ::core::cmp::AssertParamIsEq<LitIntType>;
        let _: ::core::cmp::AssertParamIsEq<LitFloatType>;
        let _: ::core::cmp::AssertParamIsEq<bool>;
        let _: ::core::cmp::AssertParamIsEq<ErrorGuaranteed>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::PartialEq for LitKind {
    #[inline]
    fn eq(&self, other: &LitKind) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr &&
            match (self, other) {
                (LitKind::Str(__self_0, __self_1),
                    LitKind::Str(__arg1_0, __arg1_1)) =>
                    __self_0 == __arg1_0 && __self_1 == __arg1_1,
                (LitKind::ByteStr(__self_0, __self_1),
                    LitKind::ByteStr(__arg1_0, __arg1_1)) =>
                    __self_0 == __arg1_0 && __self_1 == __arg1_1,
                (LitKind::CStr(__self_0, __self_1),
                    LitKind::CStr(__arg1_0, __arg1_1)) =>
                    __self_0 == __arg1_0 && __self_1 == __arg1_1,
                (LitKind::Byte(__self_0), LitKind::Byte(__arg1_0)) =>
                    __self_0 == __arg1_0,
                (LitKind::Char(__self_0), LitKind::Char(__arg1_0)) =>
                    __self_0 == __arg1_0,
                (LitKind::Int(__self_0, __self_1),
                    LitKind::Int(__arg1_0, __arg1_1)) =>
                    __self_0 == __arg1_0 && __self_1 == __arg1_1,
                (LitKind::Float(__self_0, __self_1),
                    LitKind::Float(__arg1_0, __arg1_1)) =>
                    __self_0 == __arg1_0 && __self_1 == __arg1_1,
                (LitKind::Bool(__self_0), LitKind::Bool(__arg1_0)) =>
                    __self_0 == __arg1_0,
                (LitKind::Err(__self_0), LitKind::Err(__arg1_0)) =>
                    __self_0 == __arg1_0,
                _ => unsafe { ::core::intrinsics::unreachable() }
            }
    }
}PartialEq, const _: () =
    {
        impl<__CTX> ::rustc_data_structures::stable_hasher::HashStable<__CTX>
            for LitKind where __CTX: ::rustc_span::HashStableContext {
            #[inline]
            fn hash_stable(&self, __hcx: &mut __CTX,
                __hasher:
                    &mut ::rustc_data_structures::stable_hasher::StableHasher) {
                ::std::mem::discriminant(self).hash_stable(__hcx, __hasher);
                match *self {
                    LitKind::Str(ref __binding_0, ref __binding_1) => {
                        { __binding_0.hash_stable(__hcx, __hasher); }
                        { __binding_1.hash_stable(__hcx, __hasher); }
                    }
                    LitKind::ByteStr(ref __binding_0, ref __binding_1) => {
                        { __binding_0.hash_stable(__hcx, __hasher); }
                        { __binding_1.hash_stable(__hcx, __hasher); }
                    }
                    LitKind::CStr(ref __binding_0, ref __binding_1) => {
                        { __binding_0.hash_stable(__hcx, __hasher); }
                        { __binding_1.hash_stable(__hcx, __hasher); }
                    }
                    LitKind::Byte(ref __binding_0) => {
                        { __binding_0.hash_stable(__hcx, __hasher); }
                    }
                    LitKind::Char(ref __binding_0) => {
                        { __binding_0.hash_stable(__hcx, __hasher); }
                    }
                    LitKind::Int(ref __binding_0, ref __binding_1) => {
                        { __binding_0.hash_stable(__hcx, __hasher); }
                        { __binding_1.hash_stable(__hcx, __hasher); }
                    }
                    LitKind::Float(ref __binding_0, ref __binding_1) => {
                        { __binding_0.hash_stable(__hcx, __hasher); }
                        { __binding_1.hash_stable(__hcx, __hasher); }
                    }
                    LitKind::Bool(ref __binding_0) => {
                        { __binding_0.hash_stable(__hcx, __hasher); }
                    }
                    LitKind::Err(ref __binding_0) => {
                        { __binding_0.hash_stable(__hcx, __hasher); }
                    }
                }
            }
        }
    };HashStable_Generic)]
2254pub enum LitKind {
2255    /// A string literal (`"foo"`). The symbol is unescaped, and so may differ
2256    /// from the original token's symbol.
2257    Str(Symbol, StrStyle),
2258    /// A byte string (`b"foo"`). The symbol is unescaped, and so may differ
2259    /// from the original token's symbol.
2260    ByteStr(ByteSymbol, StrStyle),
2261    /// A C String (`c"foo"`). Guaranteed to only have `\0` at the end. The
2262    /// symbol is unescaped, and so may differ from the original token's
2263    /// symbol.
2264    CStr(ByteSymbol, StrStyle),
2265    /// A byte char (`b'f'`).
2266    Byte(u8),
2267    /// A character literal (`'a'`).
2268    Char(char),
2269    /// An integer literal (`1`).
2270    Int(Pu128, LitIntType),
2271    /// A float literal (`1.0`, `1f64` or `1E10f64`). The pre-suffix part is
2272    /// stored as a symbol rather than `f64` so that `LitKind` can impl `Eq`
2273    /// and `Hash`.
2274    Float(Symbol, LitFloatType),
2275    /// A boolean literal (`true`, `false`).
2276    Bool(bool),
2277    /// Placeholder for a literal that wasn't well-formed in some way.
2278    Err(ErrorGuaranteed),
2279}
2280
2281impl LitKind {
2282    pub fn str(&self) -> Option<Symbol> {
2283        match *self {
2284            LitKind::Str(s, _) => Some(s),
2285            _ => None,
2286        }
2287    }
2288
2289    /// Returns `true` if this literal is a string.
2290    pub fn is_str(&self) -> bool {
2291        #[allow(non_exhaustive_omitted_patterns)] match self {
    LitKind::Str(..) => true,
    _ => false,
}matches!(self, LitKind::Str(..))
2292    }
2293
2294    /// Returns `true` if this literal is byte literal string.
2295    pub fn is_bytestr(&self) -> bool {
2296        #[allow(non_exhaustive_omitted_patterns)] match self {
    LitKind::ByteStr(..) => true,
    _ => false,
}matches!(self, LitKind::ByteStr(..))
2297    }
2298
2299    /// Returns `true` if this is a numeric literal.
2300    pub fn is_numeric(&self) -> bool {
2301        #[allow(non_exhaustive_omitted_patterns)] match self {
    LitKind::Int(..) | LitKind::Float(..) => true,
    _ => false,
}matches!(self, LitKind::Int(..) | LitKind::Float(..))
2302    }
2303
2304    /// Returns `true` if this literal has no suffix.
2305    /// Note: this will return true for literals with prefixes such as raw strings and byte strings.
2306    pub fn is_unsuffixed(&self) -> bool {
2307        !self.is_suffixed()
2308    }
2309
2310    /// Returns `true` if this literal has a suffix.
2311    pub fn is_suffixed(&self) -> bool {
2312        match *self {
2313            // suffixed variants
2314            LitKind::Int(_, LitIntType::Signed(..) | LitIntType::Unsigned(..))
2315            | LitKind::Float(_, LitFloatType::Suffixed(..)) => true,
2316            // unsuffixed variants
2317            LitKind::Str(..)
2318            | LitKind::ByteStr(..)
2319            | LitKind::CStr(..)
2320            | LitKind::Byte(..)
2321            | LitKind::Char(..)
2322            | LitKind::Int(_, LitIntType::Unsuffixed)
2323            | LitKind::Float(_, LitFloatType::Unsuffixed)
2324            | LitKind::Bool(..)
2325            | LitKind::Err(_) => false,
2326        }
2327    }
2328}
2329
2330// N.B., If you change this, you'll probably want to change the corresponding
2331// type structure in `middle/ty.rs` as well.
2332#[derive(#[automatically_derived]
impl ::core::clone::Clone for MutTy {
    #[inline]
    fn clone(&self) -> MutTy {
        MutTy {
            ty: ::core::clone::Clone::clone(&self.ty),
            mutbl: ::core::clone::Clone::clone(&self.mutbl),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for MutTy {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    MutTy { ty: ref __binding_0, mutbl: ref __binding_1 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for MutTy {
            fn decode(__decoder: &mut __D) -> Self {
                MutTy {
                    ty: ::rustc_serialize::Decodable::decode(__decoder),
                    mutbl: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for MutTy {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field2_finish(f, "MutTy", "ty",
            &self.ty, "mutbl", &&self.mutbl)
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for MutTy where
            __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    MutTy { ty: ref __binding_0, mutbl: ref __binding_1 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for MutTy where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    MutTy { ty: ref mut __binding_0, mutbl: ref mut __binding_1
                        } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
2333pub struct MutTy {
2334    pub ty: Box<Ty>,
2335    pub mutbl: Mutability,
2336}
2337
2338/// Represents a function's signature in a trait declaration,
2339/// trait implementation, or free function.
2340#[derive(#[automatically_derived]
impl ::core::clone::Clone for FnSig {
    #[inline]
    fn clone(&self) -> FnSig {
        FnSig {
            header: ::core::clone::Clone::clone(&self.header),
            decl: ::core::clone::Clone::clone(&self.decl),
            span: ::core::clone::Clone::clone(&self.span),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for FnSig {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    FnSig {
                        header: ref __binding_0,
                        decl: ref __binding_1,
                        span: ref __binding_2 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for FnSig {
            fn decode(__decoder: &mut __D) -> Self {
                FnSig {
                    header: ::rustc_serialize::Decodable::decode(__decoder),
                    decl: ::rustc_serialize::Decodable::decode(__decoder),
                    span: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for FnSig {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field3_finish(f, "FnSig",
            "header", &self.header, "decl", &self.decl, "span", &&self.span)
    }
}Debug)]
2341pub struct FnSig {
2342    pub header: FnHeader,
2343    pub decl: Box<FnDecl>,
2344    pub span: Span,
2345}
2346
2347impl FnSig {
2348    /// Return a span encompassing the header, or where to insert it if empty.
2349    pub fn header_span(&self) -> Span {
2350        match self.header.ext {
2351            Extern::Implicit(span) | Extern::Explicit(_, span) => {
2352                return self.span.with_hi(span.hi());
2353            }
2354            Extern::None => {}
2355        }
2356
2357        match self.header.safety {
2358            Safety::Unsafe(span) | Safety::Safe(span) => return self.span.with_hi(span.hi()),
2359            Safety::Default => {}
2360        };
2361
2362        if let Some(coroutine_kind) = self.header.coroutine_kind {
2363            return self.span.with_hi(coroutine_kind.span().hi());
2364        }
2365
2366        if let Const::Yes(span) = self.header.constness {
2367            return self.span.with_hi(span.hi());
2368        }
2369
2370        self.span.shrink_to_lo()
2371    }
2372
2373    /// The span of the header's safety, or where to insert it if empty.
2374    pub fn safety_span(&self) -> Span {
2375        match self.header.safety {
2376            Safety::Unsafe(span) | Safety::Safe(span) => span,
2377            Safety::Default => {
2378                // Insert after the `coroutine_kind` if available.
2379                if let Some(extern_span) = self.header.ext.span() {
2380                    return extern_span.shrink_to_lo();
2381                }
2382
2383                // Insert right at the front of the signature.
2384                self.header_span().shrink_to_hi()
2385            }
2386        }
2387    }
2388
2389    /// The span of the header's extern, or where to insert it if empty.
2390    pub fn extern_span(&self) -> Span {
2391        self.header.ext.span().unwrap_or(self.safety_span().shrink_to_hi())
2392    }
2393}
2394
2395/// A constraint on an associated item.
2396///
2397/// ### Examples
2398///
2399/// * the `A = Ty` and `B = Ty` in `Trait<A = Ty, B = Ty>`
2400/// * the `G<Ty> = Ty` in `Trait<G<Ty> = Ty>`
2401/// * the `A: Bound` in `Trait<A: Bound>`
2402/// * the `RetTy` in `Trait(ArgTy, ArgTy) -> RetTy`
2403/// * the `C = { Ct }` in `Trait<C = { Ct }>` (feature `min_generic_const_args`)
2404/// * the `f(..): Bound` in `Trait<f(..): Bound>` (feature `return_type_notation`)
2405#[derive(#[automatically_derived]
impl ::core::clone::Clone for AssocItemConstraint {
    #[inline]
    fn clone(&self) -> AssocItemConstraint {
        AssocItemConstraint {
            id: ::core::clone::Clone::clone(&self.id),
            ident: ::core::clone::Clone::clone(&self.ident),
            gen_args: ::core::clone::Clone::clone(&self.gen_args),
            kind: ::core::clone::Clone::clone(&self.kind),
            span: ::core::clone::Clone::clone(&self.span),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for AssocItemConstraint {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    AssocItemConstraint {
                        id: ref __binding_0,
                        ident: ref __binding_1,
                        gen_args: ref __binding_2,
                        kind: ref __binding_3,
                        span: ref __binding_4 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_3,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_4,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for AssocItemConstraint {
            fn decode(__decoder: &mut __D) -> Self {
                AssocItemConstraint {
                    id: ::rustc_serialize::Decodable::decode(__decoder),
                    ident: ::rustc_serialize::Decodable::decode(__decoder),
                    gen_args: ::rustc_serialize::Decodable::decode(__decoder),
                    kind: ::rustc_serialize::Decodable::decode(__decoder),
                    span: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for AssocItemConstraint {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field5_finish(f,
            "AssocItemConstraint", "id", &self.id, "ident", &self.ident,
            "gen_args", &self.gen_args, "kind", &self.kind, "span",
            &&self.span)
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for
            AssocItemConstraint where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    AssocItemConstraint {
                        id: ref __binding_0,
                        ident: ref __binding_1,
                        gen_args: ref __binding_2,
                        kind: ref __binding_3,
                        span: ref __binding_4 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_2,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_3,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_4,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for AssocItemConstraint
            where __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    AssocItemConstraint {
                        id: ref mut __binding_0,
                        ident: ref mut __binding_1,
                        gen_args: ref mut __binding_2,
                        kind: ref mut __binding_3,
                        span: ref mut __binding_4 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_2,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_3,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_4,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
2406pub struct AssocItemConstraint {
2407    pub id: NodeId,
2408    pub ident: Ident,
2409    pub gen_args: Option<GenericArgs>,
2410    pub kind: AssocItemConstraintKind,
2411    pub span: Span,
2412}
2413
2414#[derive(#[automatically_derived]
impl ::core::clone::Clone for Term {
    #[inline]
    fn clone(&self) -> Term {
        match self {
            Term::Ty(__self_0) =>
                Term::Ty(::core::clone::Clone::clone(__self_0)),
            Term::Const(__self_0) =>
                Term::Const(::core::clone::Clone::clone(__self_0)),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for Term {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        Term::Ty(ref __binding_0) => { 0usize }
                        Term::Const(ref __binding_0) => { 1usize }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    Term::Ty(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    Term::Const(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for Term {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => {
                        Term::Ty(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    1usize => {
                        Term::Const(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `Term`, expected 0..2, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for Term {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            Term::Ty(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Ty",
                    &__self_0),
            Term::Const(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Const",
                    &__self_0),
        }
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for Term where
            __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    Term::Ty(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    Term::Const(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for Term where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    Term::Ty(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                    Term::Const(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
2415pub enum Term {
2416    Ty(Box<Ty>),
2417    Const(AnonConst),
2418}
2419
2420impl From<Box<Ty>> for Term {
2421    fn from(v: Box<Ty>) -> Self {
2422        Term::Ty(v)
2423    }
2424}
2425
2426impl From<AnonConst> for Term {
2427    fn from(v: AnonConst) -> Self {
2428        Term::Const(v)
2429    }
2430}
2431
2432/// The kind of [associated item constraint][AssocItemConstraint].
2433#[derive(#[automatically_derived]
impl ::core::clone::Clone for AssocItemConstraintKind {
    #[inline]
    fn clone(&self) -> AssocItemConstraintKind {
        match self {
            AssocItemConstraintKind::Equality { term: __self_0 } =>
                AssocItemConstraintKind::Equality {
                    term: ::core::clone::Clone::clone(__self_0),
                },
            AssocItemConstraintKind::Bound { bounds: __self_0 } =>
                AssocItemConstraintKind::Bound {
                    bounds: ::core::clone::Clone::clone(__self_0),
                },
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for AssocItemConstraintKind {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        AssocItemConstraintKind::Equality { term: ref __binding_0 }
                            => {
                            0usize
                        }
                        AssocItemConstraintKind::Bound { bounds: ref __binding_0 }
                            => {
                            1usize
                        }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    AssocItemConstraintKind::Equality { term: ref __binding_0 }
                        => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    AssocItemConstraintKind::Bound { bounds: ref __binding_0 }
                        => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for AssocItemConstraintKind {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => {
                        AssocItemConstraintKind::Equality {
                            term: ::rustc_serialize::Decodable::decode(__decoder),
                        }
                    }
                    1usize => {
                        AssocItemConstraintKind::Bound {
                            bounds: ::rustc_serialize::Decodable::decode(__decoder),
                        }
                    }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `AssocItemConstraintKind`, expected 0..2, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for AssocItemConstraintKind {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            AssocItemConstraintKind::Equality { term: __self_0 } =>
                ::core::fmt::Formatter::debug_struct_field1_finish(f,
                    "Equality", "term", &__self_0),
            AssocItemConstraintKind::Bound { bounds: __self_0 } =>
                ::core::fmt::Formatter::debug_struct_field1_finish(f, "Bound",
                    "bounds", &__self_0),
        }
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for
            AssocItemConstraintKind where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    AssocItemConstraintKind::Equality { term: ref __binding_0 }
                        => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    AssocItemConstraintKind::Bound { bounds: ref __binding_0 }
                        => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, (BoundKind::Bound))) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for
            AssocItemConstraintKind where __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    AssocItemConstraintKind::Equality {
                        term: ref mut __binding_0 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                    AssocItemConstraintKind::Bound { bounds: ref mut __binding_0
                        } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, (BoundKind::Bound))
                        }
                    }
                }
            }
        }
    };Walkable)]
2434pub enum AssocItemConstraintKind {
2435    /// An equality constraint for an associated item (e.g., `AssocTy = Ty` in `Trait<AssocTy = Ty>`).
2436    ///
2437    /// Also known as an *associated item binding* (we *bind* an associated item to a term).
2438    ///
2439    /// Furthermore, associated type equality constraints can also be referred to as *associated type
2440    /// bindings*. Similarly with associated const equality constraints and *associated const bindings*.
2441    Equality { term: Term },
2442    /// A bound on an associated type (e.g., `AssocTy: Bound` in `Trait<AssocTy: Bound>`).
2443    Bound {
2444        #[visitable(extra = BoundKind::Bound)]
2445        bounds: GenericBounds,
2446    },
2447}
2448
2449#[derive(const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for Ty {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    Ty {
                        id: ref __binding_0,
                        kind: ref __binding_1,
                        span: ref __binding_2,
                        tokens: ref __binding_3 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_3,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for Ty {
            fn decode(__decoder: &mut __D) -> Self {
                Ty {
                    id: ::rustc_serialize::Decodable::decode(__decoder),
                    kind: ::rustc_serialize::Decodable::decode(__decoder),
                    span: ::rustc_serialize::Decodable::decode(__decoder),
                    tokens: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for Ty {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field4_finish(f, "Ty", "id",
            &self.id, "kind", &self.kind, "span", &self.span, "tokens",
            &&self.tokens)
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for Ty where
            __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    Ty {
                        id: ref __binding_0,
                        kind: ref __binding_1,
                        span: ref __binding_2,
                        tokens: ref __binding_3 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_2,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_3,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for Ty where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    Ty {
                        id: ref mut __binding_0,
                        kind: ref mut __binding_1,
                        span: ref mut __binding_2,
                        tokens: ref mut __binding_3 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_2,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_3,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
2450pub struct Ty {
2451    pub id: NodeId,
2452    pub kind: TyKind,
2453    pub span: Span,
2454    pub tokens: Option<LazyAttrTokenStream>,
2455}
2456
2457impl Clone for Ty {
2458    fn clone(&self) -> Self {
2459        ensure_sufficient_stack(|| Self {
2460            id: self.id,
2461            kind: self.kind.clone(),
2462            span: self.span,
2463            tokens: self.tokens.clone(),
2464        })
2465    }
2466}
2467
2468impl From<Box<Ty>> for Ty {
2469    fn from(value: Box<Ty>) -> Self {
2470        *value
2471    }
2472}
2473
2474impl Ty {
2475    pub fn peel_refs(&self) -> &Self {
2476        let mut final_ty = self;
2477        while let TyKind::Ref(_, MutTy { ty, .. }) | TyKind::Ptr(MutTy { ty, .. }) = &final_ty.kind
2478        {
2479            final_ty = ty;
2480        }
2481        final_ty
2482    }
2483
2484    pub fn is_maybe_parenthesised_infer(&self) -> bool {
2485        match &self.kind {
2486            TyKind::Infer => true,
2487            TyKind::Paren(inner) => inner.is_maybe_parenthesised_infer(),
2488            _ => false,
2489        }
2490    }
2491}
2492
2493#[derive(#[automatically_derived]
impl ::core::clone::Clone for FnPtrTy {
    #[inline]
    fn clone(&self) -> FnPtrTy {
        FnPtrTy {
            safety: ::core::clone::Clone::clone(&self.safety),
            ext: ::core::clone::Clone::clone(&self.ext),
            generic_params: ::core::clone::Clone::clone(&self.generic_params),
            decl: ::core::clone::Clone::clone(&self.decl),
            decl_span: ::core::clone::Clone::clone(&self.decl_span),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for FnPtrTy {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    FnPtrTy {
                        safety: ref __binding_0,
                        ext: ref __binding_1,
                        generic_params: ref __binding_2,
                        decl: ref __binding_3,
                        decl_span: ref __binding_4 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_3,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_4,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for FnPtrTy {
            fn decode(__decoder: &mut __D) -> Self {
                FnPtrTy {
                    safety: ::rustc_serialize::Decodable::decode(__decoder),
                    ext: ::rustc_serialize::Decodable::decode(__decoder),
                    generic_params: ::rustc_serialize::Decodable::decode(__decoder),
                    decl: ::rustc_serialize::Decodable::decode(__decoder),
                    decl_span: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for FnPtrTy {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field5_finish(f, "FnPtrTy",
            "safety", &self.safety, "ext", &self.ext, "generic_params",
            &self.generic_params, "decl", &self.decl, "decl_span",
            &&self.decl_span)
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for FnPtrTy
            where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    FnPtrTy {
                        safety: ref __binding_0,
                        ext: ref __binding_1,
                        generic_params: ref __binding_2,
                        decl: ref __binding_3,
                        decl_span: ref __binding_4 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_2,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_3,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_4,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for FnPtrTy where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    FnPtrTy {
                        safety: ref mut __binding_0,
                        ext: ref mut __binding_1,
                        generic_params: ref mut __binding_2,
                        decl: ref mut __binding_3,
                        decl_span: ref mut __binding_4 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_2,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_3,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_4,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
2494pub struct FnPtrTy {
2495    pub safety: Safety,
2496    pub ext: Extern,
2497    pub generic_params: ThinVec<GenericParam>,
2498    pub decl: Box<FnDecl>,
2499    /// Span of the `[unsafe] [extern] fn(...) -> ...` part, i.e. everything
2500    /// after the generic params (if there are any, e.g. `for<'a>`).
2501    pub decl_span: Span,
2502}
2503
2504#[derive(#[automatically_derived]
impl ::core::clone::Clone for UnsafeBinderTy {
    #[inline]
    fn clone(&self) -> UnsafeBinderTy {
        UnsafeBinderTy {
            generic_params: ::core::clone::Clone::clone(&self.generic_params),
            inner_ty: ::core::clone::Clone::clone(&self.inner_ty),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for UnsafeBinderTy {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    UnsafeBinderTy {
                        generic_params: ref __binding_0, inner_ty: ref __binding_1 }
                        => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for UnsafeBinderTy {
            fn decode(__decoder: &mut __D) -> Self {
                UnsafeBinderTy {
                    generic_params: ::rustc_serialize::Decodable::decode(__decoder),
                    inner_ty: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for UnsafeBinderTy {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field2_finish(f,
            "UnsafeBinderTy", "generic_params", &self.generic_params,
            "inner_ty", &&self.inner_ty)
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for
            UnsafeBinderTy where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    UnsafeBinderTy {
                        generic_params: ref __binding_0, inner_ty: ref __binding_1 }
                        => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for UnsafeBinderTy where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    UnsafeBinderTy {
                        generic_params: ref mut __binding_0,
                        inner_ty: ref mut __binding_1 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
2505pub struct UnsafeBinderTy {
2506    pub generic_params: ThinVec<GenericParam>,
2507    pub inner_ty: Box<Ty>,
2508}
2509
2510/// The various kinds of type recognized by the compiler.
2511//
2512// Adding a new variant? Please update `test_ty` in `tests/ui/macros/stringify.rs`.
2513#[derive(#[automatically_derived]
impl ::core::clone::Clone for TyKind {
    #[inline]
    fn clone(&self) -> TyKind {
        match self {
            TyKind::Slice(__self_0) =>
                TyKind::Slice(::core::clone::Clone::clone(__self_0)),
            TyKind::Array(__self_0, __self_1) =>
                TyKind::Array(::core::clone::Clone::clone(__self_0),
                    ::core::clone::Clone::clone(__self_1)),
            TyKind::Ptr(__self_0) =>
                TyKind::Ptr(::core::clone::Clone::clone(__self_0)),
            TyKind::Ref(__self_0, __self_1) =>
                TyKind::Ref(::core::clone::Clone::clone(__self_0),
                    ::core::clone::Clone::clone(__self_1)),
            TyKind::PinnedRef(__self_0, __self_1) =>
                TyKind::PinnedRef(::core::clone::Clone::clone(__self_0),
                    ::core::clone::Clone::clone(__self_1)),
            TyKind::FnPtr(__self_0) =>
                TyKind::FnPtr(::core::clone::Clone::clone(__self_0)),
            TyKind::UnsafeBinder(__self_0) =>
                TyKind::UnsafeBinder(::core::clone::Clone::clone(__self_0)),
            TyKind::Never => TyKind::Never,
            TyKind::Tup(__self_0) =>
                TyKind::Tup(::core::clone::Clone::clone(__self_0)),
            TyKind::Path(__self_0, __self_1) =>
                TyKind::Path(::core::clone::Clone::clone(__self_0),
                    ::core::clone::Clone::clone(__self_1)),
            TyKind::TraitObject(__self_0, __self_1) =>
                TyKind::TraitObject(::core::clone::Clone::clone(__self_0),
                    ::core::clone::Clone::clone(__self_1)),
            TyKind::ImplTrait(__self_0, __self_1) =>
                TyKind::ImplTrait(::core::clone::Clone::clone(__self_0),
                    ::core::clone::Clone::clone(__self_1)),
            TyKind::Paren(__self_0) =>
                TyKind::Paren(::core::clone::Clone::clone(__self_0)),
            TyKind::Infer => TyKind::Infer,
            TyKind::ImplicitSelf => TyKind::ImplicitSelf,
            TyKind::MacCall(__self_0) =>
                TyKind::MacCall(::core::clone::Clone::clone(__self_0)),
            TyKind::CVarArgs => TyKind::CVarArgs,
            TyKind::Pat(__self_0, __self_1) =>
                TyKind::Pat(::core::clone::Clone::clone(__self_0),
                    ::core::clone::Clone::clone(__self_1)),
            TyKind::FieldOf(__self_0, __self_1, __self_2) =>
                TyKind::FieldOf(::core::clone::Clone::clone(__self_0),
                    ::core::clone::Clone::clone(__self_1),
                    ::core::clone::Clone::clone(__self_2)),
            TyKind::Dummy => TyKind::Dummy,
            TyKind::Err(__self_0) =>
                TyKind::Err(::core::clone::Clone::clone(__self_0)),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for TyKind {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        TyKind::Slice(ref __binding_0) => { 0usize }
                        TyKind::Array(ref __binding_0, ref __binding_1) => {
                            1usize
                        }
                        TyKind::Ptr(ref __binding_0) => { 2usize }
                        TyKind::Ref(ref __binding_0, ref __binding_1) => { 3usize }
                        TyKind::PinnedRef(ref __binding_0, ref __binding_1) => {
                            4usize
                        }
                        TyKind::FnPtr(ref __binding_0) => { 5usize }
                        TyKind::UnsafeBinder(ref __binding_0) => { 6usize }
                        TyKind::Never => { 7usize }
                        TyKind::Tup(ref __binding_0) => { 8usize }
                        TyKind::Path(ref __binding_0, ref __binding_1) => { 9usize }
                        TyKind::TraitObject(ref __binding_0, ref __binding_1) => {
                            10usize
                        }
                        TyKind::ImplTrait(ref __binding_0, ref __binding_1) => {
                            11usize
                        }
                        TyKind::Paren(ref __binding_0) => { 12usize }
                        TyKind::Infer => { 13usize }
                        TyKind::ImplicitSelf => { 14usize }
                        TyKind::MacCall(ref __binding_0) => { 15usize }
                        TyKind::CVarArgs => { 16usize }
                        TyKind::Pat(ref __binding_0, ref __binding_1) => { 17usize }
                        TyKind::FieldOf(ref __binding_0, ref __binding_1,
                            ref __binding_2) => {
                            18usize
                        }
                        TyKind::Dummy => { 19usize }
                        TyKind::Err(ref __binding_0) => { 20usize }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    TyKind::Slice(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    TyKind::Array(ref __binding_0, ref __binding_1) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                    }
                    TyKind::Ptr(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    TyKind::Ref(ref __binding_0, ref __binding_1) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                    }
                    TyKind::PinnedRef(ref __binding_0, ref __binding_1) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                    }
                    TyKind::FnPtr(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    TyKind::UnsafeBinder(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    TyKind::Never => {}
                    TyKind::Tup(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    TyKind::Path(ref __binding_0, ref __binding_1) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                    }
                    TyKind::TraitObject(ref __binding_0, ref __binding_1) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                    }
                    TyKind::ImplTrait(ref __binding_0, ref __binding_1) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                    }
                    TyKind::Paren(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    TyKind::Infer => {}
                    TyKind::ImplicitSelf => {}
                    TyKind::MacCall(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    TyKind::CVarArgs => {}
                    TyKind::Pat(ref __binding_0, ref __binding_1) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                    }
                    TyKind::FieldOf(ref __binding_0, ref __binding_1,
                        ref __binding_2) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                    }
                    TyKind::Dummy => {}
                    TyKind::Err(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for TyKind {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => {
                        TyKind::Slice(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    1usize => {
                        TyKind::Array(::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder))
                    }
                    2usize => {
                        TyKind::Ptr(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    3usize => {
                        TyKind::Ref(::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder))
                    }
                    4usize => {
                        TyKind::PinnedRef(::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder))
                    }
                    5usize => {
                        TyKind::FnPtr(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    6usize => {
                        TyKind::UnsafeBinder(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    7usize => { TyKind::Never }
                    8usize => {
                        TyKind::Tup(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    9usize => {
                        TyKind::Path(::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder))
                    }
                    10usize => {
                        TyKind::TraitObject(::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder))
                    }
                    11usize => {
                        TyKind::ImplTrait(::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder))
                    }
                    12usize => {
                        TyKind::Paren(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    13usize => { TyKind::Infer }
                    14usize => { TyKind::ImplicitSelf }
                    15usize => {
                        TyKind::MacCall(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    16usize => { TyKind::CVarArgs }
                    17usize => {
                        TyKind::Pat(::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder))
                    }
                    18usize => {
                        TyKind::FieldOf(::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder))
                    }
                    19usize => { TyKind::Dummy }
                    20usize => {
                        TyKind::Err(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `TyKind`, expected 0..21, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for TyKind {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            TyKind::Slice(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Slice",
                    &__self_0),
            TyKind::Array(__self_0, __self_1) =>
                ::core::fmt::Formatter::debug_tuple_field2_finish(f, "Array",
                    __self_0, &__self_1),
            TyKind::Ptr(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Ptr",
                    &__self_0),
            TyKind::Ref(__self_0, __self_1) =>
                ::core::fmt::Formatter::debug_tuple_field2_finish(f, "Ref",
                    __self_0, &__self_1),
            TyKind::PinnedRef(__self_0, __self_1) =>
                ::core::fmt::Formatter::debug_tuple_field2_finish(f,
                    "PinnedRef", __self_0, &__self_1),
            TyKind::FnPtr(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "FnPtr",
                    &__self_0),
            TyKind::UnsafeBinder(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "UnsafeBinder", &__self_0),
            TyKind::Never => ::core::fmt::Formatter::write_str(f, "Never"),
            TyKind::Tup(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Tup",
                    &__self_0),
            TyKind::Path(__self_0, __self_1) =>
                ::core::fmt::Formatter::debug_tuple_field2_finish(f, "Path",
                    __self_0, &__self_1),
            TyKind::TraitObject(__self_0, __self_1) =>
                ::core::fmt::Formatter::debug_tuple_field2_finish(f,
                    "TraitObject", __self_0, &__self_1),
            TyKind::ImplTrait(__self_0, __self_1) =>
                ::core::fmt::Formatter::debug_tuple_field2_finish(f,
                    "ImplTrait", __self_0, &__self_1),
            TyKind::Paren(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Paren",
                    &__self_0),
            TyKind::Infer => ::core::fmt::Formatter::write_str(f, "Infer"),
            TyKind::ImplicitSelf =>
                ::core::fmt::Formatter::write_str(f, "ImplicitSelf"),
            TyKind::MacCall(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "MacCall", &__self_0),
            TyKind::CVarArgs =>
                ::core::fmt::Formatter::write_str(f, "CVarArgs"),
            TyKind::Pat(__self_0, __self_1) =>
                ::core::fmt::Formatter::debug_tuple_field2_finish(f, "Pat",
                    __self_0, &__self_1),
            TyKind::FieldOf(__self_0, __self_1, __self_2) =>
                ::core::fmt::Formatter::debug_tuple_field3_finish(f,
                    "FieldOf", __self_0, __self_1, &__self_2),
            TyKind::Dummy => ::core::fmt::Formatter::write_str(f, "Dummy"),
            TyKind::Err(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Err",
                    &__self_0),
        }
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for TyKind where
            __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    TyKind::Slice(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    TyKind::Array(ref __binding_0, ref __binding_1) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    TyKind::Ptr(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    TyKind::Ref(ref __binding_0, ref __binding_1) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, (LifetimeCtxt::Ref))) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    TyKind::PinnedRef(ref __binding_0, ref __binding_1) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, (LifetimeCtxt::Ref))) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    TyKind::FnPtr(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    TyKind::UnsafeBinder(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    TyKind::Never => {}
                    TyKind::Tup(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    TyKind::Path(ref __binding_0, ref __binding_1) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    TyKind::TraitObject(ref __binding_0, ref __binding_1) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, (BoundKind::TraitObject))) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    TyKind::ImplTrait(ref __binding_0, ref __binding_1) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, (BoundKind::Impl))) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    TyKind::Paren(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    TyKind::Infer => {}
                    TyKind::ImplicitSelf => {}
                    TyKind::MacCall(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    TyKind::CVarArgs => {}
                    TyKind::Pat(ref __binding_0, ref __binding_1) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    TyKind::FieldOf(ref __binding_0, ref __binding_1,
                        ref __binding_2) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_2,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    TyKind::Dummy => {}
                    TyKind::Err(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for TyKind where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    TyKind::Slice(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                    TyKind::Array(ref mut __binding_0, ref mut __binding_1) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                    }
                    TyKind::Ptr(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                    TyKind::Ref(ref mut __binding_0, ref mut __binding_1) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, (LifetimeCtxt::Ref))
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                    }
                    TyKind::PinnedRef(ref mut __binding_0, ref mut __binding_1)
                        => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, (LifetimeCtxt::Ref))
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                    }
                    TyKind::FnPtr(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                    TyKind::UnsafeBinder(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                    TyKind::Never => {}
                    TyKind::Tup(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                    TyKind::Path(ref mut __binding_0, ref mut __binding_1) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                    }
                    TyKind::TraitObject(ref mut __binding_0,
                        ref mut __binding_1) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, (BoundKind::TraitObject))
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                    }
                    TyKind::ImplTrait(ref mut __binding_0, ref mut __binding_1)
                        => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, (BoundKind::Impl))
                        }
                    }
                    TyKind::Paren(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                    TyKind::Infer => {}
                    TyKind::ImplicitSelf => {}
                    TyKind::MacCall(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                    TyKind::CVarArgs => {}
                    TyKind::Pat(ref mut __binding_0, ref mut __binding_1) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                    }
                    TyKind::FieldOf(ref mut __binding_0, ref mut __binding_1,
                        ref mut __binding_2) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_2,
                                __visitor, ())
                        }
                    }
                    TyKind::Dummy => {}
                    TyKind::Err(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
2514pub enum TyKind {
2515    /// A variable-length slice (`[T]`).
2516    Slice(Box<Ty>),
2517    /// A fixed length array (`[T; n]`).
2518    Array(Box<Ty>, AnonConst),
2519    /// A raw pointer (`*const T` or `*mut T`).
2520    Ptr(MutTy),
2521    /// A reference (`&'a T` or `&'a mut T`).
2522    Ref(#[visitable(extra = LifetimeCtxt::Ref)] Option<Lifetime>, MutTy),
2523    /// A pinned reference (`&'a pin const T` or `&'a pin mut T`).
2524    ///
2525    /// Desugars into `Pin<&'a T>` or `Pin<&'a mut T>`.
2526    PinnedRef(#[visitable(extra = LifetimeCtxt::Ref)] Option<Lifetime>, MutTy),
2527    /// A function pointer type (e.g., `fn(usize) -> bool`).
2528    FnPtr(Box<FnPtrTy>),
2529    /// An unsafe existential lifetime binder (e.g., `unsafe<'a> &'a ()`).
2530    UnsafeBinder(Box<UnsafeBinderTy>),
2531    /// The never type (`!`).
2532    Never,
2533    /// A tuple (`(A, B, C, D,...)`).
2534    Tup(ThinVec<Box<Ty>>),
2535    /// A path (`module::module::...::Type`), optionally
2536    /// "qualified", e.g., `<Vec<T> as SomeTrait>::SomeType`.
2537    ///
2538    /// Type parameters are stored in the `Path` itself.
2539    Path(Option<Box<QSelf>>, Path),
2540    /// A trait object type `Bound1 + Bound2 + Bound3`
2541    /// where `Bound` is a trait or a lifetime.
2542    TraitObject(#[visitable(extra = BoundKind::TraitObject)] GenericBounds, TraitObjectSyntax),
2543    /// An `impl Bound1 + Bound2 + Bound3` type
2544    /// where `Bound` is a trait or a lifetime.
2545    ///
2546    /// The `NodeId` exists to prevent lowering from having to
2547    /// generate `NodeId`s on the fly, which would complicate
2548    /// the generation of opaque `type Foo = impl Trait` items significantly.
2549    ImplTrait(NodeId, #[visitable(extra = BoundKind::Impl)] GenericBounds),
2550    /// No-op; kept solely so that we can pretty-print faithfully.
2551    Paren(Box<Ty>),
2552    /// This means the type should be inferred instead of it having been
2553    /// specified. This can appear anywhere in a type.
2554    Infer,
2555    /// Inferred type of a `self` or `&self` argument in a method.
2556    ImplicitSelf,
2557    /// A macro in the type position.
2558    MacCall(Box<MacCall>),
2559    /// Placeholder for a `va_list`.
2560    CVarArgs,
2561    /// Pattern types like `pattern_type!(u32 is 1..=)`, which is the same as `NonZero<u32>`,
2562    /// just as part of the type system.
2563    Pat(Box<Ty>, Box<TyPat>),
2564    /// A `field_of` expression (e.g., `builtin # field_of(Struct, field)`).
2565    ///
2566    /// Usually not written directly in user code but indirectly via the macro
2567    /// `core::field::field_of!(...)`.
2568    FieldOf(Box<Ty>, Option<Ident>, Ident),
2569    /// Sometimes we need a dummy value when no error has occurred.
2570    Dummy,
2571    /// Placeholder for a kind that has failed to be defined.
2572    Err(ErrorGuaranteed),
2573}
2574
2575impl TyKind {
2576    pub fn is_implicit_self(&self) -> bool {
2577        #[allow(non_exhaustive_omitted_patterns)] match self {
    TyKind::ImplicitSelf => true,
    _ => false,
}matches!(self, TyKind::ImplicitSelf)
2578    }
2579
2580    pub fn is_unit(&self) -> bool {
2581        #[allow(non_exhaustive_omitted_patterns)] match self {
    TyKind::Tup(tys) if tys.is_empty() => true,
    _ => false,
}matches!(self, TyKind::Tup(tys) if tys.is_empty())
2582    }
2583
2584    pub fn is_simple_path(&self) -> Option<Symbol> {
2585        if let TyKind::Path(None, Path { segments, .. }) = &self
2586            && let [segment] = &segments[..]
2587            && segment.args.is_none()
2588        {
2589            Some(segment.ident.name)
2590        } else {
2591            None
2592        }
2593    }
2594
2595    /// Returns `true` if this type is considered a scalar primitive (e.g.,
2596    /// `i32`, `u8`, `bool`, etc).
2597    ///
2598    /// This check is based on **symbol equality** and does **not** remove any
2599    /// path prefixes or references. If a type alias or shadowing is present
2600    /// (e.g., `type i32 = CustomType;`), this method will still return `true`
2601    /// for `i32`, even though it may not refer to the primitive type.
2602    pub fn maybe_scalar(&self) -> bool {
2603        let Some(ty_sym) = self.is_simple_path() else {
2604            // unit type
2605            return self.is_unit();
2606        };
2607        #[allow(non_exhaustive_omitted_patterns)] match ty_sym {
    sym::i8 | sym::i16 | sym::i32 | sym::i64 | sym::i128 | sym::u8 | sym::u16
        | sym::u32 | sym::u64 | sym::u128 | sym::f16 | sym::f32 | sym::f64 |
        sym::f128 | sym::char | sym::bool => true,
    _ => false,
}matches!(
2608            ty_sym,
2609            sym::i8
2610                | sym::i16
2611                | sym::i32
2612                | sym::i64
2613                | sym::i128
2614                | sym::u8
2615                | sym::u16
2616                | sym::u32
2617                | sym::u64
2618                | sym::u128
2619                | sym::f16
2620                | sym::f32
2621                | sym::f64
2622                | sym::f128
2623                | sym::char
2624                | sym::bool
2625        )
2626    }
2627}
2628
2629/// A pattern type pattern.
2630#[derive(#[automatically_derived]
impl ::core::clone::Clone for TyPat {
    #[inline]
    fn clone(&self) -> TyPat {
        TyPat {
            id: ::core::clone::Clone::clone(&self.id),
            kind: ::core::clone::Clone::clone(&self.kind),
            span: ::core::clone::Clone::clone(&self.span),
            tokens: ::core::clone::Clone::clone(&self.tokens),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for TyPat {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    TyPat {
                        id: ref __binding_0,
                        kind: ref __binding_1,
                        span: ref __binding_2,
                        tokens: ref __binding_3 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_3,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for TyPat {
            fn decode(__decoder: &mut __D) -> Self {
                TyPat {
                    id: ::rustc_serialize::Decodable::decode(__decoder),
                    kind: ::rustc_serialize::Decodable::decode(__decoder),
                    span: ::rustc_serialize::Decodable::decode(__decoder),
                    tokens: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for TyPat {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field4_finish(f, "TyPat", "id",
            &self.id, "kind", &self.kind, "span", &self.span, "tokens",
            &&self.tokens)
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for TyPat where
            __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    TyPat {
                        id: ref __binding_0,
                        kind: ref __binding_1,
                        span: ref __binding_2,
                        tokens: ref __binding_3 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_2,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_3,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for TyPat where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    TyPat {
                        id: ref mut __binding_0,
                        kind: ref mut __binding_1,
                        span: ref mut __binding_2,
                        tokens: ref mut __binding_3 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_2,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_3,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
2631pub struct TyPat {
2632    pub id: NodeId,
2633    pub kind: TyPatKind,
2634    pub span: Span,
2635    pub tokens: Option<LazyAttrTokenStream>,
2636}
2637
2638/// All the different flavors of pattern that Rust recognizes.
2639//
2640// Adding a new variant? Please update `test_pat` in `tests/ui/macros/stringify.rs`.
2641#[derive(#[automatically_derived]
impl ::core::clone::Clone for TyPatKind {
    #[inline]
    fn clone(&self) -> TyPatKind {
        match self {
            TyPatKind::Range(__self_0, __self_1, __self_2) =>
                TyPatKind::Range(::core::clone::Clone::clone(__self_0),
                    ::core::clone::Clone::clone(__self_1),
                    ::core::clone::Clone::clone(__self_2)),
            TyPatKind::NotNull => TyPatKind::NotNull,
            TyPatKind::Or(__self_0) =>
                TyPatKind::Or(::core::clone::Clone::clone(__self_0)),
            TyPatKind::Err(__self_0) =>
                TyPatKind::Err(::core::clone::Clone::clone(__self_0)),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for TyPatKind {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        TyPatKind::Range(ref __binding_0, ref __binding_1,
                            ref __binding_2) => {
                            0usize
                        }
                        TyPatKind::NotNull => { 1usize }
                        TyPatKind::Or(ref __binding_0) => { 2usize }
                        TyPatKind::Err(ref __binding_0) => { 3usize }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    TyPatKind::Range(ref __binding_0, ref __binding_1,
                        ref __binding_2) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                    }
                    TyPatKind::NotNull => {}
                    TyPatKind::Or(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    TyPatKind::Err(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for TyPatKind {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => {
                        TyPatKind::Range(::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder))
                    }
                    1usize => { TyPatKind::NotNull }
                    2usize => {
                        TyPatKind::Or(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    3usize => {
                        TyPatKind::Err(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `TyPatKind`, expected 0..4, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for TyPatKind {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            TyPatKind::Range(__self_0, __self_1, __self_2) =>
                ::core::fmt::Formatter::debug_tuple_field3_finish(f, "Range",
                    __self_0, __self_1, &__self_2),
            TyPatKind::NotNull =>
                ::core::fmt::Formatter::write_str(f, "NotNull"),
            TyPatKind::Or(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Or",
                    &__self_0),
            TyPatKind::Err(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Err",
                    &__self_0),
        }
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for TyPatKind
            where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    TyPatKind::Range(ref __binding_0, ref __binding_1,
                        ref __binding_2) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_2,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    TyPatKind::NotNull => {}
                    TyPatKind::Or(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    TyPatKind::Err(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for TyPatKind where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    TyPatKind::Range(ref mut __binding_0, ref mut __binding_1,
                        ref mut __binding_2) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_2,
                                __visitor, ())
                        }
                    }
                    TyPatKind::NotNull => {}
                    TyPatKind::Or(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                    TyPatKind::Err(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
2642pub enum TyPatKind {
2643    /// A range pattern (e.g., `1...2`, `1..2`, `1..`, `..2`, `1..=2`, `..=2`).
2644    Range(Option<Box<AnonConst>>, Option<Box<AnonConst>>, Spanned<RangeEnd>),
2645
2646    /// A `!null` pattern for raw pointers.
2647    NotNull,
2648
2649    Or(ThinVec<TyPat>),
2650
2651    /// Placeholder for a pattern that wasn't syntactically well formed in some way.
2652    Err(ErrorGuaranteed),
2653}
2654
2655/// Syntax used to declare a trait object.
2656#[derive(#[automatically_derived]
impl ::core::clone::Clone for TraitObjectSyntax {
    #[inline]
    fn clone(&self) -> TraitObjectSyntax { *self }
}Clone, #[automatically_derived]
impl ::core::marker::Copy for TraitObjectSyntax { }Copy, #[automatically_derived]
impl ::core::cmp::PartialEq for TraitObjectSyntax {
    #[inline]
    fn eq(&self, other: &TraitObjectSyntax) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr
    }
}PartialEq, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for TraitObjectSyntax {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        TraitObjectSyntax::Dyn => { 0usize }
                        TraitObjectSyntax::None => { 1usize }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    TraitObjectSyntax::Dyn => {}
                    TraitObjectSyntax::None => {}
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for TraitObjectSyntax {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => { TraitObjectSyntax::Dyn }
                    1usize => { TraitObjectSyntax::None }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `TraitObjectSyntax`, expected 0..2, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for TraitObjectSyntax {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::write_str(f,
            match self {
                TraitObjectSyntax::Dyn => "Dyn",
                TraitObjectSyntax::None => "None",
            })
    }
}Debug, const _: () =
    {
        impl<__CTX> ::rustc_data_structures::stable_hasher::HashStable<__CTX>
            for TraitObjectSyntax where __CTX: ::rustc_span::HashStableContext
            {
            #[inline]
            fn hash_stable(&self, __hcx: &mut __CTX,
                __hasher:
                    &mut ::rustc_data_structures::stable_hasher::StableHasher) {
                ::std::mem::discriminant(self).hash_stable(__hcx, __hasher);
                match *self {
                    TraitObjectSyntax::Dyn => {}
                    TraitObjectSyntax::None => {}
                }
            }
        }
    };HashStable_Generic, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for
            TraitObjectSyntax where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    TraitObjectSyntax::Dyn => {}
                    TraitObjectSyntax::None => {}
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for TraitObjectSyntax
            where __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    TraitObjectSyntax::Dyn => {}
                    TraitObjectSyntax::None => {}
                }
            }
        }
    };Walkable)]
2657#[repr(u8)]
2658pub enum TraitObjectSyntax {
2659    // SAFETY: When adding new variants make sure to update the `Tag` impl.
2660    Dyn = 0,
2661    None = 1,
2662}
2663
2664/// SAFETY: `TraitObjectSyntax` only has 3 data-less variants which means
2665/// it can be represented with a `u2`. We use `repr(u8)` to guarantee the
2666/// discriminants of the variants are no greater than `3`.
2667unsafe impl Tag for TraitObjectSyntax {
2668    const BITS: u32 = 2;
2669
2670    fn into_usize(self) -> usize {
2671        self as u8 as usize
2672    }
2673
2674    unsafe fn from_usize(tag: usize) -> Self {
2675        match tag {
2676            0 => TraitObjectSyntax::Dyn,
2677            1 => TraitObjectSyntax::None,
2678            _ => ::core::panicking::panic("internal error: entered unreachable code")unreachable!(),
2679        }
2680    }
2681}
2682
2683#[derive(#[automatically_derived]
impl ::core::clone::Clone for PreciseCapturingArg {
    #[inline]
    fn clone(&self) -> PreciseCapturingArg {
        match self {
            PreciseCapturingArg::Lifetime(__self_0) =>
                PreciseCapturingArg::Lifetime(::core::clone::Clone::clone(__self_0)),
            PreciseCapturingArg::Arg(__self_0, __self_1) =>
                PreciseCapturingArg::Arg(::core::clone::Clone::clone(__self_0),
                    ::core::clone::Clone::clone(__self_1)),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for PreciseCapturingArg {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        PreciseCapturingArg::Lifetime(ref __binding_0) => { 0usize }
                        PreciseCapturingArg::Arg(ref __binding_0, ref __binding_1)
                            => {
                            1usize
                        }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    PreciseCapturingArg::Lifetime(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    PreciseCapturingArg::Arg(ref __binding_0, ref __binding_1)
                        => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for PreciseCapturingArg {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => {
                        PreciseCapturingArg::Lifetime(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    1usize => {
                        PreciseCapturingArg::Arg(::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder))
                    }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `PreciseCapturingArg`, expected 0..2, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for PreciseCapturingArg {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            PreciseCapturingArg::Lifetime(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "Lifetime", &__self_0),
            PreciseCapturingArg::Arg(__self_0, __self_1) =>
                ::core::fmt::Formatter::debug_tuple_field2_finish(f, "Arg",
                    __self_0, &__self_1),
        }
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for
            PreciseCapturingArg where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    PreciseCapturingArg::Lifetime(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, (LifetimeCtxt::GenericArg))) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    PreciseCapturingArg::Arg(ref __binding_0, ref __binding_1)
                        => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for PreciseCapturingArg
            where __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    PreciseCapturingArg::Lifetime(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, (LifetimeCtxt::GenericArg))
                        }
                    }
                    PreciseCapturingArg::Arg(ref mut __binding_0,
                        ref mut __binding_1) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
2684pub enum PreciseCapturingArg {
2685    /// Lifetime parameter.
2686    Lifetime(#[visitable(extra = LifetimeCtxt::GenericArg)] Lifetime),
2687    /// Type or const parameter.
2688    Arg(Path, NodeId),
2689}
2690
2691/// Inline assembly operand explicit register or register class.
2692///
2693/// E.g., `"eax"` as in `asm!("mov eax, 2", out("eax") result)`.
2694#[derive(#[automatically_derived]
impl ::core::clone::Clone for InlineAsmRegOrRegClass {
    #[inline]
    fn clone(&self) -> InlineAsmRegOrRegClass {
        let _: ::core::clone::AssertParamIsClone<Symbol>;
        *self
    }
}Clone, #[automatically_derived]
impl ::core::marker::Copy for InlineAsmRegOrRegClass { }Copy, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for InlineAsmRegOrRegClass {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        InlineAsmRegOrRegClass::Reg(ref __binding_0) => { 0usize }
                        InlineAsmRegOrRegClass::RegClass(ref __binding_0) => {
                            1usize
                        }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    InlineAsmRegOrRegClass::Reg(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    InlineAsmRegOrRegClass::RegClass(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for InlineAsmRegOrRegClass {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => {
                        InlineAsmRegOrRegClass::Reg(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    1usize => {
                        InlineAsmRegOrRegClass::RegClass(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `InlineAsmRegOrRegClass`, expected 0..2, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for InlineAsmRegOrRegClass {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            InlineAsmRegOrRegClass::Reg(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Reg",
                    &__self_0),
            InlineAsmRegOrRegClass::RegClass(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "RegClass", &__self_0),
        }
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for
            InlineAsmRegOrRegClass where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    InlineAsmRegOrRegClass::Reg(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    InlineAsmRegOrRegClass::RegClass(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for
            InlineAsmRegOrRegClass where __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    InlineAsmRegOrRegClass::Reg(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                    InlineAsmRegOrRegClass::RegClass(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
2695pub enum InlineAsmRegOrRegClass {
2696    Reg(Symbol),
2697    RegClass(Symbol),
2698}
2699
2700#[derive(#[automatically_derived]
impl ::core::clone::Clone for InlineAsmOptions {
    #[inline]
    fn clone(&self) -> InlineAsmOptions {
        let _: ::core::clone::AssertParamIsClone<u16>;
        *self
    }
}Clone, #[automatically_derived]
impl ::core::marker::Copy for InlineAsmOptions { }Copy, #[automatically_derived]
impl ::core::cmp::PartialEq for InlineAsmOptions {
    #[inline]
    fn eq(&self, other: &InlineAsmOptions) -> bool { self.0 == other.0 }
}PartialEq, #[automatically_derived]
impl ::core::cmp::Eq for InlineAsmOptions {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<u16>;
    }
}Eq, #[automatically_derived]
impl ::core::hash::Hash for InlineAsmOptions {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        ::core::hash::Hash::hash(&self.0, state)
    }
}Hash, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for InlineAsmOptions {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    InlineAsmOptions(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for InlineAsmOptions {
            fn decode(__decoder: &mut __D) -> Self {
                InlineAsmOptions(::rustc_serialize::Decodable::decode(__decoder))
            }
        }
    };Decodable, const _: () =
    {
        impl<__CTX> ::rustc_data_structures::stable_hasher::HashStable<__CTX>
            for InlineAsmOptions where __CTX: ::rustc_span::HashStableContext
            {
            #[inline]
            fn hash_stable(&self, __hcx: &mut __CTX,
                __hasher:
                    &mut ::rustc_data_structures::stable_hasher::StableHasher) {
                match *self {
                    InlineAsmOptions(ref __binding_0) => {
                        { __binding_0.hash_stable(__hcx, __hasher); }
                    }
                }
            }
        }
    };HashStable_Generic)]
2701pub struct InlineAsmOptions(u16);
2702impl InlineAsmOptions {
    #[allow(deprecated, non_upper_case_globals,)]
    pub const PURE: Self = Self::from_bits_retain(1 << 0);
    #[allow(deprecated, non_upper_case_globals,)]
    pub const NOMEM: Self = Self::from_bits_retain(1 << 1);
    #[allow(deprecated, non_upper_case_globals,)]
    pub const READONLY: Self = Self::from_bits_retain(1 << 2);
    #[allow(deprecated, non_upper_case_globals,)]
    pub const PRESERVES_FLAGS: Self = Self::from_bits_retain(1 << 3);
    #[allow(deprecated, non_upper_case_globals,)]
    pub const NORETURN: Self = Self::from_bits_retain(1 << 4);
    #[allow(deprecated, non_upper_case_globals,)]
    pub const NOSTACK: Self = Self::from_bits_retain(1 << 5);
    #[allow(deprecated, non_upper_case_globals,)]
    pub const ATT_SYNTAX: Self = Self::from_bits_retain(1 << 6);
    #[allow(deprecated, non_upper_case_globals,)]
    pub const RAW: Self = Self::from_bits_retain(1 << 7);
    #[allow(deprecated, non_upper_case_globals,)]
    pub const MAY_UNWIND: Self = Self::from_bits_retain(1 << 8);
}
impl ::bitflags::Flags for InlineAsmOptions {
    const FLAGS: &'static [::bitflags::Flag<InlineAsmOptions>] =
        &[{

                        #[allow(deprecated, non_upper_case_globals,)]
                        ::bitflags::Flag::new("PURE", InlineAsmOptions::PURE)
                    },
                    {

                        #[allow(deprecated, non_upper_case_globals,)]
                        ::bitflags::Flag::new("NOMEM", InlineAsmOptions::NOMEM)
                    },
                    {

                        #[allow(deprecated, non_upper_case_globals,)]
                        ::bitflags::Flag::new("READONLY",
                            InlineAsmOptions::READONLY)
                    },
                    {

                        #[allow(deprecated, non_upper_case_globals,)]
                        ::bitflags::Flag::new("PRESERVES_FLAGS",
                            InlineAsmOptions::PRESERVES_FLAGS)
                    },
                    {

                        #[allow(deprecated, non_upper_case_globals,)]
                        ::bitflags::Flag::new("NORETURN",
                            InlineAsmOptions::NORETURN)
                    },
                    {

                        #[allow(deprecated, non_upper_case_globals,)]
                        ::bitflags::Flag::new("NOSTACK", InlineAsmOptions::NOSTACK)
                    },
                    {

                        #[allow(deprecated, non_upper_case_globals,)]
                        ::bitflags::Flag::new("ATT_SYNTAX",
                            InlineAsmOptions::ATT_SYNTAX)
                    },
                    {

                        #[allow(deprecated, non_upper_case_globals,)]
                        ::bitflags::Flag::new("RAW", InlineAsmOptions::RAW)
                    },
                    {

                        #[allow(deprecated, non_upper_case_globals,)]
                        ::bitflags::Flag::new("MAY_UNWIND",
                            InlineAsmOptions::MAY_UNWIND)
                    }];
    type Bits = u16;
    fn bits(&self) -> u16 { InlineAsmOptions::bits(self) }
    fn from_bits_retain(bits: u16) -> InlineAsmOptions {
        InlineAsmOptions::from_bits_retain(bits)
    }
}
#[allow(dead_code, deprecated, unused_doc_comments, unused_attributes,
unused_mut, unused_imports, non_upper_case_globals, clippy ::
assign_op_pattern, clippy :: iter_without_into_iter,)]
const _: () =
    {
        #[allow(dead_code, deprecated, unused_attributes)]
        impl InlineAsmOptions {
            /// Get a flags value with all bits unset.
            #[inline]
            pub const fn empty() -> Self {
                Self(<u16 as ::bitflags::Bits>::EMPTY)
            }
            /// Get a flags value with all known bits set.
            #[inline]
            pub const fn all() -> Self {
                let mut truncated = <u16 as ::bitflags::Bits>::EMPTY;
                let mut i = 0;
                {
                    {
                        let flag =
                            <InlineAsmOptions as
                                            ::bitflags::Flags>::FLAGS[i].value().bits();
                        truncated = truncated | flag;
                        i += 1;
                    }
                };
                {
                    {
                        let flag =
                            <InlineAsmOptions as
                                            ::bitflags::Flags>::FLAGS[i].value().bits();
                        truncated = truncated | flag;
                        i += 1;
                    }
                };
                {
                    {
                        let flag =
                            <InlineAsmOptions as
                                            ::bitflags::Flags>::FLAGS[i].value().bits();
                        truncated = truncated | flag;
                        i += 1;
                    }
                };
                {
                    {
                        let flag =
                            <InlineAsmOptions as
                                            ::bitflags::Flags>::FLAGS[i].value().bits();
                        truncated = truncated | flag;
                        i += 1;
                    }
                };
                {
                    {
                        let flag =
                            <InlineAsmOptions as
                                            ::bitflags::Flags>::FLAGS[i].value().bits();
                        truncated = truncated | flag;
                        i += 1;
                    }
                };
                {
                    {
                        let flag =
                            <InlineAsmOptions as
                                            ::bitflags::Flags>::FLAGS[i].value().bits();
                        truncated = truncated | flag;
                        i += 1;
                    }
                };
                {
                    {
                        let flag =
                            <InlineAsmOptions as
                                            ::bitflags::Flags>::FLAGS[i].value().bits();
                        truncated = truncated | flag;
                        i += 1;
                    }
                };
                {
                    {
                        let flag =
                            <InlineAsmOptions as
                                            ::bitflags::Flags>::FLAGS[i].value().bits();
                        truncated = truncated | flag;
                        i += 1;
                    }
                };
                {
                    {
                        let flag =
                            <InlineAsmOptions as
                                            ::bitflags::Flags>::FLAGS[i].value().bits();
                        truncated = truncated | flag;
                        i += 1;
                    }
                };
                let _ = i;
                Self(truncated)
            }
            /// Get the underlying bits value.
            ///
            /// The returned value is exactly the bits set in this flags value.
            #[inline]
            pub const fn bits(&self) -> u16 { self.0 }
            /// Convert from a bits value.
            ///
            /// This method will return `None` if any unknown bits are set.
            #[inline]
            pub const fn from_bits(bits: u16)
                -> ::bitflags::__private::core::option::Option<Self> {
                let truncated = Self::from_bits_truncate(bits).0;
                if truncated == bits {
                    ::bitflags::__private::core::option::Option::Some(Self(bits))
                } else { ::bitflags::__private::core::option::Option::None }
            }
            /// Convert from a bits value, unsetting any unknown bits.
            #[inline]
            pub const fn from_bits_truncate(bits: u16) -> Self {
                Self(bits & Self::all().0)
            }
            /// Convert from a bits value exactly.
            #[inline]
            pub const fn from_bits_retain(bits: u16) -> Self { Self(bits) }
            /// Get a flags value with the bits of a flag with the given name set.
            ///
            /// This method will return `None` if `name` is empty or doesn't
            /// correspond to any named flag.
            #[inline]
            pub fn from_name(name: &str)
                -> ::bitflags::__private::core::option::Option<Self> {
                {
                    if name == "PURE" {
                        return ::bitflags::__private::core::option::Option::Some(Self(InlineAsmOptions::PURE.bits()));
                    }
                };
                ;
                {
                    if name == "NOMEM" {
                        return ::bitflags::__private::core::option::Option::Some(Self(InlineAsmOptions::NOMEM.bits()));
                    }
                };
                ;
                {
                    if name == "READONLY" {
                        return ::bitflags::__private::core::option::Option::Some(Self(InlineAsmOptions::READONLY.bits()));
                    }
                };
                ;
                {
                    if name == "PRESERVES_FLAGS" {
                        return ::bitflags::__private::core::option::Option::Some(Self(InlineAsmOptions::PRESERVES_FLAGS.bits()));
                    }
                };
                ;
                {
                    if name == "NORETURN" {
                        return ::bitflags::__private::core::option::Option::Some(Self(InlineAsmOptions::NORETURN.bits()));
                    }
                };
                ;
                {
                    if name == "NOSTACK" {
                        return ::bitflags::__private::core::option::Option::Some(Self(InlineAsmOptions::NOSTACK.bits()));
                    }
                };
                ;
                {
                    if name == "ATT_SYNTAX" {
                        return ::bitflags::__private::core::option::Option::Some(Self(InlineAsmOptions::ATT_SYNTAX.bits()));
                    }
                };
                ;
                {
                    if name == "RAW" {
                        return ::bitflags::__private::core::option::Option::Some(Self(InlineAsmOptions::RAW.bits()));
                    }
                };
                ;
                {
                    if name == "MAY_UNWIND" {
                        return ::bitflags::__private::core::option::Option::Some(Self(InlineAsmOptions::MAY_UNWIND.bits()));
                    }
                };
                ;
                let _ = name;
                ::bitflags::__private::core::option::Option::None
            }
            /// Whether all bits in this flags value are unset.
            #[inline]
            pub const fn is_empty(&self) -> bool {
                self.0 == <u16 as ::bitflags::Bits>::EMPTY
            }
            /// Whether all known bits in this flags value are set.
            #[inline]
            pub const fn is_all(&self) -> bool {
                Self::all().0 | self.0 == self.0
            }
            /// Whether any set bits in a source flags value are also set in a target flags value.
            #[inline]
            pub const fn intersects(&self, other: Self) -> bool {
                self.0 & other.0 != <u16 as ::bitflags::Bits>::EMPTY
            }
            /// Whether all set bits in a source flags value are also set in a target flags value.
            #[inline]
            pub const fn contains(&self, other: Self) -> bool {
                self.0 & other.0 == other.0
            }
            /// The bitwise or (`|`) of the bits in two flags values.
            #[inline]
            pub fn insert(&mut self, other: Self) {
                *self = Self(self.0).union(other);
            }
            /// The intersection of a source flags value with the complement of a target flags
            /// value (`&!`).
            ///
            /// This method is not equivalent to `self & !other` when `other` has unknown bits set.
            /// `remove` won't truncate `other`, but the `!` operator will.
            #[inline]
            pub fn remove(&mut self, other: Self) {
                *self = Self(self.0).difference(other);
            }
            /// The bitwise exclusive-or (`^`) of the bits in two flags values.
            #[inline]
            pub fn toggle(&mut self, other: Self) {
                *self = Self(self.0).symmetric_difference(other);
            }
            /// Call `insert` when `value` is `true` or `remove` when `value` is `false`.
            #[inline]
            pub fn set(&mut self, other: Self, value: bool) {
                if value { self.insert(other); } else { self.remove(other); }
            }
            /// The bitwise and (`&`) of the bits in two flags values.
            #[inline]
            #[must_use]
            pub const fn intersection(self, other: Self) -> Self {
                Self(self.0 & other.0)
            }
            /// The bitwise or (`|`) of the bits in two flags values.
            #[inline]
            #[must_use]
            pub const fn union(self, other: Self) -> Self {
                Self(self.0 | other.0)
            }
            /// The intersection of a source flags value with the complement of a target flags
            /// value (`&!`).
            ///
            /// This method is not equivalent to `self & !other` when `other` has unknown bits set.
            /// `difference` won't truncate `other`, but the `!` operator will.
            #[inline]
            #[must_use]
            pub const fn difference(self, other: Self) -> Self {
                Self(self.0 & !other.0)
            }
            /// The bitwise exclusive-or (`^`) of the bits in two flags values.
            #[inline]
            #[must_use]
            pub const fn symmetric_difference(self, other: Self) -> Self {
                Self(self.0 ^ other.0)
            }
            /// The bitwise negation (`!`) of the bits in a flags value, truncating the result.
            #[inline]
            #[must_use]
            pub const fn complement(self) -> Self {
                Self::from_bits_truncate(!self.0)
            }
        }
        impl ::bitflags::__private::core::fmt::Binary for InlineAsmOptions {
            fn fmt(&self, f: &mut ::bitflags::__private::core::fmt::Formatter)
                -> ::bitflags::__private::core::fmt::Result {
                let inner = self.0;
                ::bitflags::__private::core::fmt::Binary::fmt(&inner, f)
            }
        }
        impl ::bitflags::__private::core::fmt::Octal for InlineAsmOptions {
            fn fmt(&self, f: &mut ::bitflags::__private::core::fmt::Formatter)
                -> ::bitflags::__private::core::fmt::Result {
                let inner = self.0;
                ::bitflags::__private::core::fmt::Octal::fmt(&inner, f)
            }
        }
        impl ::bitflags::__private::core::fmt::LowerHex for InlineAsmOptions {
            fn fmt(&self, f: &mut ::bitflags::__private::core::fmt::Formatter)
                -> ::bitflags::__private::core::fmt::Result {
                let inner = self.0;
                ::bitflags::__private::core::fmt::LowerHex::fmt(&inner, f)
            }
        }
        impl ::bitflags::__private::core::fmt::UpperHex for InlineAsmOptions {
            fn fmt(&self, f: &mut ::bitflags::__private::core::fmt::Formatter)
                -> ::bitflags::__private::core::fmt::Result {
                let inner = self.0;
                ::bitflags::__private::core::fmt::UpperHex::fmt(&inner, f)
            }
        }
        impl ::bitflags::__private::core::ops::BitOr for InlineAsmOptions {
            type Output = Self;
            /// The bitwise or (`|`) of the bits in two flags values.
            #[inline]
            fn bitor(self, other: InlineAsmOptions) -> Self {
                self.union(other)
            }
        }
        impl ::bitflags::__private::core::ops::BitOrAssign for
            InlineAsmOptions {
            /// The bitwise or (`|`) of the bits in two flags values.
            #[inline]
            fn bitor_assign(&mut self, other: Self) { self.insert(other); }
        }
        impl ::bitflags::__private::core::ops::BitXor for InlineAsmOptions {
            type Output = Self;
            /// The bitwise exclusive-or (`^`) of the bits in two flags values.
            #[inline]
            fn bitxor(self, other: Self) -> Self {
                self.symmetric_difference(other)
            }
        }
        impl ::bitflags::__private::core::ops::BitXorAssign for
            InlineAsmOptions {
            /// The bitwise exclusive-or (`^`) of the bits in two flags values.
            #[inline]
            fn bitxor_assign(&mut self, other: Self) { self.toggle(other); }
        }
        impl ::bitflags::__private::core::ops::BitAnd for InlineAsmOptions {
            type Output = Self;
            /// The bitwise and (`&`) of the bits in two flags values.
            #[inline]
            fn bitand(self, other: Self) -> Self { self.intersection(other) }
        }
        impl ::bitflags::__private::core::ops::BitAndAssign for
            InlineAsmOptions {
            /// The bitwise and (`&`) of the bits in two flags values.
            #[inline]
            fn bitand_assign(&mut self, other: Self) {
                *self =
                    Self::from_bits_retain(self.bits()).intersection(other);
            }
        }
        impl ::bitflags::__private::core::ops::Sub for InlineAsmOptions {
            type Output = Self;
            /// The intersection of a source flags value with the complement of a target flags value (`&!`).
            ///
            /// This method is not equivalent to `self & !other` when `other` has unknown bits set.
            /// `difference` won't truncate `other`, but the `!` operator will.
            #[inline]
            fn sub(self, other: Self) -> Self { self.difference(other) }
        }
        impl ::bitflags::__private::core::ops::SubAssign for InlineAsmOptions
            {
            /// The intersection of a source flags value with the complement of a target flags value (`&!`).
            ///
            /// This method is not equivalent to `self & !other` when `other` has unknown bits set.
            /// `difference` won't truncate `other`, but the `!` operator will.
            #[inline]
            fn sub_assign(&mut self, other: Self) { self.remove(other); }
        }
        impl ::bitflags::__private::core::ops::Not for InlineAsmOptions {
            type Output = Self;
            /// The bitwise negation (`!`) of the bits in a flags value, truncating the result.
            #[inline]
            fn not(self) -> Self { self.complement() }
        }
        impl ::bitflags::__private::core::iter::Extend<InlineAsmOptions> for
            InlineAsmOptions {
            /// The bitwise or (`|`) of the bits in each flags value.
            fn extend<T: ::bitflags::__private::core::iter::IntoIterator<Item
                = Self>>(&mut self, iterator: T) {
                for item in iterator { self.insert(item) }
            }
        }
        impl ::bitflags::__private::core::iter::FromIterator<InlineAsmOptions>
            for InlineAsmOptions {
            /// The bitwise or (`|`) of the bits in each flags value.
            fn from_iter<T: ::bitflags::__private::core::iter::IntoIterator<Item
                = Self>>(iterator: T) -> Self {
                use ::bitflags::__private::core::iter::Extend;
                let mut result = Self::empty();
                result.extend(iterator);
                result
            }
        }
        impl InlineAsmOptions {
            /// Yield a set of contained flags values.
            ///
            /// Each yielded flags value will correspond to a defined named flag. Any unknown bits
            /// will be yielded together as a final flags value.
            #[inline]
            pub const fn iter(&self)
                -> ::bitflags::iter::Iter<InlineAsmOptions> {
                ::bitflags::iter::Iter::__private_const_new(<InlineAsmOptions
                        as ::bitflags::Flags>::FLAGS,
                    InlineAsmOptions::from_bits_retain(self.bits()),
                    InlineAsmOptions::from_bits_retain(self.bits()))
            }
            /// Yield a set of contained named flags values.
            ///
            /// This method is like [`iter`](#method.iter), except only yields bits in contained named flags.
            /// Any unknown bits, or bits not corresponding to a contained flag will not be yielded.
            #[inline]
            pub const fn iter_names(&self)
                -> ::bitflags::iter::IterNames<InlineAsmOptions> {
                ::bitflags::iter::IterNames::__private_const_new(<InlineAsmOptions
                        as ::bitflags::Flags>::FLAGS,
                    InlineAsmOptions::from_bits_retain(self.bits()),
                    InlineAsmOptions::from_bits_retain(self.bits()))
            }
        }
        impl ::bitflags::__private::core::iter::IntoIterator for
            InlineAsmOptions {
            type Item = InlineAsmOptions;
            type IntoIter = ::bitflags::iter::Iter<InlineAsmOptions>;
            fn into_iter(self) -> Self::IntoIter { self.iter() }
        }
    };bitflags::bitflags! {
2703    impl InlineAsmOptions: u16 {
2704        const PURE            = 1 << 0;
2705        const NOMEM           = 1 << 1;
2706        const READONLY        = 1 << 2;
2707        const PRESERVES_FLAGS = 1 << 3;
2708        const NORETURN        = 1 << 4;
2709        const NOSTACK         = 1 << 5;
2710        const ATT_SYNTAX      = 1 << 6;
2711        const RAW             = 1 << 7;
2712        const MAY_UNWIND      = 1 << 8;
2713    }
2714}
2715
2716impl InlineAsmOptions {
2717    pub const COUNT: usize = Self::all().bits().count_ones() as usize;
2718
2719    pub const GLOBAL_OPTIONS: Self = Self::ATT_SYNTAX.union(Self::RAW);
2720    pub const NAKED_OPTIONS: Self = Self::ATT_SYNTAX.union(Self::RAW);
2721
2722    pub fn human_readable_names(&self) -> Vec<&'static str> {
2723        let mut options = ::alloc::vec::Vec::new()vec![];
2724
2725        if self.contains(InlineAsmOptions::PURE) {
2726            options.push("pure");
2727        }
2728        if self.contains(InlineAsmOptions::NOMEM) {
2729            options.push("nomem");
2730        }
2731        if self.contains(InlineAsmOptions::READONLY) {
2732            options.push("readonly");
2733        }
2734        if self.contains(InlineAsmOptions::PRESERVES_FLAGS) {
2735            options.push("preserves_flags");
2736        }
2737        if self.contains(InlineAsmOptions::NORETURN) {
2738            options.push("noreturn");
2739        }
2740        if self.contains(InlineAsmOptions::NOSTACK) {
2741            options.push("nostack");
2742        }
2743        if self.contains(InlineAsmOptions::ATT_SYNTAX) {
2744            options.push("att_syntax");
2745        }
2746        if self.contains(InlineAsmOptions::RAW) {
2747            options.push("raw");
2748        }
2749        if self.contains(InlineAsmOptions::MAY_UNWIND) {
2750            options.push("may_unwind");
2751        }
2752
2753        options
2754    }
2755}
2756
2757impl std::fmt::Debug for InlineAsmOptions {
2758    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2759        bitflags::parser::to_writer(self, f)
2760    }
2761}
2762
2763#[derive(#[automatically_derived]
impl ::core::clone::Clone for InlineAsmTemplatePiece {
    #[inline]
    fn clone(&self) -> InlineAsmTemplatePiece {
        match self {
            InlineAsmTemplatePiece::String(__self_0) =>
                InlineAsmTemplatePiece::String(::core::clone::Clone::clone(__self_0)),
            InlineAsmTemplatePiece::Placeholder {
                operand_idx: __self_0, modifier: __self_1, span: __self_2 } =>
                InlineAsmTemplatePiece::Placeholder {
                    operand_idx: ::core::clone::Clone::clone(__self_0),
                    modifier: ::core::clone::Clone::clone(__self_1),
                    span: ::core::clone::Clone::clone(__self_2),
                },
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for InlineAsmTemplatePiece {
    #[inline]
    fn eq(&self, other: &InlineAsmTemplatePiece) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr &&
            match (self, other) {
                (InlineAsmTemplatePiece::String(__self_0),
                    InlineAsmTemplatePiece::String(__arg1_0)) =>
                    __self_0 == __arg1_0,
                (InlineAsmTemplatePiece::Placeholder {
                    operand_idx: __self_0, modifier: __self_1, span: __self_2 },
                    InlineAsmTemplatePiece::Placeholder {
                    operand_idx: __arg1_0, modifier: __arg1_1, span: __arg1_2 })
                    =>
                    __self_0 == __arg1_0 && __self_1 == __arg1_1 &&
                        __self_2 == __arg1_2,
                _ => unsafe { ::core::intrinsics::unreachable() }
            }
    }
}PartialEq, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for InlineAsmTemplatePiece {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        InlineAsmTemplatePiece::String(ref __binding_0) => {
                            0usize
                        }
                        InlineAsmTemplatePiece::Placeholder {
                            operand_idx: ref __binding_0,
                            modifier: ref __binding_1,
                            span: ref __binding_2 } => {
                            1usize
                        }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    InlineAsmTemplatePiece::String(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    InlineAsmTemplatePiece::Placeholder {
                        operand_idx: ref __binding_0,
                        modifier: ref __binding_1,
                        span: ref __binding_2 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for InlineAsmTemplatePiece {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => {
                        InlineAsmTemplatePiece::String(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    1usize => {
                        InlineAsmTemplatePiece::Placeholder {
                            operand_idx: ::rustc_serialize::Decodable::decode(__decoder),
                            modifier: ::rustc_serialize::Decodable::decode(__decoder),
                            span: ::rustc_serialize::Decodable::decode(__decoder),
                        }
                    }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `InlineAsmTemplatePiece`, expected 0..2, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for InlineAsmTemplatePiece {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            InlineAsmTemplatePiece::String(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "String",
                    &__self_0),
            InlineAsmTemplatePiece::Placeholder {
                operand_idx: __self_0, modifier: __self_1, span: __self_2 } =>
                ::core::fmt::Formatter::debug_struct_field3_finish(f,
                    "Placeholder", "operand_idx", __self_0, "modifier",
                    __self_1, "span", &__self_2),
        }
    }
}Debug, #[automatically_derived]
impl ::core::hash::Hash for InlineAsmTemplatePiece {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        ::core::hash::Hash::hash(&__self_discr, state);
        match self {
            InlineAsmTemplatePiece::String(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            InlineAsmTemplatePiece::Placeholder {
                operand_idx: __self_0, modifier: __self_1, span: __self_2 } =>
                {
                ::core::hash::Hash::hash(__self_0, state);
                ::core::hash::Hash::hash(__self_1, state);
                ::core::hash::Hash::hash(__self_2, state)
            }
        }
    }
}Hash, const _: () =
    {
        impl<__CTX> ::rustc_data_structures::stable_hasher::HashStable<__CTX>
            for InlineAsmTemplatePiece where
            __CTX: ::rustc_span::HashStableContext {
            #[inline]
            fn hash_stable(&self, __hcx: &mut __CTX,
                __hasher:
                    &mut ::rustc_data_structures::stable_hasher::StableHasher) {
                ::std::mem::discriminant(self).hash_stable(__hcx, __hasher);
                match *self {
                    InlineAsmTemplatePiece::String(ref __binding_0) => {
                        { __binding_0.hash_stable(__hcx, __hasher); }
                    }
                    InlineAsmTemplatePiece::Placeholder {
                        operand_idx: ref __binding_0,
                        modifier: ref __binding_1,
                        span: ref __binding_2 } => {
                        { __binding_0.hash_stable(__hcx, __hasher); }
                        { __binding_1.hash_stable(__hcx, __hasher); }
                        { __binding_2.hash_stable(__hcx, __hasher); }
                    }
                }
            }
        }
    };HashStable_Generic, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for
            InlineAsmTemplatePiece where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    InlineAsmTemplatePiece::String(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    InlineAsmTemplatePiece::Placeholder {
                        operand_idx: ref __binding_0,
                        modifier: ref __binding_1,
                        span: ref __binding_2 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_2,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for
            InlineAsmTemplatePiece where __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    InlineAsmTemplatePiece::String(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                    InlineAsmTemplatePiece::Placeholder {
                        operand_idx: ref mut __binding_0,
                        modifier: ref mut __binding_1,
                        span: ref mut __binding_2 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_2,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
2764pub enum InlineAsmTemplatePiece {
2765    String(Cow<'static, str>),
2766    Placeholder { operand_idx: usize, modifier: Option<char>, span: Span },
2767}
2768
2769impl fmt::Display for InlineAsmTemplatePiece {
2770    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2771        match self {
2772            Self::String(s) => {
2773                for c in s.chars() {
2774                    match c {
2775                        '{' => f.write_str("{{")?,
2776                        '}' => f.write_str("}}")?,
2777                        _ => c.fmt(f)?,
2778                    }
2779                }
2780                Ok(())
2781            }
2782            Self::Placeholder { operand_idx, modifier: Some(modifier), .. } => {
2783                f.write_fmt(format_args!("{{{0}:{1}}}", operand_idx, modifier))write!(f, "{{{operand_idx}:{modifier}}}")
2784            }
2785            Self::Placeholder { operand_idx, modifier: None, .. } => {
2786                f.write_fmt(format_args!("{{{0}}}", operand_idx))write!(f, "{{{operand_idx}}}")
2787            }
2788        }
2789    }
2790}
2791
2792impl InlineAsmTemplatePiece {
2793    /// Rebuilds the asm template string from its pieces.
2794    pub fn to_string(s: &[Self]) -> String {
2795        use fmt::Write;
2796        let mut out = String::new();
2797        for p in s.iter() {
2798            let _ = out.write_fmt(format_args!("{0}", p))write!(out, "{p}");
2799        }
2800        out
2801    }
2802}
2803
2804/// Inline assembly symbol operands get their own AST node that is somewhat
2805/// similar to `AnonConst`.
2806///
2807/// The main difference is that we specifically don't assign it `DefId` in
2808/// `DefCollector`. Instead this is deferred until AST lowering where we
2809/// lower it to an `AnonConst` (for functions) or a `Path` (for statics)
2810/// depending on what the path resolves to.
2811#[derive(#[automatically_derived]
impl ::core::clone::Clone for InlineAsmSym {
    #[inline]
    fn clone(&self) -> InlineAsmSym {
        InlineAsmSym {
            id: ::core::clone::Clone::clone(&self.id),
            qself: ::core::clone::Clone::clone(&self.qself),
            path: ::core::clone::Clone::clone(&self.path),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for InlineAsmSym {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    InlineAsmSym {
                        id: ref __binding_0,
                        qself: ref __binding_1,
                        path: ref __binding_2 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for InlineAsmSym {
            fn decode(__decoder: &mut __D) -> Self {
                InlineAsmSym {
                    id: ::rustc_serialize::Decodable::decode(__decoder),
                    qself: ::rustc_serialize::Decodable::decode(__decoder),
                    path: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for InlineAsmSym {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field3_finish(f, "InlineAsmSym",
            "id", &self.id, "qself", &self.qself, "path", &&self.path)
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for InlineAsmSym
            where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    InlineAsmSym {
                        id: ref __binding_0,
                        qself: ref __binding_1,
                        path: ref __binding_2 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_2,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for InlineAsmSym where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    InlineAsmSym {
                        id: ref mut __binding_0,
                        qself: ref mut __binding_1,
                        path: ref mut __binding_2 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_2,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
2812pub struct InlineAsmSym {
2813    pub id: NodeId,
2814    pub qself: Option<Box<QSelf>>,
2815    pub path: Path,
2816}
2817
2818/// Inline assembly operand.
2819///
2820/// E.g., `out("eax") result` as in `asm!("mov eax, 2", out("eax") result)`.
2821#[derive(#[automatically_derived]
impl ::core::clone::Clone for InlineAsmOperand {
    #[inline]
    fn clone(&self) -> InlineAsmOperand {
        match self {
            InlineAsmOperand::In { reg: __self_0, expr: __self_1 } =>
                InlineAsmOperand::In {
                    reg: ::core::clone::Clone::clone(__self_0),
                    expr: ::core::clone::Clone::clone(__self_1),
                },
            InlineAsmOperand::Out {
                reg: __self_0, late: __self_1, expr: __self_2 } =>
                InlineAsmOperand::Out {
                    reg: ::core::clone::Clone::clone(__self_0),
                    late: ::core::clone::Clone::clone(__self_1),
                    expr: ::core::clone::Clone::clone(__self_2),
                },
            InlineAsmOperand::InOut {
                reg: __self_0, late: __self_1, expr: __self_2 } =>
                InlineAsmOperand::InOut {
                    reg: ::core::clone::Clone::clone(__self_0),
                    late: ::core::clone::Clone::clone(__self_1),
                    expr: ::core::clone::Clone::clone(__self_2),
                },
            InlineAsmOperand::SplitInOut {
                reg: __self_0,
                late: __self_1,
                in_expr: __self_2,
                out_expr: __self_3 } =>
                InlineAsmOperand::SplitInOut {
                    reg: ::core::clone::Clone::clone(__self_0),
                    late: ::core::clone::Clone::clone(__self_1),
                    in_expr: ::core::clone::Clone::clone(__self_2),
                    out_expr: ::core::clone::Clone::clone(__self_3),
                },
            InlineAsmOperand::Const { anon_const: __self_0 } =>
                InlineAsmOperand::Const {
                    anon_const: ::core::clone::Clone::clone(__self_0),
                },
            InlineAsmOperand::Sym { sym: __self_0 } =>
                InlineAsmOperand::Sym {
                    sym: ::core::clone::Clone::clone(__self_0),
                },
            InlineAsmOperand::Label { block: __self_0 } =>
                InlineAsmOperand::Label {
                    block: ::core::clone::Clone::clone(__self_0),
                },
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for InlineAsmOperand {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        InlineAsmOperand::In {
                            reg: ref __binding_0, expr: ref __binding_1 } => {
                            0usize
                        }
                        InlineAsmOperand::Out {
                            reg: ref __binding_0,
                            late: ref __binding_1,
                            expr: ref __binding_2 } => {
                            1usize
                        }
                        InlineAsmOperand::InOut {
                            reg: ref __binding_0,
                            late: ref __binding_1,
                            expr: ref __binding_2 } => {
                            2usize
                        }
                        InlineAsmOperand::SplitInOut {
                            reg: ref __binding_0,
                            late: ref __binding_1,
                            in_expr: ref __binding_2,
                            out_expr: ref __binding_3 } => {
                            3usize
                        }
                        InlineAsmOperand::Const { anon_const: ref __binding_0 } => {
                            4usize
                        }
                        InlineAsmOperand::Sym { sym: ref __binding_0 } => { 5usize }
                        InlineAsmOperand::Label { block: ref __binding_0 } => {
                            6usize
                        }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    InlineAsmOperand::In {
                        reg: ref __binding_0, expr: ref __binding_1 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                    }
                    InlineAsmOperand::Out {
                        reg: ref __binding_0,
                        late: ref __binding_1,
                        expr: ref __binding_2 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                    }
                    InlineAsmOperand::InOut {
                        reg: ref __binding_0,
                        late: ref __binding_1,
                        expr: ref __binding_2 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                    }
                    InlineAsmOperand::SplitInOut {
                        reg: ref __binding_0,
                        late: ref __binding_1,
                        in_expr: ref __binding_2,
                        out_expr: ref __binding_3 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_3,
                            __encoder);
                    }
                    InlineAsmOperand::Const { anon_const: ref __binding_0 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    InlineAsmOperand::Sym { sym: ref __binding_0 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    InlineAsmOperand::Label { block: ref __binding_0 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for InlineAsmOperand {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => {
                        InlineAsmOperand::In {
                            reg: ::rustc_serialize::Decodable::decode(__decoder),
                            expr: ::rustc_serialize::Decodable::decode(__decoder),
                        }
                    }
                    1usize => {
                        InlineAsmOperand::Out {
                            reg: ::rustc_serialize::Decodable::decode(__decoder),
                            late: ::rustc_serialize::Decodable::decode(__decoder),
                            expr: ::rustc_serialize::Decodable::decode(__decoder),
                        }
                    }
                    2usize => {
                        InlineAsmOperand::InOut {
                            reg: ::rustc_serialize::Decodable::decode(__decoder),
                            late: ::rustc_serialize::Decodable::decode(__decoder),
                            expr: ::rustc_serialize::Decodable::decode(__decoder),
                        }
                    }
                    3usize => {
                        InlineAsmOperand::SplitInOut {
                            reg: ::rustc_serialize::Decodable::decode(__decoder),
                            late: ::rustc_serialize::Decodable::decode(__decoder),
                            in_expr: ::rustc_serialize::Decodable::decode(__decoder),
                            out_expr: ::rustc_serialize::Decodable::decode(__decoder),
                        }
                    }
                    4usize => {
                        InlineAsmOperand::Const {
                            anon_const: ::rustc_serialize::Decodable::decode(__decoder),
                        }
                    }
                    5usize => {
                        InlineAsmOperand::Sym {
                            sym: ::rustc_serialize::Decodable::decode(__decoder),
                        }
                    }
                    6usize => {
                        InlineAsmOperand::Label {
                            block: ::rustc_serialize::Decodable::decode(__decoder),
                        }
                    }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `InlineAsmOperand`, expected 0..7, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for InlineAsmOperand {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            InlineAsmOperand::In { reg: __self_0, expr: __self_1 } =>
                ::core::fmt::Formatter::debug_struct_field2_finish(f, "In",
                    "reg", __self_0, "expr", &__self_1),
            InlineAsmOperand::Out {
                reg: __self_0, late: __self_1, expr: __self_2 } =>
                ::core::fmt::Formatter::debug_struct_field3_finish(f, "Out",
                    "reg", __self_0, "late", __self_1, "expr", &__self_2),
            InlineAsmOperand::InOut {
                reg: __self_0, late: __self_1, expr: __self_2 } =>
                ::core::fmt::Formatter::debug_struct_field3_finish(f, "InOut",
                    "reg", __self_0, "late", __self_1, "expr", &__self_2),
            InlineAsmOperand::SplitInOut {
                reg: __self_0,
                late: __self_1,
                in_expr: __self_2,
                out_expr: __self_3 } =>
                ::core::fmt::Formatter::debug_struct_field4_finish(f,
                    "SplitInOut", "reg", __self_0, "late", __self_1, "in_expr",
                    __self_2, "out_expr", &__self_3),
            InlineAsmOperand::Const { anon_const: __self_0 } =>
                ::core::fmt::Formatter::debug_struct_field1_finish(f, "Const",
                    "anon_const", &__self_0),
            InlineAsmOperand::Sym { sym: __self_0 } =>
                ::core::fmt::Formatter::debug_struct_field1_finish(f, "Sym",
                    "sym", &__self_0),
            InlineAsmOperand::Label { block: __self_0 } =>
                ::core::fmt::Formatter::debug_struct_field1_finish(f, "Label",
                    "block", &__self_0),
        }
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for
            InlineAsmOperand where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    InlineAsmOperand::In {
                        reg: ref __binding_0, expr: ref __binding_1 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    InlineAsmOperand::Out {
                        reg: ref __binding_0,
                        late: ref __binding_1,
                        expr: ref __binding_2 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_2,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    InlineAsmOperand::InOut {
                        reg: ref __binding_0,
                        late: ref __binding_1,
                        expr: ref __binding_2 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_2,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    InlineAsmOperand::SplitInOut {
                        reg: ref __binding_0,
                        late: ref __binding_1,
                        in_expr: ref __binding_2,
                        out_expr: ref __binding_3 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_2,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_3,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    InlineAsmOperand::Const { anon_const: ref __binding_0 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    InlineAsmOperand::Sym { sym: ref __binding_0 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    InlineAsmOperand::Label { block: ref __binding_0 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for InlineAsmOperand
            where __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    InlineAsmOperand::In {
                        reg: ref mut __binding_0, expr: ref mut __binding_1 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                    }
                    InlineAsmOperand::Out {
                        reg: ref mut __binding_0,
                        late: ref mut __binding_1,
                        expr: ref mut __binding_2 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_2,
                                __visitor, ())
                        }
                    }
                    InlineAsmOperand::InOut {
                        reg: ref mut __binding_0,
                        late: ref mut __binding_1,
                        expr: ref mut __binding_2 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_2,
                                __visitor, ())
                        }
                    }
                    InlineAsmOperand::SplitInOut {
                        reg: ref mut __binding_0,
                        late: ref mut __binding_1,
                        in_expr: ref mut __binding_2,
                        out_expr: ref mut __binding_3 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_2,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_3,
                                __visitor, ())
                        }
                    }
                    InlineAsmOperand::Const { anon_const: ref mut __binding_0 }
                        => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                    InlineAsmOperand::Sym { sym: ref mut __binding_0 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                    InlineAsmOperand::Label { block: ref mut __binding_0 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
2822pub enum InlineAsmOperand {
2823    In {
2824        reg: InlineAsmRegOrRegClass,
2825        expr: Box<Expr>,
2826    },
2827    Out {
2828        reg: InlineAsmRegOrRegClass,
2829        late: bool,
2830        expr: Option<Box<Expr>>,
2831    },
2832    InOut {
2833        reg: InlineAsmRegOrRegClass,
2834        late: bool,
2835        expr: Box<Expr>,
2836    },
2837    SplitInOut {
2838        reg: InlineAsmRegOrRegClass,
2839        late: bool,
2840        in_expr: Box<Expr>,
2841        out_expr: Option<Box<Expr>>,
2842    },
2843    Const {
2844        anon_const: AnonConst,
2845    },
2846    Sym {
2847        sym: InlineAsmSym,
2848    },
2849    Label {
2850        block: Box<Block>,
2851    },
2852}
2853
2854impl InlineAsmOperand {
2855    pub fn reg(&self) -> Option<&InlineAsmRegOrRegClass> {
2856        match self {
2857            Self::In { reg, .. }
2858            | Self::Out { reg, .. }
2859            | Self::InOut { reg, .. }
2860            | Self::SplitInOut { reg, .. } => Some(reg),
2861            Self::Const { .. } | Self::Sym { .. } | Self::Label { .. } => None,
2862        }
2863    }
2864}
2865
2866#[derive(#[automatically_derived]
impl ::core::clone::Clone for AsmMacro {
    #[inline]
    fn clone(&self) -> AsmMacro { *self }
}Clone, #[automatically_derived]
impl ::core::marker::Copy for AsmMacro { }Copy, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for AsmMacro {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        AsmMacro::Asm => { 0usize }
                        AsmMacro::GlobalAsm => { 1usize }
                        AsmMacro::NakedAsm => { 2usize }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    AsmMacro::Asm => {}
                    AsmMacro::GlobalAsm => {}
                    AsmMacro::NakedAsm => {}
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for AsmMacro {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => { AsmMacro::Asm }
                    1usize => { AsmMacro::GlobalAsm }
                    2usize => { AsmMacro::NakedAsm }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `AsmMacro`, expected 0..3, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for AsmMacro {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::write_str(f,
            match self {
                AsmMacro::Asm => "Asm",
                AsmMacro::GlobalAsm => "GlobalAsm",
                AsmMacro::NakedAsm => "NakedAsm",
            })
    }
}Debug, const _: () =
    {
        impl<__CTX> ::rustc_data_structures::stable_hasher::HashStable<__CTX>
            for AsmMacro where __CTX: ::rustc_span::HashStableContext {
            #[inline]
            fn hash_stable(&self, __hcx: &mut __CTX,
                __hasher:
                    &mut ::rustc_data_structures::stable_hasher::StableHasher) {
                ::std::mem::discriminant(self).hash_stable(__hcx, __hasher);
                match *self {
                    AsmMacro::Asm => {}
                    AsmMacro::GlobalAsm => {}
                    AsmMacro::NakedAsm => {}
                }
            }
        }
    };HashStable_Generic, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for AsmMacro
            where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    AsmMacro::Asm => {}
                    AsmMacro::GlobalAsm => {}
                    AsmMacro::NakedAsm => {}
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for AsmMacro where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    AsmMacro::Asm => {}
                    AsmMacro::GlobalAsm => {}
                    AsmMacro::NakedAsm => {}
                }
            }
        }
    };Walkable, #[automatically_derived]
impl ::core::cmp::PartialEq for AsmMacro {
    #[inline]
    fn eq(&self, other: &AsmMacro) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::Eq for AsmMacro {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {}
}Eq)]
2867pub enum AsmMacro {
2868    /// The `asm!` macro
2869    Asm,
2870    /// The `global_asm!` macro
2871    GlobalAsm,
2872    /// The `naked_asm!` macro
2873    NakedAsm,
2874}
2875
2876impl AsmMacro {
2877    pub const fn macro_name(self) -> &'static str {
2878        match self {
2879            AsmMacro::Asm => "asm",
2880            AsmMacro::GlobalAsm => "global_asm",
2881            AsmMacro::NakedAsm => "naked_asm",
2882        }
2883    }
2884
2885    pub const fn is_supported_option(self, option: InlineAsmOptions) -> bool {
2886        match self {
2887            AsmMacro::Asm => true,
2888            AsmMacro::GlobalAsm => InlineAsmOptions::GLOBAL_OPTIONS.contains(option),
2889            AsmMacro::NakedAsm => InlineAsmOptions::NAKED_OPTIONS.contains(option),
2890        }
2891    }
2892
2893    pub const fn diverges(self, options: InlineAsmOptions) -> bool {
2894        match self {
2895            AsmMacro::Asm => options.contains(InlineAsmOptions::NORETURN),
2896            AsmMacro::GlobalAsm => true,
2897            AsmMacro::NakedAsm => true,
2898        }
2899    }
2900}
2901
2902/// Inline assembly.
2903///
2904/// E.g., `asm!("NOP");`.
2905#[derive(#[automatically_derived]
impl ::core::clone::Clone for InlineAsm {
    #[inline]
    fn clone(&self) -> InlineAsm {
        InlineAsm {
            asm_macro: ::core::clone::Clone::clone(&self.asm_macro),
            template: ::core::clone::Clone::clone(&self.template),
            template_strs: ::core::clone::Clone::clone(&self.template_strs),
            operands: ::core::clone::Clone::clone(&self.operands),
            clobber_abis: ::core::clone::Clone::clone(&self.clobber_abis),
            options: ::core::clone::Clone::clone(&self.options),
            line_spans: ::core::clone::Clone::clone(&self.line_spans),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for InlineAsm {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    InlineAsm {
                        asm_macro: ref __binding_0,
                        template: ref __binding_1,
                        template_strs: ref __binding_2,
                        operands: ref __binding_3,
                        clobber_abis: ref __binding_4,
                        options: ref __binding_5,
                        line_spans: ref __binding_6 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_3,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_4,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_5,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_6,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for InlineAsm {
            fn decode(__decoder: &mut __D) -> Self {
                InlineAsm {
                    asm_macro: ::rustc_serialize::Decodable::decode(__decoder),
                    template: ::rustc_serialize::Decodable::decode(__decoder),
                    template_strs: ::rustc_serialize::Decodable::decode(__decoder),
                    operands: ::rustc_serialize::Decodable::decode(__decoder),
                    clobber_abis: ::rustc_serialize::Decodable::decode(__decoder),
                    options: ::rustc_serialize::Decodable::decode(__decoder),
                    line_spans: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for InlineAsm {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["asm_macro", "template", "template_strs", "operands",
                        "clobber_abis", "options", "line_spans"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.asm_macro, &self.template, &self.template_strs,
                        &self.operands, &self.clobber_abis, &self.options,
                        &&self.line_spans];
        ::core::fmt::Formatter::debug_struct_fields_finish(f, "InlineAsm",
            names, values)
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for InlineAsm
            where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    InlineAsm {
                        asm_macro: ref __binding_0,
                        template: ref __binding_1,
                        template_strs: ref __binding_2,
                        operands: ref __binding_3,
                        clobber_abis: ref __binding_4,
                        options: ref __binding_5,
                        line_spans: ref __binding_6 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_2,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_3,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_4,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {}
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_6,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for InlineAsm where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    InlineAsm {
                        asm_macro: ref mut __binding_0,
                        template: ref mut __binding_1,
                        template_strs: ref mut __binding_2,
                        operands: ref mut __binding_3,
                        clobber_abis: ref mut __binding_4,
                        options: ref mut __binding_5,
                        line_spans: ref mut __binding_6 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_2,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_3,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_4,
                                __visitor, ())
                        }
                        {}
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_6,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
2906pub struct InlineAsm {
2907    pub asm_macro: AsmMacro,
2908    pub template: Vec<InlineAsmTemplatePiece>,
2909    pub template_strs: Box<[(Symbol, Option<Symbol>, Span)]>,
2910    pub operands: Vec<(InlineAsmOperand, Span)>,
2911    pub clobber_abis: Vec<(Symbol, Span)>,
2912    #[visitable(ignore)]
2913    pub options: InlineAsmOptions,
2914    pub line_spans: Vec<Span>,
2915}
2916
2917/// A parameter in a function header.
2918///
2919/// E.g., `bar: usize` as in `fn foo(bar: usize)`.
2920#[derive(#[automatically_derived]
impl ::core::clone::Clone for Param {
    #[inline]
    fn clone(&self) -> Param {
        Param {
            attrs: ::core::clone::Clone::clone(&self.attrs),
            ty: ::core::clone::Clone::clone(&self.ty),
            pat: ::core::clone::Clone::clone(&self.pat),
            id: ::core::clone::Clone::clone(&self.id),
            span: ::core::clone::Clone::clone(&self.span),
            is_placeholder: ::core::clone::Clone::clone(&self.is_placeholder),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for Param {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    Param {
                        attrs: ref __binding_0,
                        ty: ref __binding_1,
                        pat: ref __binding_2,
                        id: ref __binding_3,
                        span: ref __binding_4,
                        is_placeholder: ref __binding_5 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_3,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_4,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_5,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for Param {
            fn decode(__decoder: &mut __D) -> Self {
                Param {
                    attrs: ::rustc_serialize::Decodable::decode(__decoder),
                    ty: ::rustc_serialize::Decodable::decode(__decoder),
                    pat: ::rustc_serialize::Decodable::decode(__decoder),
                    id: ::rustc_serialize::Decodable::decode(__decoder),
                    span: ::rustc_serialize::Decodable::decode(__decoder),
                    is_placeholder: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for Param {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["attrs", "ty", "pat", "id", "span", "is_placeholder"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.attrs, &self.ty, &self.pat, &self.id, &self.span,
                        &&self.is_placeholder];
        ::core::fmt::Formatter::debug_struct_fields_finish(f, "Param", names,
            values)
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for Param where
            __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    Param {
                        attrs: ref __binding_0,
                        ty: ref __binding_1,
                        pat: ref __binding_2,
                        id: ref __binding_3,
                        span: ref __binding_4,
                        is_placeholder: ref __binding_5 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_2,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_3,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_4,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_5,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for Param where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    Param {
                        attrs: ref mut __binding_0,
                        ty: ref mut __binding_1,
                        pat: ref mut __binding_2,
                        id: ref mut __binding_3,
                        span: ref mut __binding_4,
                        is_placeholder: ref mut __binding_5 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_2,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_3,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_4,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_5,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
2921pub struct Param {
2922    pub attrs: AttrVec,
2923    pub ty: Box<Ty>,
2924    pub pat: Box<Pat>,
2925    pub id: NodeId,
2926    pub span: Span,
2927    pub is_placeholder: bool,
2928}
2929
2930/// Alternative representation for `Arg`s describing `self` parameter of methods.
2931///
2932/// E.g., `&mut self` as in `fn foo(&mut self)`.
2933#[derive(#[automatically_derived]
impl ::core::clone::Clone for SelfKind {
    #[inline]
    fn clone(&self) -> SelfKind {
        match self {
            SelfKind::Value(__self_0) =>
                SelfKind::Value(::core::clone::Clone::clone(__self_0)),
            SelfKind::Region(__self_0, __self_1) =>
                SelfKind::Region(::core::clone::Clone::clone(__self_0),
                    ::core::clone::Clone::clone(__self_1)),
            SelfKind::Pinned(__self_0, __self_1) =>
                SelfKind::Pinned(::core::clone::Clone::clone(__self_0),
                    ::core::clone::Clone::clone(__self_1)),
            SelfKind::Explicit(__self_0, __self_1) =>
                SelfKind::Explicit(::core::clone::Clone::clone(__self_0),
                    ::core::clone::Clone::clone(__self_1)),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for SelfKind {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        SelfKind::Value(ref __binding_0) => { 0usize }
                        SelfKind::Region(ref __binding_0, ref __binding_1) => {
                            1usize
                        }
                        SelfKind::Pinned(ref __binding_0, ref __binding_1) => {
                            2usize
                        }
                        SelfKind::Explicit(ref __binding_0, ref __binding_1) => {
                            3usize
                        }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    SelfKind::Value(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    SelfKind::Region(ref __binding_0, ref __binding_1) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                    }
                    SelfKind::Pinned(ref __binding_0, ref __binding_1) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                    }
                    SelfKind::Explicit(ref __binding_0, ref __binding_1) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for SelfKind {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => {
                        SelfKind::Value(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    1usize => {
                        SelfKind::Region(::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder))
                    }
                    2usize => {
                        SelfKind::Pinned(::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder))
                    }
                    3usize => {
                        SelfKind::Explicit(::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder))
                    }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `SelfKind`, expected 0..4, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for SelfKind {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            SelfKind::Value(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Value",
                    &__self_0),
            SelfKind::Region(__self_0, __self_1) =>
                ::core::fmt::Formatter::debug_tuple_field2_finish(f, "Region",
                    __self_0, &__self_1),
            SelfKind::Pinned(__self_0, __self_1) =>
                ::core::fmt::Formatter::debug_tuple_field2_finish(f, "Pinned",
                    __self_0, &__self_1),
            SelfKind::Explicit(__self_0, __self_1) =>
                ::core::fmt::Formatter::debug_tuple_field2_finish(f,
                    "Explicit", __self_0, &__self_1),
        }
    }
}Debug)]
2934pub enum SelfKind {
2935    /// `self`, `mut self`
2936    Value(Mutability),
2937    /// `&'lt self`, `&'lt mut self`
2938    Region(Option<Lifetime>, Mutability),
2939    /// `&'lt pin const self`, `&'lt pin mut self`
2940    Pinned(Option<Lifetime>, Mutability),
2941    /// `self: TYPE`, `mut self: TYPE`
2942    Explicit(Box<Ty>, Mutability),
2943}
2944
2945impl SelfKind {
2946    pub fn to_ref_suggestion(&self) -> String {
2947        match self {
2948            SelfKind::Region(None, mutbl) => mutbl.ref_prefix_str().to_string(),
2949            SelfKind::Region(Some(lt), mutbl) => ::alloc::__export::must_use({
        ::alloc::fmt::format(format_args!("&{1} {0}", mutbl.prefix_str(), lt))
    })format!("&{lt} {}", mutbl.prefix_str()),
2950            SelfKind::Pinned(None, mutbl) => ::alloc::__export::must_use({
        ::alloc::fmt::format(format_args!("&pin {0}", mutbl.ptr_str()))
    })format!("&pin {}", mutbl.ptr_str()),
2951            SelfKind::Pinned(Some(lt), mutbl) => ::alloc::__export::must_use({
        ::alloc::fmt::format(format_args!("&{1} pin {0}", mutbl.ptr_str(),
                lt))
    })format!("&{lt} pin {}", mutbl.ptr_str()),
2952            SelfKind::Value(_) | SelfKind::Explicit(_, _) => {
2953                {
    ::core::panicking::panic_fmt(format_args!("internal error: entered unreachable code: {0}",
            format_args!("if we had an explicit self, we wouldn\'t be here")));
}unreachable!("if we had an explicit self, we wouldn't be here")
2954            }
2955        }
2956    }
2957}
2958
2959pub type ExplicitSelf = Spanned<SelfKind>;
2960
2961impl Param {
2962    /// Attempts to cast parameter to `ExplicitSelf`.
2963    pub fn to_self(&self) -> Option<ExplicitSelf> {
2964        if let PatKind::Ident(BindingMode(ByRef::No, mutbl), ident, _) = self.pat.kind {
2965            if ident.name == kw::SelfLower {
2966                return match self.ty.kind {
2967                    TyKind::ImplicitSelf => Some(respan(self.pat.span, SelfKind::Value(mutbl))),
2968                    TyKind::Ref(lt, MutTy { ref ty, mutbl }) if ty.kind.is_implicit_self() => {
2969                        Some(respan(self.pat.span, SelfKind::Region(lt, mutbl)))
2970                    }
2971                    TyKind::PinnedRef(lt, MutTy { ref ty, mutbl })
2972                        if ty.kind.is_implicit_self() =>
2973                    {
2974                        Some(respan(self.pat.span, SelfKind::Pinned(lt, mutbl)))
2975                    }
2976                    _ => Some(respan(
2977                        self.pat.span.to(self.ty.span),
2978                        SelfKind::Explicit(self.ty.clone(), mutbl),
2979                    )),
2980                };
2981            }
2982        }
2983        None
2984    }
2985
2986    /// Returns `true` if parameter is `self`.
2987    pub fn is_self(&self) -> bool {
2988        if let PatKind::Ident(_, ident, _) = self.pat.kind {
2989            ident.name == kw::SelfLower
2990        } else {
2991            false
2992        }
2993    }
2994
2995    /// Builds a `Param` object from `ExplicitSelf`.
2996    pub fn from_self(attrs: AttrVec, eself: ExplicitSelf, eself_ident: Ident) -> Param {
2997        let span = eself.span.to(eself_ident.span);
2998        let infer_ty = Box::new(Ty {
2999            id: DUMMY_NODE_ID,
3000            kind: TyKind::ImplicitSelf,
3001            span: eself_ident.span,
3002            tokens: None,
3003        });
3004        let (mutbl, ty) = match eself.node {
3005            SelfKind::Explicit(ty, mutbl) => (mutbl, ty),
3006            SelfKind::Value(mutbl) => (mutbl, infer_ty),
3007            SelfKind::Region(lt, mutbl) => (
3008                Mutability::Not,
3009                Box::new(Ty {
3010                    id: DUMMY_NODE_ID,
3011                    kind: TyKind::Ref(lt, MutTy { ty: infer_ty, mutbl }),
3012                    span,
3013                    tokens: None,
3014                }),
3015            ),
3016            SelfKind::Pinned(lt, mutbl) => (
3017                mutbl,
3018                Box::new(Ty {
3019                    id: DUMMY_NODE_ID,
3020                    kind: TyKind::PinnedRef(lt, MutTy { ty: infer_ty, mutbl }),
3021                    span,
3022                    tokens: None,
3023                }),
3024            ),
3025        };
3026        Param {
3027            attrs,
3028            pat: Box::new(Pat {
3029                id: DUMMY_NODE_ID,
3030                kind: PatKind::Ident(BindingMode(ByRef::No, mutbl), eself_ident, None),
3031                span,
3032                tokens: None,
3033            }),
3034            span,
3035            ty,
3036            id: DUMMY_NODE_ID,
3037            is_placeholder: false,
3038        }
3039    }
3040}
3041
3042/// A signature (not the body) of a function declaration.
3043///
3044/// E.g., `fn foo(bar: baz)`.
3045///
3046/// Please note that it's different from `FnHeader` structure
3047/// which contains metadata about function safety, asyncness, constness and ABI.
3048#[derive(#[automatically_derived]
impl ::core::clone::Clone for FnDecl {
    #[inline]
    fn clone(&self) -> FnDecl {
        FnDecl {
            inputs: ::core::clone::Clone::clone(&self.inputs),
            output: ::core::clone::Clone::clone(&self.output),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for FnDecl {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    FnDecl { inputs: ref __binding_0, output: ref __binding_1 }
                        => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for FnDecl {
            fn decode(__decoder: &mut __D) -> Self {
                FnDecl {
                    inputs: ::rustc_serialize::Decodable::decode(__decoder),
                    output: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for FnDecl {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field2_finish(f, "FnDecl",
            "inputs", &self.inputs, "output", &&self.output)
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for FnDecl where
            __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    FnDecl { inputs: ref __binding_0, output: ref __binding_1 }
                        => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for FnDecl where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    FnDecl {
                        inputs: ref mut __binding_0, output: ref mut __binding_1 }
                        => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
3049pub struct FnDecl {
3050    pub inputs: ThinVec<Param>,
3051    pub output: FnRetTy,
3052}
3053
3054impl FnDecl {
3055    pub fn has_self(&self) -> bool {
3056        self.inputs.get(0).is_some_and(Param::is_self)
3057    }
3058    pub fn c_variadic(&self) -> bool {
3059        self.inputs.last().is_some_and(|arg| #[allow(non_exhaustive_omitted_patterns)] match arg.ty.kind {
    TyKind::CVarArgs => true,
    _ => false,
}matches!(arg.ty.kind, TyKind::CVarArgs))
3060    }
3061}
3062
3063/// Is the trait definition an auto trait?
3064#[derive(#[automatically_derived]
impl ::core::marker::Copy for IsAuto { }Copy, #[automatically_derived]
impl ::core::clone::Clone for IsAuto {
    #[inline]
    fn clone(&self) -> IsAuto { *self }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for IsAuto {
    #[inline]
    fn eq(&self, other: &IsAuto) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr
    }
}PartialEq, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for IsAuto {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        IsAuto::Yes => { 0usize }
                        IsAuto::No => { 1usize }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self { IsAuto::Yes => {} IsAuto::No => {} }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for IsAuto {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => { IsAuto::Yes }
                    1usize => { IsAuto::No }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `IsAuto`, expected 0..2, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for IsAuto {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::write_str(f,
            match self { IsAuto::Yes => "Yes", IsAuto::No => "No", })
    }
}Debug, const _: () =
    {
        impl<__CTX> ::rustc_data_structures::stable_hasher::HashStable<__CTX>
            for IsAuto where __CTX: ::rustc_span::HashStableContext {
            #[inline]
            fn hash_stable(&self, __hcx: &mut __CTX,
                __hasher:
                    &mut ::rustc_data_structures::stable_hasher::StableHasher) {
                ::std::mem::discriminant(self).hash_stable(__hcx, __hasher);
                match *self { IsAuto::Yes => {} IsAuto::No => {} }
            }
        }
    };HashStable_Generic, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for IsAuto where
            __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self { IsAuto::Yes => {} IsAuto::No => {} }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for IsAuto where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self { IsAuto::Yes => {} IsAuto::No => {} }
            }
        }
    };Walkable)]
3065pub enum IsAuto {
3066    Yes,
3067    No,
3068}
3069
3070/// Safety of items.
3071#[derive(#[automatically_derived]
impl ::core::marker::Copy for Safety { }Copy, #[automatically_derived]
impl ::core::clone::Clone for Safety {
    #[inline]
    fn clone(&self) -> Safety {
        let _: ::core::clone::AssertParamIsClone<Span>;
        *self
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for Safety {
    #[inline]
    fn eq(&self, other: &Safety) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr &&
            match (self, other) {
                (Safety::Unsafe(__self_0), Safety::Unsafe(__arg1_0)) =>
                    __self_0 == __arg1_0,
                (Safety::Safe(__self_0), Safety::Safe(__arg1_0)) =>
                    __self_0 == __arg1_0,
                _ => true,
            }
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::Eq for Safety {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<Span>;
    }
}Eq, #[automatically_derived]
impl ::core::hash::Hash for Safety {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        ::core::hash::Hash::hash(&__self_discr, state);
        match self {
            Safety::Unsafe(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            Safety::Safe(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            _ => {}
        }
    }
}Hash, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for Safety {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        Safety::Unsafe(ref __binding_0) => { 0usize }
                        Safety::Safe(ref __binding_0) => { 1usize }
                        Safety::Default => { 2usize }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    Safety::Unsafe(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    Safety::Safe(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    Safety::Default => {}
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for Safety {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => {
                        Safety::Unsafe(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    1usize => {
                        Safety::Safe(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    2usize => { Safety::Default }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `Safety`, expected 0..3, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for Safety {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            Safety::Unsafe(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Unsafe",
                    &__self_0),
            Safety::Safe(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Safe",
                    &__self_0),
            Safety::Default =>
                ::core::fmt::Formatter::write_str(f, "Default"),
        }
    }
}Debug)]
3072#[derive(const _: () =
    {
        impl<__CTX> ::rustc_data_structures::stable_hasher::HashStable<__CTX>
            for Safety where __CTX: ::rustc_span::HashStableContext {
            #[inline]
            fn hash_stable(&self, __hcx: &mut __CTX,
                __hasher:
                    &mut ::rustc_data_structures::stable_hasher::StableHasher) {
                ::std::mem::discriminant(self).hash_stable(__hcx, __hasher);
                match *self {
                    Safety::Unsafe(ref __binding_0) => {
                        { __binding_0.hash_stable(__hcx, __hasher); }
                    }
                    Safety::Safe(ref __binding_0) => {
                        { __binding_0.hash_stable(__hcx, __hasher); }
                    }
                    Safety::Default => {}
                }
            }
        }
    };HashStable_Generic, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for Safety where
            __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    Safety::Unsafe(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    Safety::Safe(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    Safety::Default => {}
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for Safety where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    Safety::Unsafe(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                    Safety::Safe(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                    Safety::Default => {}
                }
            }
        }
    };Walkable)]
3073pub enum Safety {
3074    /// `unsafe` an item is explicitly marked as `unsafe`.
3075    Unsafe(Span),
3076    /// `safe` an item is explicitly marked as `safe`.
3077    Safe(Span),
3078    /// Default means no value was provided, it will take a default value given the context in
3079    /// which is used.
3080    Default,
3081}
3082
3083/// Describes what kind of coroutine markers, if any, a function has.
3084///
3085/// Coroutine markers are things that cause the function to generate a coroutine, such as `async`,
3086/// which makes the function return `impl Future`, or `gen`, which makes the function return `impl
3087/// Iterator`.
3088#[derive(#[automatically_derived]
impl ::core::marker::Copy for CoroutineKind { }Copy, #[automatically_derived]
impl ::core::clone::Clone for CoroutineKind {
    #[inline]
    fn clone(&self) -> CoroutineKind {
        let _: ::core::clone::AssertParamIsClone<Span>;
        let _: ::core::clone::AssertParamIsClone<NodeId>;
        *self
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for CoroutineKind {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        CoroutineKind::Async {
                            span: ref __binding_0,
                            closure_id: ref __binding_1,
                            return_impl_trait_id: ref __binding_2 } => {
                            0usize
                        }
                        CoroutineKind::Gen {
                            span: ref __binding_0,
                            closure_id: ref __binding_1,
                            return_impl_trait_id: ref __binding_2 } => {
                            1usize
                        }
                        CoroutineKind::AsyncGen {
                            span: ref __binding_0,
                            closure_id: ref __binding_1,
                            return_impl_trait_id: ref __binding_2 } => {
                            2usize
                        }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    CoroutineKind::Async {
                        span: ref __binding_0,
                        closure_id: ref __binding_1,
                        return_impl_trait_id: ref __binding_2 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                    }
                    CoroutineKind::Gen {
                        span: ref __binding_0,
                        closure_id: ref __binding_1,
                        return_impl_trait_id: ref __binding_2 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                    }
                    CoroutineKind::AsyncGen {
                        span: ref __binding_0,
                        closure_id: ref __binding_1,
                        return_impl_trait_id: ref __binding_2 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for CoroutineKind {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => {
                        CoroutineKind::Async {
                            span: ::rustc_serialize::Decodable::decode(__decoder),
                            closure_id: ::rustc_serialize::Decodable::decode(__decoder),
                            return_impl_trait_id: ::rustc_serialize::Decodable::decode(__decoder),
                        }
                    }
                    1usize => {
                        CoroutineKind::Gen {
                            span: ::rustc_serialize::Decodable::decode(__decoder),
                            closure_id: ::rustc_serialize::Decodable::decode(__decoder),
                            return_impl_trait_id: ::rustc_serialize::Decodable::decode(__decoder),
                        }
                    }
                    2usize => {
                        CoroutineKind::AsyncGen {
                            span: ::rustc_serialize::Decodable::decode(__decoder),
                            closure_id: ::rustc_serialize::Decodable::decode(__decoder),
                            return_impl_trait_id: ::rustc_serialize::Decodable::decode(__decoder),
                        }
                    }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `CoroutineKind`, expected 0..3, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for CoroutineKind {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            CoroutineKind::Async {
                span: __self_0,
                closure_id: __self_1,
                return_impl_trait_id: __self_2 } =>
                ::core::fmt::Formatter::debug_struct_field3_finish(f, "Async",
                    "span", __self_0, "closure_id", __self_1,
                    "return_impl_trait_id", &__self_2),
            CoroutineKind::Gen {
                span: __self_0,
                closure_id: __self_1,
                return_impl_trait_id: __self_2 } =>
                ::core::fmt::Formatter::debug_struct_field3_finish(f, "Gen",
                    "span", __self_0, "closure_id", __self_1,
                    "return_impl_trait_id", &__self_2),
            CoroutineKind::AsyncGen {
                span: __self_0,
                closure_id: __self_1,
                return_impl_trait_id: __self_2 } =>
                ::core::fmt::Formatter::debug_struct_field3_finish(f,
                    "AsyncGen", "span", __self_0, "closure_id", __self_1,
                    "return_impl_trait_id", &__self_2),
        }
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for
            CoroutineKind where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    CoroutineKind::Async {
                        span: ref __binding_0,
                        closure_id: ref __binding_1,
                        return_impl_trait_id: ref __binding_2 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_2,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    CoroutineKind::Gen {
                        span: ref __binding_0,
                        closure_id: ref __binding_1,
                        return_impl_trait_id: ref __binding_2 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_2,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    CoroutineKind::AsyncGen {
                        span: ref __binding_0,
                        closure_id: ref __binding_1,
                        return_impl_trait_id: ref __binding_2 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_2,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for CoroutineKind where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    CoroutineKind::Async {
                        span: ref mut __binding_0,
                        closure_id: ref mut __binding_1,
                        return_impl_trait_id: ref mut __binding_2 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_2,
                                __visitor, ())
                        }
                    }
                    CoroutineKind::Gen {
                        span: ref mut __binding_0,
                        closure_id: ref mut __binding_1,
                        return_impl_trait_id: ref mut __binding_2 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_2,
                                __visitor, ())
                        }
                    }
                    CoroutineKind::AsyncGen {
                        span: ref mut __binding_0,
                        closure_id: ref mut __binding_1,
                        return_impl_trait_id: ref mut __binding_2 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_2,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
3089pub enum CoroutineKind {
3090    /// `async`, which returns an `impl Future`.
3091    Async { span: Span, closure_id: NodeId, return_impl_trait_id: NodeId },
3092    /// `gen`, which returns an `impl Iterator`.
3093    Gen { span: Span, closure_id: NodeId, return_impl_trait_id: NodeId },
3094    /// `async gen`, which returns an `impl AsyncIterator`.
3095    AsyncGen { span: Span, closure_id: NodeId, return_impl_trait_id: NodeId },
3096}
3097
3098impl CoroutineKind {
3099    pub fn span(self) -> Span {
3100        match self {
3101            CoroutineKind::Async { span, .. } => span,
3102            CoroutineKind::Gen { span, .. } => span,
3103            CoroutineKind::AsyncGen { span, .. } => span,
3104        }
3105    }
3106
3107    pub fn as_str(self) -> &'static str {
3108        match self {
3109            CoroutineKind::Async { .. } => "async",
3110            CoroutineKind::Gen { .. } => "gen",
3111            CoroutineKind::AsyncGen { .. } => "async gen",
3112        }
3113    }
3114
3115    pub fn closure_id(self) -> NodeId {
3116        match self {
3117            CoroutineKind::Async { closure_id, .. }
3118            | CoroutineKind::Gen { closure_id, .. }
3119            | CoroutineKind::AsyncGen { closure_id, .. } => closure_id,
3120        }
3121    }
3122
3123    /// In this case this is an `async` or `gen` return, the `NodeId` for the generated `impl Trait`
3124    /// item.
3125    pub fn return_id(self) -> (NodeId, Span) {
3126        match self {
3127            CoroutineKind::Async { return_impl_trait_id, span, .. }
3128            | CoroutineKind::Gen { return_impl_trait_id, span, .. }
3129            | CoroutineKind::AsyncGen { return_impl_trait_id, span, .. } => {
3130                (return_impl_trait_id, span)
3131            }
3132        }
3133    }
3134}
3135
3136#[derive(#[automatically_derived]
impl ::core::marker::Copy for Const { }Copy, #[automatically_derived]
impl ::core::clone::Clone for Const {
    #[inline]
    fn clone(&self) -> Const {
        let _: ::core::clone::AssertParamIsClone<Span>;
        *self
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for Const {
    #[inline]
    fn eq(&self, other: &Const) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr &&
            match (self, other) {
                (Const::Yes(__self_0), Const::Yes(__arg1_0)) =>
                    __self_0 == __arg1_0,
                _ => true,
            }
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::Eq for Const {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<Span>;
    }
}Eq, #[automatically_derived]
impl ::core::hash::Hash for Const {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        ::core::hash::Hash::hash(&__self_discr, state);
        match self {
            Const::Yes(__self_0) => ::core::hash::Hash::hash(__self_0, state),
            _ => {}
        }
    }
}Hash, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for Const {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        Const::Yes(ref __binding_0) => { 0usize }
                        Const::No => { 1usize }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    Const::Yes(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    Const::No => {}
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for Const {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => {
                        Const::Yes(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    1usize => { Const::No }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `Const`, expected 0..2, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for Const {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            Const::Yes(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Yes",
                    &__self_0),
            Const::No => ::core::fmt::Formatter::write_str(f, "No"),
        }
    }
}Debug)]
3137#[derive(const _: () =
    {
        impl<__CTX> ::rustc_data_structures::stable_hasher::HashStable<__CTX>
            for Const where __CTX: ::rustc_span::HashStableContext {
            #[inline]
            fn hash_stable(&self, __hcx: &mut __CTX,
                __hasher:
                    &mut ::rustc_data_structures::stable_hasher::StableHasher) {
                ::std::mem::discriminant(self).hash_stable(__hcx, __hasher);
                match *self {
                    Const::Yes(ref __binding_0) => {
                        { __binding_0.hash_stable(__hcx, __hasher); }
                    }
                    Const::No => {}
                }
            }
        }
    };HashStable_Generic, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for Const where
            __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    Const::Yes(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    Const::No => {}
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for Const where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    Const::Yes(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                    Const::No => {}
                }
            }
        }
    };Walkable)]
3138pub enum Const {
3139    Yes(Span),
3140    No,
3141}
3142
3143/// Item defaultness.
3144/// For details see the [RFC #2532](https://github.com/rust-lang/rfcs/pull/2532).
3145#[derive(#[automatically_derived]
impl ::core::marker::Copy for Defaultness { }Copy, #[automatically_derived]
impl ::core::clone::Clone for Defaultness {
    #[inline]
    fn clone(&self) -> Defaultness {
        let _: ::core::clone::AssertParamIsClone<Span>;
        *self
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for Defaultness {
    #[inline]
    fn eq(&self, other: &Defaultness) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr &&
            match (self, other) {
                (Defaultness::Default(__self_0),
                    Defaultness::Default(__arg1_0)) => __self_0 == __arg1_0,
                (Defaultness::Final(__self_0), Defaultness::Final(__arg1_0))
                    => __self_0 == __arg1_0,
                _ => true,
            }
    }
}PartialEq, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for Defaultness {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        Defaultness::Implicit => { 0usize }
                        Defaultness::Default(ref __binding_0) => { 1usize }
                        Defaultness::Final(ref __binding_0) => { 2usize }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    Defaultness::Implicit => {}
                    Defaultness::Default(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    Defaultness::Final(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for Defaultness {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => { Defaultness::Implicit }
                    1usize => {
                        Defaultness::Default(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    2usize => {
                        Defaultness::Final(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `Defaultness`, expected 0..3, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for Defaultness {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            Defaultness::Implicit =>
                ::core::fmt::Formatter::write_str(f, "Implicit"),
            Defaultness::Default(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "Default", &__self_0),
            Defaultness::Final(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Final",
                    &__self_0),
        }
    }
}Debug, const _: () =
    {
        impl<__CTX> ::rustc_data_structures::stable_hasher::HashStable<__CTX>
            for Defaultness where __CTX: ::rustc_span::HashStableContext {
            #[inline]
            fn hash_stable(&self, __hcx: &mut __CTX,
                __hasher:
                    &mut ::rustc_data_structures::stable_hasher::StableHasher) {
                ::std::mem::discriminant(self).hash_stable(__hcx, __hasher);
                match *self {
                    Defaultness::Implicit => {}
                    Defaultness::Default(ref __binding_0) => {
                        { __binding_0.hash_stable(__hcx, __hasher); }
                    }
                    Defaultness::Final(ref __binding_0) => {
                        { __binding_0.hash_stable(__hcx, __hasher); }
                    }
                }
            }
        }
    };HashStable_Generic, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for Defaultness
            where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    Defaultness::Implicit => {}
                    Defaultness::Default(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    Defaultness::Final(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for Defaultness where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    Defaultness::Implicit => {}
                    Defaultness::Default(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                    Defaultness::Final(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
3146pub enum Defaultness {
3147    /// Item is unmarked. Implicitly determined based off of position.
3148    /// For impls, this is `final`; for traits, this is `default`.
3149    ///
3150    /// If you're expanding an item in a built-in macro or parsing an item
3151    /// by hand, you probably want to use this.
3152    Implicit,
3153    /// `default`
3154    Default(Span),
3155    /// `final`; per RFC 3678, only trait items may be *explicitly* marked final.
3156    Final(Span),
3157}
3158
3159#[derive(#[automatically_derived]
impl ::core::marker::Copy for ImplPolarity { }Copy, #[automatically_derived]
impl ::core::clone::Clone for ImplPolarity {
    #[inline]
    fn clone(&self) -> ImplPolarity {
        let _: ::core::clone::AssertParamIsClone<Span>;
        *self
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for ImplPolarity {
    #[inline]
    fn eq(&self, other: &ImplPolarity) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr &&
            match (self, other) {
                (ImplPolarity::Negative(__self_0),
                    ImplPolarity::Negative(__arg1_0)) => __self_0 == __arg1_0,
                _ => true,
            }
    }
}PartialEq, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for ImplPolarity {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        ImplPolarity::Positive => { 0usize }
                        ImplPolarity::Negative(ref __binding_0) => { 1usize }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    ImplPolarity::Positive => {}
                    ImplPolarity::Negative(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for ImplPolarity {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => { ImplPolarity::Positive }
                    1usize => {
                        ImplPolarity::Negative(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `ImplPolarity`, expected 0..2, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, const _: () =
    {
        impl<__CTX> ::rustc_data_structures::stable_hasher::HashStable<__CTX>
            for ImplPolarity where __CTX: ::rustc_span::HashStableContext {
            #[inline]
            fn hash_stable(&self, __hcx: &mut __CTX,
                __hasher:
                    &mut ::rustc_data_structures::stable_hasher::StableHasher) {
                ::std::mem::discriminant(self).hash_stable(__hcx, __hasher);
                match *self {
                    ImplPolarity::Positive => {}
                    ImplPolarity::Negative(ref __binding_0) => {
                        { __binding_0.hash_stable(__hcx, __hasher); }
                    }
                }
            }
        }
    };HashStable_Generic, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for ImplPolarity
            where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    ImplPolarity::Positive => {}
                    ImplPolarity::Negative(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for ImplPolarity where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    ImplPolarity::Positive => {}
                    ImplPolarity::Negative(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
3160pub enum ImplPolarity {
3161    /// `impl Trait for Type`
3162    Positive,
3163    /// `impl !Trait for Type`
3164    Negative(Span),
3165}
3166
3167impl fmt::Debug for ImplPolarity {
3168    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3169        match *self {
3170            ImplPolarity::Positive => "positive".fmt(f),
3171            ImplPolarity::Negative(_) => "negative".fmt(f),
3172        }
3173    }
3174}
3175
3176/// The polarity of a trait bound.
3177#[derive(#[automatically_derived]
impl ::core::marker::Copy for BoundPolarity { }Copy, #[automatically_derived]
impl ::core::clone::Clone for BoundPolarity {
    #[inline]
    fn clone(&self) -> BoundPolarity {
        let _: ::core::clone::AssertParamIsClone<Span>;
        *self
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for BoundPolarity {
    #[inline]
    fn eq(&self, other: &BoundPolarity) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr &&
            match (self, other) {
                (BoundPolarity::Negative(__self_0),
                    BoundPolarity::Negative(__arg1_0)) => __self_0 == __arg1_0,
                (BoundPolarity::Maybe(__self_0),
                    BoundPolarity::Maybe(__arg1_0)) => __self_0 == __arg1_0,
                _ => true,
            }
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::Eq for BoundPolarity {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<Span>;
    }
}Eq, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for BoundPolarity {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        BoundPolarity::Positive => { 0usize }
                        BoundPolarity::Negative(ref __binding_0) => { 1usize }
                        BoundPolarity::Maybe(ref __binding_0) => { 2usize }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    BoundPolarity::Positive => {}
                    BoundPolarity::Negative(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    BoundPolarity::Maybe(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for BoundPolarity {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => { BoundPolarity::Positive }
                    1usize => {
                        BoundPolarity::Negative(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    2usize => {
                        BoundPolarity::Maybe(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `BoundPolarity`, expected 0..3, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for BoundPolarity {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            BoundPolarity::Positive =>
                ::core::fmt::Formatter::write_str(f, "Positive"),
            BoundPolarity::Negative(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "Negative", &__self_0),
            BoundPolarity::Maybe(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Maybe",
                    &__self_0),
        }
    }
}Debug, #[automatically_derived]
impl ::core::hash::Hash for BoundPolarity {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        ::core::hash::Hash::hash(&__self_discr, state);
        match self {
            BoundPolarity::Negative(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            BoundPolarity::Maybe(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            _ => {}
        }
    }
}Hash)]
3178#[derive(const _: () =
    {
        impl<__CTX> ::rustc_data_structures::stable_hasher::HashStable<__CTX>
            for BoundPolarity where __CTX: ::rustc_span::HashStableContext {
            #[inline]
            fn hash_stable(&self, __hcx: &mut __CTX,
                __hasher:
                    &mut ::rustc_data_structures::stable_hasher::StableHasher) {
                ::std::mem::discriminant(self).hash_stable(__hcx, __hasher);
                match *self {
                    BoundPolarity::Positive => {}
                    BoundPolarity::Negative(ref __binding_0) => {
                        { __binding_0.hash_stable(__hcx, __hasher); }
                    }
                    BoundPolarity::Maybe(ref __binding_0) => {
                        { __binding_0.hash_stable(__hcx, __hasher); }
                    }
                }
            }
        }
    };HashStable_Generic, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for
            BoundPolarity where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    BoundPolarity::Positive => {}
                    BoundPolarity::Negative(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    BoundPolarity::Maybe(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for BoundPolarity where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    BoundPolarity::Positive => {}
                    BoundPolarity::Negative(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                    BoundPolarity::Maybe(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
3179pub enum BoundPolarity {
3180    /// `Type: Trait`
3181    Positive,
3182    /// `Type: !Trait`
3183    Negative(Span),
3184    /// `Type: ?Trait`
3185    Maybe(Span),
3186}
3187
3188impl BoundPolarity {
3189    pub fn as_str(self) -> &'static str {
3190        match self {
3191            Self::Positive => "",
3192            Self::Negative(_) => "!",
3193            Self::Maybe(_) => "?",
3194        }
3195    }
3196}
3197
3198/// The constness of a trait bound.
3199#[derive(#[automatically_derived]
impl ::core::marker::Copy for BoundConstness { }Copy, #[automatically_derived]
impl ::core::clone::Clone for BoundConstness {
    #[inline]
    fn clone(&self) -> BoundConstness {
        let _: ::core::clone::AssertParamIsClone<Span>;
        *self
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for BoundConstness {
    #[inline]
    fn eq(&self, other: &BoundConstness) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr &&
            match (self, other) {
                (BoundConstness::Always(__self_0),
                    BoundConstness::Always(__arg1_0)) => __self_0 == __arg1_0,
                (BoundConstness::Maybe(__self_0),
                    BoundConstness::Maybe(__arg1_0)) => __self_0 == __arg1_0,
                _ => true,
            }
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::Eq for BoundConstness {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<Span>;
    }
}Eq, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for BoundConstness {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        BoundConstness::Never => { 0usize }
                        BoundConstness::Always(ref __binding_0) => { 1usize }
                        BoundConstness::Maybe(ref __binding_0) => { 2usize }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    BoundConstness::Never => {}
                    BoundConstness::Always(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    BoundConstness::Maybe(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for BoundConstness {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => { BoundConstness::Never }
                    1usize => {
                        BoundConstness::Always(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    2usize => {
                        BoundConstness::Maybe(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `BoundConstness`, expected 0..3, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for BoundConstness {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            BoundConstness::Never =>
                ::core::fmt::Formatter::write_str(f, "Never"),
            BoundConstness::Always(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Always",
                    &__self_0),
            BoundConstness::Maybe(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Maybe",
                    &__self_0),
        }
    }
}Debug, #[automatically_derived]
impl ::core::hash::Hash for BoundConstness {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        ::core::hash::Hash::hash(&__self_discr, state);
        match self {
            BoundConstness::Always(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            BoundConstness::Maybe(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            _ => {}
        }
    }
}Hash)]
3200#[derive(const _: () =
    {
        impl<__CTX> ::rustc_data_structures::stable_hasher::HashStable<__CTX>
            for BoundConstness where __CTX: ::rustc_span::HashStableContext {
            #[inline]
            fn hash_stable(&self, __hcx: &mut __CTX,
                __hasher:
                    &mut ::rustc_data_structures::stable_hasher::StableHasher) {
                ::std::mem::discriminant(self).hash_stable(__hcx, __hasher);
                match *self {
                    BoundConstness::Never => {}
                    BoundConstness::Always(ref __binding_0) => {
                        { __binding_0.hash_stable(__hcx, __hasher); }
                    }
                    BoundConstness::Maybe(ref __binding_0) => {
                        { __binding_0.hash_stable(__hcx, __hasher); }
                    }
                }
            }
        }
    };HashStable_Generic, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for
            BoundConstness where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    BoundConstness::Never => {}
                    BoundConstness::Always(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    BoundConstness::Maybe(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for BoundConstness where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    BoundConstness::Never => {}
                    BoundConstness::Always(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                    BoundConstness::Maybe(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
3201pub enum BoundConstness {
3202    /// `Type: Trait`
3203    Never,
3204    /// `Type: const Trait`
3205    Always(Span),
3206    /// `Type: [const] Trait`
3207    Maybe(Span),
3208}
3209
3210impl BoundConstness {
3211    pub fn as_str(self) -> &'static str {
3212        match self {
3213            Self::Never => "",
3214            Self::Always(_) => "const",
3215            Self::Maybe(_) => "[const]",
3216        }
3217    }
3218}
3219
3220/// The asyncness of a trait bound.
3221#[derive(#[automatically_derived]
impl ::core::marker::Copy for BoundAsyncness { }Copy, #[automatically_derived]
impl ::core::clone::Clone for BoundAsyncness {
    #[inline]
    fn clone(&self) -> BoundAsyncness {
        let _: ::core::clone::AssertParamIsClone<Span>;
        *self
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for BoundAsyncness {
    #[inline]
    fn eq(&self, other: &BoundAsyncness) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr &&
            match (self, other) {
                (BoundAsyncness::Async(__self_0),
                    BoundAsyncness::Async(__arg1_0)) => __self_0 == __arg1_0,
                _ => true,
            }
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::Eq for BoundAsyncness {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<Span>;
    }
}Eq, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for BoundAsyncness {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        BoundAsyncness::Normal => { 0usize }
                        BoundAsyncness::Async(ref __binding_0) => { 1usize }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    BoundAsyncness::Normal => {}
                    BoundAsyncness::Async(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for BoundAsyncness {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => { BoundAsyncness::Normal }
                    1usize => {
                        BoundAsyncness::Async(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `BoundAsyncness`, expected 0..2, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for BoundAsyncness {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            BoundAsyncness::Normal =>
                ::core::fmt::Formatter::write_str(f, "Normal"),
            BoundAsyncness::Async(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Async",
                    &__self_0),
        }
    }
}Debug)]
3222#[derive(const _: () =
    {
        impl<__CTX> ::rustc_data_structures::stable_hasher::HashStable<__CTX>
            for BoundAsyncness where __CTX: ::rustc_span::HashStableContext {
            #[inline]
            fn hash_stable(&self, __hcx: &mut __CTX,
                __hasher:
                    &mut ::rustc_data_structures::stable_hasher::StableHasher) {
                ::std::mem::discriminant(self).hash_stable(__hcx, __hasher);
                match *self {
                    BoundAsyncness::Normal => {}
                    BoundAsyncness::Async(ref __binding_0) => {
                        { __binding_0.hash_stable(__hcx, __hasher); }
                    }
                }
            }
        }
    };HashStable_Generic, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for
            BoundAsyncness where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    BoundAsyncness::Normal => {}
                    BoundAsyncness::Async(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for BoundAsyncness where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    BoundAsyncness::Normal => {}
                    BoundAsyncness::Async(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
3223pub enum BoundAsyncness {
3224    /// `Type: Trait`
3225    Normal,
3226    /// `Type: async Trait`
3227    Async(Span),
3228}
3229
3230impl BoundAsyncness {
3231    pub fn as_str(self) -> &'static str {
3232        match self {
3233            Self::Normal => "",
3234            Self::Async(_) => "async",
3235        }
3236    }
3237}
3238
3239#[derive(#[automatically_derived]
impl ::core::clone::Clone for FnRetTy {
    #[inline]
    fn clone(&self) -> FnRetTy {
        match self {
            FnRetTy::Default(__self_0) =>
                FnRetTy::Default(::core::clone::Clone::clone(__self_0)),
            FnRetTy::Ty(__self_0) =>
                FnRetTy::Ty(::core::clone::Clone::clone(__self_0)),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for FnRetTy {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        FnRetTy::Default(ref __binding_0) => { 0usize }
                        FnRetTy::Ty(ref __binding_0) => { 1usize }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    FnRetTy::Default(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    FnRetTy::Ty(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for FnRetTy {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => {
                        FnRetTy::Default(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    1usize => {
                        FnRetTy::Ty(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `FnRetTy`, expected 0..2, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for FnRetTy {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            FnRetTy::Default(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "Default", &__self_0),
            FnRetTy::Ty(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Ty",
                    &__self_0),
        }
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for FnRetTy
            where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    FnRetTy::Default(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    FnRetTy::Ty(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for FnRetTy where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    FnRetTy::Default(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                    FnRetTy::Ty(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
3240pub enum FnRetTy {
3241    /// Returns type is not specified.
3242    ///
3243    /// Functions default to `()` and closures default to inference.
3244    /// Span points to where return type would be inserted.
3245    Default(Span),
3246    /// Everything else.
3247    Ty(Box<Ty>),
3248}
3249
3250impl FnRetTy {
3251    pub fn span(&self) -> Span {
3252        match self {
3253            &FnRetTy::Default(span) => span,
3254            FnRetTy::Ty(ty) => ty.span,
3255        }
3256    }
3257}
3258
3259#[derive(#[automatically_derived]
impl ::core::clone::Clone for Inline {
    #[inline]
    fn clone(&self) -> Inline {
        let _: ::core::clone::AssertParamIsClone<Result<(), ErrorGuaranteed>>;
        *self
    }
}Clone, #[automatically_derived]
impl ::core::marker::Copy for Inline { }Copy, #[automatically_derived]
impl ::core::cmp::PartialEq for Inline {
    #[inline]
    fn eq(&self, other: &Inline) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr &&
            match (self, other) {
                (Inline::No { had_parse_error: __self_0 }, Inline::No {
                    had_parse_error: __arg1_0 }) => __self_0 == __arg1_0,
                _ => true,
            }
    }
}PartialEq, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for Inline {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        Inline::Yes => { 0usize }
                        Inline::No { had_parse_error: ref __binding_0 } => {
                            1usize
                        }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    Inline::Yes => {}
                    Inline::No { had_parse_error: ref __binding_0 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for Inline {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => { Inline::Yes }
                    1usize => {
                        Inline::No {
                            had_parse_error: ::rustc_serialize::Decodable::decode(__decoder),
                        }
                    }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `Inline`, expected 0..2, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for Inline {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            Inline::Yes => ::core::fmt::Formatter::write_str(f, "Yes"),
            Inline::No { had_parse_error: __self_0 } =>
                ::core::fmt::Formatter::debug_struct_field1_finish(f, "No",
                    "had_parse_error", &__self_0),
        }
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for Inline where
            __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    Inline::Yes => {}
                    Inline::No { had_parse_error: ref __binding_0 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for Inline where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    Inline::Yes => {}
                    Inline::No { had_parse_error: ref mut __binding_0 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
3260pub enum Inline {
3261    Yes,
3262    No { had_parse_error: Result<(), ErrorGuaranteed> },
3263}
3264
3265/// Module item kind.
3266#[derive(#[automatically_derived]
impl ::core::clone::Clone for ModKind {
    #[inline]
    fn clone(&self) -> ModKind {
        match self {
            ModKind::Loaded(__self_0, __self_1, __self_2) =>
                ModKind::Loaded(::core::clone::Clone::clone(__self_0),
                    ::core::clone::Clone::clone(__self_1),
                    ::core::clone::Clone::clone(__self_2)),
            ModKind::Unloaded => ModKind::Unloaded,
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for ModKind {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        ModKind::Loaded(ref __binding_0, ref __binding_1,
                            ref __binding_2) => {
                            0usize
                        }
                        ModKind::Unloaded => { 1usize }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    ModKind::Loaded(ref __binding_0, ref __binding_1,
                        ref __binding_2) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                    }
                    ModKind::Unloaded => {}
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for ModKind {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => {
                        ModKind::Loaded(::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder))
                    }
                    1usize => { ModKind::Unloaded }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `ModKind`, expected 0..2, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for ModKind {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            ModKind::Loaded(__self_0, __self_1, __self_2) =>
                ::core::fmt::Formatter::debug_tuple_field3_finish(f, "Loaded",
                    __self_0, __self_1, &__self_2),
            ModKind::Unloaded =>
                ::core::fmt::Formatter::write_str(f, "Unloaded"),
        }
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for ModKind
            where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    ModKind::Loaded(ref __binding_0, ref __binding_1,
                        ref __binding_2) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_2,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    ModKind::Unloaded => {}
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for ModKind where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    ModKind::Loaded(ref mut __binding_0, ref mut __binding_1,
                        ref mut __binding_2) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_2,
                                __visitor, ())
                        }
                    }
                    ModKind::Unloaded => {}
                }
            }
        }
    };Walkable)]
3267pub enum ModKind {
3268    /// Module with inlined definition `mod foo { ... }`,
3269    /// or with definition outlined to a separate file `mod foo;` and already loaded from it.
3270    /// The inner span is from the first token past `{` to the last token until `}`,
3271    /// or from the first to the last token in the loaded file.
3272    Loaded(ThinVec<Box<Item>>, Inline, ModSpans),
3273    /// Module with definition outlined to a separate file `mod foo;` but not yet loaded from it.
3274    Unloaded,
3275}
3276
3277#[derive(#[automatically_derived]
impl ::core::marker::Copy for ModSpans { }Copy, #[automatically_derived]
impl ::core::clone::Clone for ModSpans {
    #[inline]
    fn clone(&self) -> ModSpans {
        let _: ::core::clone::AssertParamIsClone<Span>;
        *self
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for ModSpans {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    ModSpans {
                        inner_span: ref __binding_0,
                        inject_use_span: ref __binding_1 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for ModSpans {
            fn decode(__decoder: &mut __D) -> Self {
                ModSpans {
                    inner_span: ::rustc_serialize::Decodable::decode(__decoder),
                    inject_use_span: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for ModSpans {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field2_finish(f, "ModSpans",
            "inner_span", &self.inner_span, "inject_use_span",
            &&self.inject_use_span)
    }
}Debug, #[automatically_derived]
impl ::core::default::Default for ModSpans {
    #[inline]
    fn default() -> ModSpans {
        ModSpans {
            inner_span: ::core::default::Default::default(),
            inject_use_span: ::core::default::Default::default(),
        }
    }
}Default, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for ModSpans
            where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    ModSpans {
                        inner_span: ref __binding_0,
                        inject_use_span: ref __binding_1 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for ModSpans where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    ModSpans {
                        inner_span: ref mut __binding_0,
                        inject_use_span: ref mut __binding_1 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
3278pub struct ModSpans {
3279    /// `inner_span` covers the body of the module; for a file module, its the whole file.
3280    /// For an inline module, its the span inside the `{ ... }`, not including the curly braces.
3281    pub inner_span: Span,
3282    pub inject_use_span: Span,
3283}
3284
3285/// Foreign module declaration.
3286///
3287/// E.g., `extern { .. }` or `extern "C" { .. }`.
3288#[derive(#[automatically_derived]
impl ::core::clone::Clone for ForeignMod {
    #[inline]
    fn clone(&self) -> ForeignMod {
        ForeignMod {
            extern_span: ::core::clone::Clone::clone(&self.extern_span),
            safety: ::core::clone::Clone::clone(&self.safety),
            abi: ::core::clone::Clone::clone(&self.abi),
            items: ::core::clone::Clone::clone(&self.items),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for ForeignMod {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    ForeignMod {
                        extern_span: ref __binding_0,
                        safety: ref __binding_1,
                        abi: ref __binding_2,
                        items: ref __binding_3 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_3,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for ForeignMod {
            fn decode(__decoder: &mut __D) -> Self {
                ForeignMod {
                    extern_span: ::rustc_serialize::Decodable::decode(__decoder),
                    safety: ::rustc_serialize::Decodable::decode(__decoder),
                    abi: ::rustc_serialize::Decodable::decode(__decoder),
                    items: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for ForeignMod {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field4_finish(f, "ForeignMod",
            "extern_span", &self.extern_span, "safety", &self.safety, "abi",
            &self.abi, "items", &&self.items)
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for ForeignMod
            where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    ForeignMod {
                        extern_span: ref __binding_0,
                        safety: ref __binding_1,
                        abi: ref __binding_2,
                        items: ref __binding_3 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_2,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_3,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for ForeignMod where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    ForeignMod {
                        extern_span: ref mut __binding_0,
                        safety: ref mut __binding_1,
                        abi: ref mut __binding_2,
                        items: ref mut __binding_3 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_2,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_3,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
3289pub struct ForeignMod {
3290    /// Span of the `extern` keyword.
3291    pub extern_span: Span,
3292    /// `unsafe` keyword accepted syntactically for macro DSLs, but not
3293    /// semantically by Rust.
3294    pub safety: Safety,
3295    pub abi: Option<StrLit>,
3296    pub items: ThinVec<Box<ForeignItem>>,
3297}
3298
3299#[derive(#[automatically_derived]
impl ::core::clone::Clone for EnumDef {
    #[inline]
    fn clone(&self) -> EnumDef {
        EnumDef { variants: ::core::clone::Clone::clone(&self.variants) }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for EnumDef {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    EnumDef { variants: ref __binding_0 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for EnumDef {
            fn decode(__decoder: &mut __D) -> Self {
                EnumDef {
                    variants: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for EnumDef {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field1_finish(f, "EnumDef",
            "variants", &&self.variants)
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for EnumDef
            where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    EnumDef { variants: ref __binding_0 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for EnumDef where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    EnumDef { variants: ref mut __binding_0 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
3300pub struct EnumDef {
3301    pub variants: ThinVec<Variant>,
3302}
3303
3304/// Enum variant.
3305#[derive(#[automatically_derived]
impl ::core::clone::Clone for Variant {
    #[inline]
    fn clone(&self) -> Variant {
        Variant {
            attrs: ::core::clone::Clone::clone(&self.attrs),
            id: ::core::clone::Clone::clone(&self.id),
            span: ::core::clone::Clone::clone(&self.span),
            vis: ::core::clone::Clone::clone(&self.vis),
            ident: ::core::clone::Clone::clone(&self.ident),
            data: ::core::clone::Clone::clone(&self.data),
            disr_expr: ::core::clone::Clone::clone(&self.disr_expr),
            is_placeholder: ::core::clone::Clone::clone(&self.is_placeholder),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for Variant {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    Variant {
                        attrs: ref __binding_0,
                        id: ref __binding_1,
                        span: ref __binding_2,
                        vis: ref __binding_3,
                        ident: ref __binding_4,
                        data: ref __binding_5,
                        disr_expr: ref __binding_6,
                        is_placeholder: ref __binding_7 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_3,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_4,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_5,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_6,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_7,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for Variant {
            fn decode(__decoder: &mut __D) -> Self {
                Variant {
                    attrs: ::rustc_serialize::Decodable::decode(__decoder),
                    id: ::rustc_serialize::Decodable::decode(__decoder),
                    span: ::rustc_serialize::Decodable::decode(__decoder),
                    vis: ::rustc_serialize::Decodable::decode(__decoder),
                    ident: ::rustc_serialize::Decodable::decode(__decoder),
                    data: ::rustc_serialize::Decodable::decode(__decoder),
                    disr_expr: ::rustc_serialize::Decodable::decode(__decoder),
                    is_placeholder: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for Variant {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["attrs", "id", "span", "vis", "ident", "data", "disr_expr",
                        "is_placeholder"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.attrs, &self.id, &self.span, &self.vis, &self.ident,
                        &self.data, &self.disr_expr, &&self.is_placeholder];
        ::core::fmt::Formatter::debug_struct_fields_finish(f, "Variant",
            names, values)
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for Variant
            where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    Variant {
                        attrs: ref __binding_0,
                        id: ref __binding_1,
                        span: ref __binding_2,
                        vis: ref __binding_3,
                        ident: ref __binding_4,
                        data: ref __binding_5,
                        disr_expr: ref __binding_6,
                        is_placeholder: ref __binding_7 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_2,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_3,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_4,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_5,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_6,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_7,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for Variant where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    Variant {
                        attrs: ref mut __binding_0,
                        id: ref mut __binding_1,
                        span: ref mut __binding_2,
                        vis: ref mut __binding_3,
                        ident: ref mut __binding_4,
                        data: ref mut __binding_5,
                        disr_expr: ref mut __binding_6,
                        is_placeholder: ref mut __binding_7 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_2,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_3,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_4,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_5,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_6,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_7,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
3306pub struct Variant {
3307    /// Attributes of the variant.
3308    pub attrs: AttrVec,
3309    /// Id of the variant (not the constructor, see `VariantData::ctor_id()`).
3310    pub id: NodeId,
3311    /// Span
3312    pub span: Span,
3313    /// The visibility of the variant. Syntactically accepted but not semantically.
3314    pub vis: Visibility,
3315    /// Name of the variant.
3316    pub ident: Ident,
3317
3318    /// Fields and constructor id of the variant.
3319    pub data: VariantData,
3320    /// Explicit discriminant, e.g., `Foo = 1`.
3321    pub disr_expr: Option<AnonConst>,
3322    /// Is a macro placeholder.
3323    pub is_placeholder: bool,
3324}
3325
3326/// Part of `use` item to the right of its prefix.
3327#[derive(#[automatically_derived]
impl ::core::clone::Clone for UseTreeKind {
    #[inline]
    fn clone(&self) -> UseTreeKind {
        match self {
            UseTreeKind::Simple(__self_0) =>
                UseTreeKind::Simple(::core::clone::Clone::clone(__self_0)),
            UseTreeKind::Nested { items: __self_0, span: __self_1 } =>
                UseTreeKind::Nested {
                    items: ::core::clone::Clone::clone(__self_0),
                    span: ::core::clone::Clone::clone(__self_1),
                },
            UseTreeKind::Glob(__self_0) =>
                UseTreeKind::Glob(::core::clone::Clone::clone(__self_0)),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for UseTreeKind {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        UseTreeKind::Simple(ref __binding_0) => { 0usize }
                        UseTreeKind::Nested {
                            items: ref __binding_0, span: ref __binding_1 } => {
                            1usize
                        }
                        UseTreeKind::Glob(ref __binding_0) => { 2usize }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    UseTreeKind::Simple(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    UseTreeKind::Nested {
                        items: ref __binding_0, span: ref __binding_1 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                    }
                    UseTreeKind::Glob(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for UseTreeKind {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => {
                        UseTreeKind::Simple(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    1usize => {
                        UseTreeKind::Nested {
                            items: ::rustc_serialize::Decodable::decode(__decoder),
                            span: ::rustc_serialize::Decodable::decode(__decoder),
                        }
                    }
                    2usize => {
                        UseTreeKind::Glob(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `UseTreeKind`, expected 0..3, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for UseTreeKind {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            UseTreeKind::Simple(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Simple",
                    &__self_0),
            UseTreeKind::Nested { items: __self_0, span: __self_1 } =>
                ::core::fmt::Formatter::debug_struct_field2_finish(f,
                    "Nested", "items", __self_0, "span", &__self_1),
            UseTreeKind::Glob(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Glob",
                    &__self_0),
        }
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for UseTreeKind
            where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    UseTreeKind::Simple(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    UseTreeKind::Nested {
                        items: ref __binding_0, span: ref __binding_1 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    UseTreeKind::Glob(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for UseTreeKind where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    UseTreeKind::Simple(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                    UseTreeKind::Nested {
                        items: ref mut __binding_0, span: ref mut __binding_1 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                    }
                    UseTreeKind::Glob(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
3328pub enum UseTreeKind {
3329    /// `use prefix` or `use prefix as rename`
3330    Simple(Option<Ident>),
3331    /// `use prefix::{...}`
3332    ///
3333    /// The span represents the braces of the nested group and all elements within:
3334    ///
3335    /// ```text
3336    /// use foo::{bar, baz};
3337    ///          ^^^^^^^^^^
3338    /// ```
3339    Nested { items: ThinVec<(UseTree, NodeId)>, span: Span },
3340    /// `use prefix::*`
3341    Glob(Span),
3342}
3343
3344/// A tree of paths sharing common prefixes.
3345/// Used in `use` items both at top-level and inside of braces in import groups.
3346#[derive(#[automatically_derived]
impl ::core::clone::Clone for UseTree {
    #[inline]
    fn clone(&self) -> UseTree {
        UseTree {
            prefix: ::core::clone::Clone::clone(&self.prefix),
            kind: ::core::clone::Clone::clone(&self.kind),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for UseTree {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    UseTree { prefix: ref __binding_0, kind: ref __binding_1 }
                        => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for UseTree {
            fn decode(__decoder: &mut __D) -> Self {
                UseTree {
                    prefix: ::rustc_serialize::Decodable::decode(__decoder),
                    kind: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for UseTree {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field2_finish(f, "UseTree",
            "prefix", &self.prefix, "kind", &&self.kind)
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for UseTree
            where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    UseTree { prefix: ref __binding_0, kind: ref __binding_1 }
                        => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for UseTree where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    UseTree {
                        prefix: ref mut __binding_0, kind: ref mut __binding_1 } =>
                        {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
3347pub struct UseTree {
3348    pub prefix: Path,
3349    pub kind: UseTreeKind,
3350}
3351
3352impl UseTree {
3353    /// If the `UseTree` is just an identifier, return that.
3354    /// Panics if it's a glob (`*`) or a nested use tree.
3355    pub fn ident(&self) -> Ident {
3356        match self.kind {
3357            UseTreeKind::Simple(Some(rename)) => rename,
3358            UseTreeKind::Simple(None) => {
3359                self.prefix.segments.last().expect("empty prefix in a simple import").ident
3360            }
3361            _ => {
    ::core::panicking::panic_fmt(format_args!("`UseTree::ident` can only be used on a simple import"));
}panic!("`UseTree::ident` can only be used on a simple import"),
3362        }
3363    }
3364
3365    /// Returns the full span from the start of the path to the
3366    /// closing `}` or nested spans, `*` of glob spans or the end of the
3367    /// identifier of simple spans.
3368    pub fn span(&self) -> Span {
3369        self.prefix.span.to(self.hi_span())
3370    }
3371
3372    /// Returns the trailing element's span. So for a nested
3373    /// span you get the entire `{}`-block, for a glob you
3374    /// get the span of the `*` itself, and for simple use trees
3375    /// you get the identifier to rename the import to or the full
3376    /// path if no rename is specified.
3377    pub fn hi_span(&self) -> Span {
3378        match self.kind {
3379            UseTreeKind::Simple(None) => self.prefix.span,
3380            UseTreeKind::Simple(Some(name)) => name.span,
3381            UseTreeKind::Nested { span, .. } => span,
3382            UseTreeKind::Glob(span) => span,
3383        }
3384    }
3385}
3386
3387/// Distinguishes between `Attribute`s that decorate items and Attributes that
3388/// are contained as statements within items. These two cases need to be
3389/// distinguished for pretty-printing.
3390#[derive(#[automatically_derived]
impl ::core::clone::Clone for AttrStyle {
    #[inline]
    fn clone(&self) -> AttrStyle { *self }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for AttrStyle {
    #[inline]
    fn eq(&self, other: &AttrStyle) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::Eq for AttrStyle {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::hash::Hash for AttrStyle {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        ::core::hash::Hash::hash(&__self_discr, state)
    }
}Hash, #[automatically_derived]
impl ::core::fmt::Debug for AttrStyle {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::write_str(f,
            match self {
                AttrStyle::Outer => "Outer",
                AttrStyle::Inner => "Inner",
            })
    }
}Debug, #[automatically_derived]
impl ::core::marker::Copy for AttrStyle { }Copy)]
3391#[derive(const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for AttrStyle {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        AttrStyle::Outer => { 0usize }
                        AttrStyle::Inner => { 1usize }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self { AttrStyle::Outer => {} AttrStyle::Inner => {} }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for AttrStyle {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => { AttrStyle::Outer }
                    1usize => { AttrStyle::Inner }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `AttrStyle`, expected 0..2, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, const _: () =
    {
        impl<__CTX> ::rustc_data_structures::stable_hasher::HashStable<__CTX>
            for AttrStyle where __CTX: ::rustc_span::HashStableContext {
            #[inline]
            fn hash_stable(&self, __hcx: &mut __CTX,
                __hasher:
                    &mut ::rustc_data_structures::stable_hasher::StableHasher) {
                ::std::mem::discriminant(self).hash_stable(__hcx, __hasher);
                match *self { AttrStyle::Outer => {} AttrStyle::Inner => {} }
            }
        }
    };HashStable_Generic, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for AttrStyle
            where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self { AttrStyle::Outer => {} AttrStyle::Inner => {} }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for AttrStyle where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self { AttrStyle::Outer => {} AttrStyle::Inner => {} }
            }
        }
    };Walkable)]
3392pub enum AttrStyle {
3393    Outer,
3394    Inner,
3395}
3396
3397/// A list of attributes.
3398pub type AttrVec = ThinVec<Attribute>;
3399
3400/// A syntax-level representation of an attribute.
3401#[derive(#[automatically_derived]
impl ::core::clone::Clone for Attribute {
    #[inline]
    fn clone(&self) -> Attribute {
        Attribute {
            kind: ::core::clone::Clone::clone(&self.kind),
            id: ::core::clone::Clone::clone(&self.id),
            style: ::core::clone::Clone::clone(&self.style),
            span: ::core::clone::Clone::clone(&self.span),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for Attribute {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    Attribute {
                        kind: ref __binding_0,
                        id: ref __binding_1,
                        style: ref __binding_2,
                        span: ref __binding_3 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_3,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for Attribute {
            fn decode(__decoder: &mut __D) -> Self {
                Attribute {
                    kind: ::rustc_serialize::Decodable::decode(__decoder),
                    id: ::rustc_serialize::Decodable::decode(__decoder),
                    style: ::rustc_serialize::Decodable::decode(__decoder),
                    span: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for Attribute {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field4_finish(f, "Attribute",
            "kind", &self.kind, "id", &self.id, "style", &self.style, "span",
            &&self.span)
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for Attribute
            where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    Attribute {
                        kind: ref __binding_0,
                        id: ref __binding_1,
                        style: ref __binding_2,
                        span: ref __binding_3 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_2,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_3,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for Attribute where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    Attribute {
                        kind: ref mut __binding_0,
                        id: ref mut __binding_1,
                        style: ref mut __binding_2,
                        span: ref mut __binding_3 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_2,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_3,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
3402pub struct Attribute {
3403    pub kind: AttrKind,
3404    pub id: AttrId,
3405    /// Denotes if the attribute decorates the following construct (outer)
3406    /// or the construct this attribute is contained within (inner).
3407    pub style: AttrStyle,
3408    pub span: Span,
3409}
3410
3411#[derive(#[automatically_derived]
impl ::core::clone::Clone for AttrKind {
    #[inline]
    fn clone(&self) -> AttrKind {
        match self {
            AttrKind::Normal(__self_0) =>
                AttrKind::Normal(::core::clone::Clone::clone(__self_0)),
            AttrKind::DocComment(__self_0, __self_1) =>
                AttrKind::DocComment(::core::clone::Clone::clone(__self_0),
                    ::core::clone::Clone::clone(__self_1)),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for AttrKind {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        AttrKind::Normal(ref __binding_0) => { 0usize }
                        AttrKind::DocComment(ref __binding_0, ref __binding_1) => {
                            1usize
                        }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    AttrKind::Normal(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    AttrKind::DocComment(ref __binding_0, ref __binding_1) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for AttrKind {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => {
                        AttrKind::Normal(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    1usize => {
                        AttrKind::DocComment(::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder))
                    }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `AttrKind`, expected 0..2, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for AttrKind {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            AttrKind::Normal(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Normal",
                    &__self_0),
            AttrKind::DocComment(__self_0, __self_1) =>
                ::core::fmt::Formatter::debug_tuple_field2_finish(f,
                    "DocComment", __self_0, &__self_1),
        }
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for AttrKind
            where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    AttrKind::Normal(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    AttrKind::DocComment(ref __binding_0, ref __binding_1) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for AttrKind where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    AttrKind::Normal(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                    AttrKind::DocComment(ref mut __binding_0,
                        ref mut __binding_1) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
3412pub enum AttrKind {
3413    /// A normal attribute.
3414    Normal(Box<NormalAttr>),
3415
3416    /// A doc comment (e.g. `/// ...`, `//! ...`, `/** ... */`, `/*! ... */`).
3417    /// Doc attributes (e.g. `#[doc="..."]`) are represented with the `Normal`
3418    /// variant (which is much less compact and thus more expensive).
3419    DocComment(CommentKind, Symbol),
3420}
3421
3422#[derive(#[automatically_derived]
impl ::core::clone::Clone for NormalAttr {
    #[inline]
    fn clone(&self) -> NormalAttr {
        NormalAttr {
            item: ::core::clone::Clone::clone(&self.item),
            tokens: ::core::clone::Clone::clone(&self.tokens),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for NormalAttr {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    NormalAttr { item: ref __binding_0, tokens: ref __binding_1
                        } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for NormalAttr {
            fn decode(__decoder: &mut __D) -> Self {
                NormalAttr {
                    item: ::rustc_serialize::Decodable::decode(__decoder),
                    tokens: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for NormalAttr {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field2_finish(f, "NormalAttr",
            "item", &self.item, "tokens", &&self.tokens)
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for NormalAttr
            where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    NormalAttr { item: ref __binding_0, tokens: ref __binding_1
                        } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for NormalAttr where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    NormalAttr {
                        item: ref mut __binding_0, tokens: ref mut __binding_1 } =>
                        {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
3423pub struct NormalAttr {
3424    pub item: AttrItem,
3425    // Tokens for the full attribute, e.g. `#[foo]`, `#![bar]`.
3426    pub tokens: Option<LazyAttrTokenStream>,
3427}
3428
3429impl NormalAttr {
3430    pub fn from_ident(ident: Ident) -> Self {
3431        Self {
3432            item: AttrItem {
3433                unsafety: Safety::Default,
3434                path: Path::from_ident(ident),
3435                args: AttrItemKind::Unparsed(AttrArgs::Empty),
3436                tokens: None,
3437            },
3438            tokens: None,
3439        }
3440    }
3441}
3442
3443#[derive(#[automatically_derived]
impl ::core::clone::Clone for AttrItem {
    #[inline]
    fn clone(&self) -> AttrItem {
        AttrItem {
            unsafety: ::core::clone::Clone::clone(&self.unsafety),
            path: ::core::clone::Clone::clone(&self.path),
            args: ::core::clone::Clone::clone(&self.args),
            tokens: ::core::clone::Clone::clone(&self.tokens),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for AttrItem {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    AttrItem {
                        unsafety: ref __binding_0,
                        path: ref __binding_1,
                        args: ref __binding_2,
                        tokens: ref __binding_3 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_3,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for AttrItem {
            fn decode(__decoder: &mut __D) -> Self {
                AttrItem {
                    unsafety: ::rustc_serialize::Decodable::decode(__decoder),
                    path: ::rustc_serialize::Decodable::decode(__decoder),
                    args: ::rustc_serialize::Decodable::decode(__decoder),
                    tokens: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for AttrItem {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field4_finish(f, "AttrItem",
            "unsafety", &self.unsafety, "path", &self.path, "args",
            &self.args, "tokens", &&self.tokens)
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for AttrItem
            where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    AttrItem {
                        unsafety: ref __binding_0,
                        path: ref __binding_1,
                        args: ref __binding_2,
                        tokens: ref __binding_3 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_2,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_3,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for AttrItem where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    AttrItem {
                        unsafety: ref mut __binding_0,
                        path: ref mut __binding_1,
                        args: ref mut __binding_2,
                        tokens: ref mut __binding_3 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_2,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_3,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
3444pub struct AttrItem {
3445    pub unsafety: Safety,
3446    pub path: Path,
3447    pub args: AttrItemKind,
3448    // Tokens for the meta item, e.g. just the `foo` within `#[foo]` or `#![foo]`.
3449    pub tokens: Option<LazyAttrTokenStream>,
3450}
3451
3452/// Some attributes are stored in a parsed form, for performance reasons.
3453/// Their arguments don't have to be reparsed everytime they're used
3454#[derive(#[automatically_derived]
impl ::core::clone::Clone for AttrItemKind {
    #[inline]
    fn clone(&self) -> AttrItemKind {
        match self {
            AttrItemKind::Parsed(__self_0) =>
                AttrItemKind::Parsed(::core::clone::Clone::clone(__self_0)),
            AttrItemKind::Unparsed(__self_0) =>
                AttrItemKind::Unparsed(::core::clone::Clone::clone(__self_0)),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for AttrItemKind {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        AttrItemKind::Parsed(ref __binding_0) => { 0usize }
                        AttrItemKind::Unparsed(ref __binding_0) => { 1usize }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    AttrItemKind::Parsed(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    AttrItemKind::Unparsed(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for AttrItemKind {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => {
                        AttrItemKind::Parsed(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    1usize => {
                        AttrItemKind::Unparsed(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `AttrItemKind`, expected 0..2, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for AttrItemKind {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            AttrItemKind::Parsed(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Parsed",
                    &__self_0),
            AttrItemKind::Unparsed(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "Unparsed", &__self_0),
        }
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for AttrItemKind
            where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    AttrItemKind::Parsed(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    AttrItemKind::Unparsed(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for AttrItemKind where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    AttrItemKind::Parsed(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                    AttrItemKind::Unparsed(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
3455pub enum AttrItemKind {
3456    Parsed(EarlyParsedAttribute),
3457    Unparsed(AttrArgs),
3458}
3459
3460impl AttrItemKind {
3461    pub fn unparsed(self) -> Option<AttrArgs> {
3462        match self {
3463            AttrItemKind::Unparsed(args) => Some(args),
3464            AttrItemKind::Parsed(_) => None,
3465        }
3466    }
3467
3468    pub fn unparsed_ref(&self) -> Option<&AttrArgs> {
3469        match self {
3470            AttrItemKind::Unparsed(args) => Some(args),
3471            AttrItemKind::Parsed(_) => None,
3472        }
3473    }
3474
3475    pub fn span(&self) -> Option<Span> {
3476        match self {
3477            AttrItemKind::Unparsed(args) => args.span(),
3478            AttrItemKind::Parsed(_) => None,
3479        }
3480    }
3481}
3482
3483/// Some attributes are stored in parsed form in the AST.
3484/// This is done for performance reasons, so the attributes don't need to be reparsed on every use.
3485///
3486/// Currently all early parsed attributes are excluded from pretty printing at rustc_ast_pretty::pprust::state::print_attribute_inline.
3487/// When adding new early parsed attributes, consider whether they should be pretty printed.
3488#[derive(#[automatically_derived]
impl ::core::clone::Clone for EarlyParsedAttribute {
    #[inline]
    fn clone(&self) -> EarlyParsedAttribute {
        match self {
            EarlyParsedAttribute::CfgTrace(__self_0) =>
                EarlyParsedAttribute::CfgTrace(::core::clone::Clone::clone(__self_0)),
            EarlyParsedAttribute::CfgAttrTrace =>
                EarlyParsedAttribute::CfgAttrTrace,
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for EarlyParsedAttribute {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        EarlyParsedAttribute::CfgTrace(ref __binding_0) => {
                            0usize
                        }
                        EarlyParsedAttribute::CfgAttrTrace => { 1usize }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    EarlyParsedAttribute::CfgTrace(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    EarlyParsedAttribute::CfgAttrTrace => {}
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for EarlyParsedAttribute {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => {
                        EarlyParsedAttribute::CfgTrace(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    1usize => { EarlyParsedAttribute::CfgAttrTrace }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `EarlyParsedAttribute`, expected 0..2, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for EarlyParsedAttribute {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            EarlyParsedAttribute::CfgTrace(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "CfgTrace", &__self_0),
            EarlyParsedAttribute::CfgAttrTrace =>
                ::core::fmt::Formatter::write_str(f, "CfgAttrTrace"),
        }
    }
}Debug, const _: () =
    {
        impl<__CTX> ::rustc_data_structures::stable_hasher::HashStable<__CTX>
            for EarlyParsedAttribute where
            __CTX: ::rustc_span::HashStableContext {
            #[inline]
            fn hash_stable(&self, __hcx: &mut __CTX,
                __hasher:
                    &mut ::rustc_data_structures::stable_hasher::StableHasher) {
                ::std::mem::discriminant(self).hash_stable(__hcx, __hasher);
                match *self {
                    EarlyParsedAttribute::CfgTrace(ref __binding_0) => {
                        { __binding_0.hash_stable(__hcx, __hasher); }
                    }
                    EarlyParsedAttribute::CfgAttrTrace => {}
                }
            }
        }
    };HashStable_Generic)]
3489pub enum EarlyParsedAttribute {
3490    CfgTrace(CfgEntry),
3491    CfgAttrTrace,
3492}
3493
3494impl AttrItem {
3495    pub fn is_valid_for_outer_style(&self) -> bool {
3496        self.path == sym::cfg_attr
3497            || self.path == sym::cfg
3498            || self.path == sym::forbid
3499            || self.path == sym::warn
3500            || self.path == sym::allow
3501            || self.path == sym::deny
3502    }
3503}
3504
3505/// `TraitRef`s appear in impls.
3506///
3507/// Resolution maps each `TraitRef`'s `ref_id` to its defining trait; that's all
3508/// that the `ref_id` is for. The `impl_id` maps to the "self type" of this impl.
3509/// If this impl is an `ItemKind::Impl`, the `impl_id` is redundant (it could be the
3510/// same as the impl's `NodeId`).
3511#[derive(#[automatically_derived]
impl ::core::clone::Clone for TraitRef {
    #[inline]
    fn clone(&self) -> TraitRef {
        TraitRef {
            path: ::core::clone::Clone::clone(&self.path),
            ref_id: ::core::clone::Clone::clone(&self.ref_id),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for TraitRef {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    TraitRef { path: ref __binding_0, ref_id: ref __binding_1 }
                        => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for TraitRef {
            fn decode(__decoder: &mut __D) -> Self {
                TraitRef {
                    path: ::rustc_serialize::Decodable::decode(__decoder),
                    ref_id: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for TraitRef {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field2_finish(f, "TraitRef",
            "path", &self.path, "ref_id", &&self.ref_id)
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for TraitRef
            where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    TraitRef { path: ref __binding_0, ref_id: ref __binding_1 }
                        => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for TraitRef where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    TraitRef {
                        path: ref mut __binding_0, ref_id: ref mut __binding_1 } =>
                        {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
3512pub struct TraitRef {
3513    pub path: Path,
3514    pub ref_id: NodeId,
3515}
3516
3517/// Whether enclosing parentheses are present or not.
3518#[derive(#[automatically_derived]
impl ::core::clone::Clone for Parens {
    #[inline]
    fn clone(&self) -> Parens {
        match self { Parens::Yes => Parens::Yes, Parens::No => Parens::No, }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for Parens {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        Parens::Yes => { 0usize }
                        Parens::No => { 1usize }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self { Parens::Yes => {} Parens::No => {} }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for Parens {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => { Parens::Yes }
                    1usize => { Parens::No }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `Parens`, expected 0..2, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for Parens {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::write_str(f,
            match self { Parens::Yes => "Yes", Parens::No => "No", })
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for Parens where
            __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self { Parens::Yes => {} Parens::No => {} }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for Parens where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self { Parens::Yes => {} Parens::No => {} }
            }
        }
    };Walkable)]
3519pub enum Parens {
3520    Yes,
3521    No,
3522}
3523
3524#[derive(#[automatically_derived]
impl ::core::clone::Clone for PolyTraitRef {
    #[inline]
    fn clone(&self) -> PolyTraitRef {
        PolyTraitRef {
            bound_generic_params: ::core::clone::Clone::clone(&self.bound_generic_params),
            modifiers: ::core::clone::Clone::clone(&self.modifiers),
            trait_ref: ::core::clone::Clone::clone(&self.trait_ref),
            span: ::core::clone::Clone::clone(&self.span),
            parens: ::core::clone::Clone::clone(&self.parens),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for PolyTraitRef {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    PolyTraitRef {
                        bound_generic_params: ref __binding_0,
                        modifiers: ref __binding_1,
                        trait_ref: ref __binding_2,
                        span: ref __binding_3,
                        parens: ref __binding_4 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_3,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_4,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for PolyTraitRef {
            fn decode(__decoder: &mut __D) -> Self {
                PolyTraitRef {
                    bound_generic_params: ::rustc_serialize::Decodable::decode(__decoder),
                    modifiers: ::rustc_serialize::Decodable::decode(__decoder),
                    trait_ref: ::rustc_serialize::Decodable::decode(__decoder),
                    span: ::rustc_serialize::Decodable::decode(__decoder),
                    parens: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for PolyTraitRef {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field5_finish(f, "PolyTraitRef",
            "bound_generic_params", &self.bound_generic_params, "modifiers",
            &self.modifiers, "trait_ref", &self.trait_ref, "span", &self.span,
            "parens", &&self.parens)
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for PolyTraitRef
            where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    PolyTraitRef {
                        bound_generic_params: ref __binding_0,
                        modifiers: ref __binding_1,
                        trait_ref: ref __binding_2,
                        span: ref __binding_3,
                        parens: ref __binding_4 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_2,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_3,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_4,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for PolyTraitRef where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    PolyTraitRef {
                        bound_generic_params: ref mut __binding_0,
                        modifiers: ref mut __binding_1,
                        trait_ref: ref mut __binding_2,
                        span: ref mut __binding_3,
                        parens: ref mut __binding_4 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_2,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_3,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_4,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
3525pub struct PolyTraitRef {
3526    /// The `'a` in `for<'a> Foo<&'a T>`.
3527    pub bound_generic_params: ThinVec<GenericParam>,
3528
3529    // Optional constness, asyncness, or polarity.
3530    pub modifiers: TraitBoundModifiers,
3531
3532    /// The `Foo<&'a T>` in `<'a> Foo<&'a T>`.
3533    pub trait_ref: TraitRef,
3534
3535    pub span: Span,
3536
3537    /// When `Yes`, the first and last character of `span` are an opening
3538    /// and a closing paren respectively.
3539    pub parens: Parens,
3540}
3541
3542impl PolyTraitRef {
3543    pub fn new(
3544        generic_params: ThinVec<GenericParam>,
3545        path: Path,
3546        modifiers: TraitBoundModifiers,
3547        span: Span,
3548        parens: Parens,
3549    ) -> Self {
3550        PolyTraitRef {
3551            bound_generic_params: generic_params,
3552            modifiers,
3553            trait_ref: TraitRef { path, ref_id: DUMMY_NODE_ID },
3554            span,
3555            parens,
3556        }
3557    }
3558}
3559
3560#[derive(#[automatically_derived]
impl ::core::clone::Clone for Visibility {
    #[inline]
    fn clone(&self) -> Visibility {
        Visibility {
            kind: ::core::clone::Clone::clone(&self.kind),
            span: ::core::clone::Clone::clone(&self.span),
            tokens: ::core::clone::Clone::clone(&self.tokens),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for Visibility {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    Visibility {
                        kind: ref __binding_0,
                        span: ref __binding_1,
                        tokens: ref __binding_2 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for Visibility {
            fn decode(__decoder: &mut __D) -> Self {
                Visibility {
                    kind: ::rustc_serialize::Decodable::decode(__decoder),
                    span: ::rustc_serialize::Decodable::decode(__decoder),
                    tokens: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for Visibility {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field3_finish(f, "Visibility",
            "kind", &self.kind, "span", &self.span, "tokens", &&self.tokens)
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for Visibility
            where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    Visibility {
                        kind: ref __binding_0,
                        span: ref __binding_1,
                        tokens: ref __binding_2 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_2,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for Visibility where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    Visibility {
                        kind: ref mut __binding_0,
                        span: ref mut __binding_1,
                        tokens: ref mut __binding_2 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_2,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
3561pub struct Visibility {
3562    pub kind: VisibilityKind,
3563    pub span: Span,
3564    pub tokens: Option<LazyAttrTokenStream>,
3565}
3566
3567#[derive(#[automatically_derived]
impl ::core::clone::Clone for VisibilityKind {
    #[inline]
    fn clone(&self) -> VisibilityKind {
        match self {
            VisibilityKind::Public => VisibilityKind::Public,
            VisibilityKind::Restricted {
                path: __self_0, id: __self_1, shorthand: __self_2 } =>
                VisibilityKind::Restricted {
                    path: ::core::clone::Clone::clone(__self_0),
                    id: ::core::clone::Clone::clone(__self_1),
                    shorthand: ::core::clone::Clone::clone(__self_2),
                },
            VisibilityKind::Inherited => VisibilityKind::Inherited,
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for VisibilityKind {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        VisibilityKind::Public => { 0usize }
                        VisibilityKind::Restricted {
                            path: ref __binding_0,
                            id: ref __binding_1,
                            shorthand: ref __binding_2 } => {
                            1usize
                        }
                        VisibilityKind::Inherited => { 2usize }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    VisibilityKind::Public => {}
                    VisibilityKind::Restricted {
                        path: ref __binding_0,
                        id: ref __binding_1,
                        shorthand: ref __binding_2 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                    }
                    VisibilityKind::Inherited => {}
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for VisibilityKind {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => { VisibilityKind::Public }
                    1usize => {
                        VisibilityKind::Restricted {
                            path: ::rustc_serialize::Decodable::decode(__decoder),
                            id: ::rustc_serialize::Decodable::decode(__decoder),
                            shorthand: ::rustc_serialize::Decodable::decode(__decoder),
                        }
                    }
                    2usize => { VisibilityKind::Inherited }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `VisibilityKind`, expected 0..3, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for VisibilityKind {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            VisibilityKind::Public =>
                ::core::fmt::Formatter::write_str(f, "Public"),
            VisibilityKind::Restricted {
                path: __self_0, id: __self_1, shorthand: __self_2 } =>
                ::core::fmt::Formatter::debug_struct_field3_finish(f,
                    "Restricted", "path", __self_0, "id", __self_1, "shorthand",
                    &__self_2),
            VisibilityKind::Inherited =>
                ::core::fmt::Formatter::write_str(f, "Inherited"),
        }
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for
            VisibilityKind where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    VisibilityKind::Public => {}
                    VisibilityKind::Restricted {
                        path: ref __binding_0,
                        id: ref __binding_1,
                        shorthand: ref __binding_2 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_2,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    VisibilityKind::Inherited => {}
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for VisibilityKind where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    VisibilityKind::Public => {}
                    VisibilityKind::Restricted {
                        path: ref mut __binding_0,
                        id: ref mut __binding_1,
                        shorthand: ref mut __binding_2 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_2,
                                __visitor, ())
                        }
                    }
                    VisibilityKind::Inherited => {}
                }
            }
        }
    };Walkable)]
3568pub enum VisibilityKind {
3569    Public,
3570    Restricted { path: Box<Path>, id: NodeId, shorthand: bool },
3571    Inherited,
3572}
3573
3574impl VisibilityKind {
3575    pub fn is_pub(&self) -> bool {
3576        #[allow(non_exhaustive_omitted_patterns)] match self {
    VisibilityKind::Public => true,
    _ => false,
}matches!(self, VisibilityKind::Public)
3577    }
3578}
3579
3580#[derive(#[automatically_derived]
impl ::core::clone::Clone for ImplRestriction {
    #[inline]
    fn clone(&self) -> ImplRestriction {
        ImplRestriction {
            kind: ::core::clone::Clone::clone(&self.kind),
            span: ::core::clone::Clone::clone(&self.span),
            tokens: ::core::clone::Clone::clone(&self.tokens),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for ImplRestriction {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    ImplRestriction {
                        kind: ref __binding_0,
                        span: ref __binding_1,
                        tokens: ref __binding_2 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for ImplRestriction {
            fn decode(__decoder: &mut __D) -> Self {
                ImplRestriction {
                    kind: ::rustc_serialize::Decodable::decode(__decoder),
                    span: ::rustc_serialize::Decodable::decode(__decoder),
                    tokens: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for ImplRestriction {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field3_finish(f,
            "ImplRestriction", "kind", &self.kind, "span", &self.span,
            "tokens", &&self.tokens)
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for
            ImplRestriction where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    ImplRestriction {
                        kind: ref __binding_0,
                        span: ref __binding_1,
                        tokens: ref __binding_2 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_2,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for ImplRestriction where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    ImplRestriction {
                        kind: ref mut __binding_0,
                        span: ref mut __binding_1,
                        tokens: ref mut __binding_2 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_2,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
3581pub struct ImplRestriction {
3582    pub kind: RestrictionKind,
3583    pub span: Span,
3584    pub tokens: Option<LazyAttrTokenStream>,
3585}
3586
3587#[derive(#[automatically_derived]
impl ::core::clone::Clone for RestrictionKind {
    #[inline]
    fn clone(&self) -> RestrictionKind {
        match self {
            RestrictionKind::Unrestricted => RestrictionKind::Unrestricted,
            RestrictionKind::Restricted {
                path: __self_0, id: __self_1, shorthand: __self_2 } =>
                RestrictionKind::Restricted {
                    path: ::core::clone::Clone::clone(__self_0),
                    id: ::core::clone::Clone::clone(__self_1),
                    shorthand: ::core::clone::Clone::clone(__self_2),
                },
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for RestrictionKind {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        RestrictionKind::Unrestricted => { 0usize }
                        RestrictionKind::Restricted {
                            path: ref __binding_0,
                            id: ref __binding_1,
                            shorthand: ref __binding_2 } => {
                            1usize
                        }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    RestrictionKind::Unrestricted => {}
                    RestrictionKind::Restricted {
                        path: ref __binding_0,
                        id: ref __binding_1,
                        shorthand: ref __binding_2 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for RestrictionKind {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => { RestrictionKind::Unrestricted }
                    1usize => {
                        RestrictionKind::Restricted {
                            path: ::rustc_serialize::Decodable::decode(__decoder),
                            id: ::rustc_serialize::Decodable::decode(__decoder),
                            shorthand: ::rustc_serialize::Decodable::decode(__decoder),
                        }
                    }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `RestrictionKind`, expected 0..2, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for RestrictionKind {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            RestrictionKind::Unrestricted =>
                ::core::fmt::Formatter::write_str(f, "Unrestricted"),
            RestrictionKind::Restricted {
                path: __self_0, id: __self_1, shorthand: __self_2 } =>
                ::core::fmt::Formatter::debug_struct_field3_finish(f,
                    "Restricted", "path", __self_0, "id", __self_1, "shorthand",
                    &__self_2),
        }
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for
            RestrictionKind where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    RestrictionKind::Unrestricted => {}
                    RestrictionKind::Restricted {
                        path: ref __binding_0,
                        id: ref __binding_1,
                        shorthand: ref __binding_2 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_2,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for RestrictionKind where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    RestrictionKind::Unrestricted => {}
                    RestrictionKind::Restricted {
                        path: ref mut __binding_0,
                        id: ref mut __binding_1,
                        shorthand: ref mut __binding_2 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_2,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
3588pub enum RestrictionKind {
3589    Unrestricted,
3590    Restricted { path: Box<Path>, id: NodeId, shorthand: bool },
3591}
3592
3593/// Field definition in a struct, variant or union.
3594///
3595/// E.g., `bar: usize` as in `struct Foo { bar: usize }`.
3596#[derive(#[automatically_derived]
impl ::core::clone::Clone for FieldDef {
    #[inline]
    fn clone(&self) -> FieldDef {
        FieldDef {
            attrs: ::core::clone::Clone::clone(&self.attrs),
            id: ::core::clone::Clone::clone(&self.id),
            span: ::core::clone::Clone::clone(&self.span),
            vis: ::core::clone::Clone::clone(&self.vis),
            safety: ::core::clone::Clone::clone(&self.safety),
            ident: ::core::clone::Clone::clone(&self.ident),
            ty: ::core::clone::Clone::clone(&self.ty),
            default: ::core::clone::Clone::clone(&self.default),
            is_placeholder: ::core::clone::Clone::clone(&self.is_placeholder),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for FieldDef {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    FieldDef {
                        attrs: ref __binding_0,
                        id: ref __binding_1,
                        span: ref __binding_2,
                        vis: ref __binding_3,
                        safety: ref __binding_4,
                        ident: ref __binding_5,
                        ty: ref __binding_6,
                        default: ref __binding_7,
                        is_placeholder: ref __binding_8 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_3,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_4,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_5,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_6,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_7,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_8,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for FieldDef {
            fn decode(__decoder: &mut __D) -> Self {
                FieldDef {
                    attrs: ::rustc_serialize::Decodable::decode(__decoder),
                    id: ::rustc_serialize::Decodable::decode(__decoder),
                    span: ::rustc_serialize::Decodable::decode(__decoder),
                    vis: ::rustc_serialize::Decodable::decode(__decoder),
                    safety: ::rustc_serialize::Decodable::decode(__decoder),
                    ident: ::rustc_serialize::Decodable::decode(__decoder),
                    ty: ::rustc_serialize::Decodable::decode(__decoder),
                    default: ::rustc_serialize::Decodable::decode(__decoder),
                    is_placeholder: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for FieldDef {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["attrs", "id", "span", "vis", "safety", "ident", "ty",
                        "default", "is_placeholder"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.attrs, &self.id, &self.span, &self.vis, &self.safety,
                        &self.ident, &self.ty, &self.default,
                        &&self.is_placeholder];
        ::core::fmt::Formatter::debug_struct_fields_finish(f, "FieldDef",
            names, values)
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for FieldDef
            where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    FieldDef {
                        attrs: ref __binding_0,
                        id: ref __binding_1,
                        span: ref __binding_2,
                        vis: ref __binding_3,
                        safety: ref __binding_4,
                        ident: ref __binding_5,
                        ty: ref __binding_6,
                        default: ref __binding_7,
                        is_placeholder: ref __binding_8 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_2,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_3,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_4,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_5,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_6,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_7,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_8,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for FieldDef where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    FieldDef {
                        attrs: ref mut __binding_0,
                        id: ref mut __binding_1,
                        span: ref mut __binding_2,
                        vis: ref mut __binding_3,
                        safety: ref mut __binding_4,
                        ident: ref mut __binding_5,
                        ty: ref mut __binding_6,
                        default: ref mut __binding_7,
                        is_placeholder: ref mut __binding_8 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_2,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_3,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_4,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_5,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_6,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_7,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_8,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
3597pub struct FieldDef {
3598    pub attrs: AttrVec,
3599    pub id: NodeId,
3600    pub span: Span,
3601    pub vis: Visibility,
3602    pub safety: Safety,
3603    pub ident: Option<Ident>,
3604
3605    pub ty: Box<Ty>,
3606    pub default: Option<AnonConst>,
3607    pub is_placeholder: bool,
3608}
3609
3610/// Was parsing recovery performed?
3611#[derive(#[automatically_derived]
impl ::core::marker::Copy for Recovered { }Copy, #[automatically_derived]
impl ::core::clone::Clone for Recovered {
    #[inline]
    fn clone(&self) -> Recovered {
        let _: ::core::clone::AssertParamIsClone<ErrorGuaranteed>;
        *self
    }
}Clone, #[automatically_derived]
impl ::core::fmt::Debug for Recovered {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            Recovered::No => ::core::fmt::Formatter::write_str(f, "No"),
            Recovered::Yes(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Yes",
                    &__self_0),
        }
    }
}Debug, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for Recovered {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        Recovered::No => { 0usize }
                        Recovered::Yes(ref __binding_0) => { 1usize }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    Recovered::No => {}
                    Recovered::Yes(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for Recovered {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => { Recovered::No }
                    1usize => {
                        Recovered::Yes(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `Recovered`, expected 0..2, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, const _: () =
    {
        impl<__CTX> ::rustc_data_structures::stable_hasher::HashStable<__CTX>
            for Recovered where __CTX: ::rustc_span::HashStableContext {
            #[inline]
            fn hash_stable(&self, __hcx: &mut __CTX,
                __hasher:
                    &mut ::rustc_data_structures::stable_hasher::StableHasher) {
                ::std::mem::discriminant(self).hash_stable(__hcx, __hasher);
                match *self {
                    Recovered::No => {}
                    Recovered::Yes(ref __binding_0) => {
                        { __binding_0.hash_stable(__hcx, __hasher); }
                    }
                }
            }
        }
    };HashStable_Generic, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for Recovered
            where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    Recovered::No => {}
                    Recovered::Yes(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for Recovered where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    Recovered::No => {}
                    Recovered::Yes(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
3612pub enum Recovered {
3613    No,
3614    Yes(ErrorGuaranteed),
3615}
3616
3617/// Fields and constructor ids of enum variants and structs.
3618#[derive(#[automatically_derived]
impl ::core::clone::Clone for VariantData {
    #[inline]
    fn clone(&self) -> VariantData {
        match self {
            VariantData::Struct { fields: __self_0, recovered: __self_1 } =>
                VariantData::Struct {
                    fields: ::core::clone::Clone::clone(__self_0),
                    recovered: ::core::clone::Clone::clone(__self_1),
                },
            VariantData::Tuple(__self_0, __self_1) =>
                VariantData::Tuple(::core::clone::Clone::clone(__self_0),
                    ::core::clone::Clone::clone(__self_1)),
            VariantData::Unit(__self_0) =>
                VariantData::Unit(::core::clone::Clone::clone(__self_0)),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for VariantData {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        VariantData::Struct {
                            fields: ref __binding_0, recovered: ref __binding_1 } => {
                            0usize
                        }
                        VariantData::Tuple(ref __binding_0, ref __binding_1) => {
                            1usize
                        }
                        VariantData::Unit(ref __binding_0) => { 2usize }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    VariantData::Struct {
                        fields: ref __binding_0, recovered: ref __binding_1 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                    }
                    VariantData::Tuple(ref __binding_0, ref __binding_1) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                    }
                    VariantData::Unit(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for VariantData {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => {
                        VariantData::Struct {
                            fields: ::rustc_serialize::Decodable::decode(__decoder),
                            recovered: ::rustc_serialize::Decodable::decode(__decoder),
                        }
                    }
                    1usize => {
                        VariantData::Tuple(::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder))
                    }
                    2usize => {
                        VariantData::Unit(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `VariantData`, expected 0..3, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for VariantData {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            VariantData::Struct { fields: __self_0, recovered: __self_1 } =>
                ::core::fmt::Formatter::debug_struct_field2_finish(f,
                    "Struct", "fields", __self_0, "recovered", &__self_1),
            VariantData::Tuple(__self_0, __self_1) =>
                ::core::fmt::Formatter::debug_tuple_field2_finish(f, "Tuple",
                    __self_0, &__self_1),
            VariantData::Unit(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Unit",
                    &__self_0),
        }
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for VariantData
            where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    VariantData::Struct {
                        fields: ref __binding_0, recovered: ref __binding_1 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    VariantData::Tuple(ref __binding_0, ref __binding_1) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    VariantData::Unit(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for VariantData where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    VariantData::Struct {
                        fields: ref mut __binding_0, recovered: ref mut __binding_1
                        } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                    }
                    VariantData::Tuple(ref mut __binding_0, ref mut __binding_1)
                        => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                    }
                    VariantData::Unit(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
3619pub enum VariantData {
3620    /// Struct variant.
3621    ///
3622    /// E.g., `Bar { .. }` as in `enum Foo { Bar { .. } }`.
3623    Struct { fields: ThinVec<FieldDef>, recovered: Recovered },
3624    /// Tuple variant.
3625    ///
3626    /// E.g., `Bar(..)` as in `enum Foo { Bar(..) }`.
3627    Tuple(ThinVec<FieldDef>, NodeId),
3628    /// Unit variant.
3629    ///
3630    /// E.g., `Bar = ..` as in `enum Foo { Bar = .. }`.
3631    Unit(NodeId),
3632}
3633
3634impl VariantData {
3635    /// Return the fields of this variant.
3636    pub fn fields(&self) -> &[FieldDef] {
3637        match self {
3638            VariantData::Struct { fields, .. } | VariantData::Tuple(fields, _) => fields,
3639            _ => &[],
3640        }
3641    }
3642
3643    /// Return the `NodeId` of this variant's constructor, if it has one.
3644    pub fn ctor_node_id(&self) -> Option<NodeId> {
3645        match *self {
3646            VariantData::Struct { .. } => None,
3647            VariantData::Tuple(_, id) | VariantData::Unit(id) => Some(id),
3648        }
3649    }
3650}
3651
3652/// An item definition.
3653#[derive(#[automatically_derived]
impl<K: ::core::clone::Clone> ::core::clone::Clone for Item<K> {
    #[inline]
    fn clone(&self) -> Item<K> {
        Item {
            attrs: ::core::clone::Clone::clone(&self.attrs),
            id: ::core::clone::Clone::clone(&self.id),
            span: ::core::clone::Clone::clone(&self.span),
            vis: ::core::clone::Clone::clone(&self.vis),
            kind: ::core::clone::Clone::clone(&self.kind),
            tokens: ::core::clone::Clone::clone(&self.tokens),
        }
    }
}Clone, const _: () =
    {
        impl<K, __E: ::rustc_span::SpanEncoder>
            ::rustc_serialize::Encodable<__E> for Item<K> where
            K: ::rustc_serialize::Encodable<__E> {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    Item {
                        attrs: ref __binding_0,
                        id: ref __binding_1,
                        span: ref __binding_2,
                        vis: ref __binding_3,
                        kind: ref __binding_4,
                        tokens: ref __binding_5 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_3,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_4,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_5,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<K, __D: ::rustc_span::SpanDecoder>
            ::rustc_serialize::Decodable<__D> for Item<K> where
            K: ::rustc_serialize::Decodable<__D> {
            fn decode(__decoder: &mut __D) -> Self {
                Item {
                    attrs: ::rustc_serialize::Decodable::decode(__decoder),
                    id: ::rustc_serialize::Decodable::decode(__decoder),
                    span: ::rustc_serialize::Decodable::decode(__decoder),
                    vis: ::rustc_serialize::Decodable::decode(__decoder),
                    kind: ::rustc_serialize::Decodable::decode(__decoder),
                    tokens: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl<K: ::core::fmt::Debug> ::core::fmt::Debug for Item<K> {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["attrs", "id", "span", "vis", "kind", "tokens"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.attrs, &self.id, &self.span, &self.vis, &self.kind,
                        &&self.tokens];
        ::core::fmt::Formatter::debug_struct_fields_finish(f, "Item", names,
            values)
    }
}Debug)]
3654pub struct Item<K = ItemKind> {
3655    pub attrs: AttrVec,
3656    pub id: NodeId,
3657    pub span: Span,
3658    pub vis: Visibility,
3659
3660    pub kind: K,
3661
3662    /// Original tokens this item was parsed from. This isn't necessarily
3663    /// available for all items, although over time more and more items should
3664    /// have this be `Some`. Right now this is primarily used for procedural
3665    /// macros, notably custom attributes.
3666    ///
3667    /// Note that the tokens here do not include the outer attributes, but will
3668    /// include inner attributes.
3669    pub tokens: Option<LazyAttrTokenStream>,
3670}
3671
3672impl Item {
3673    /// Return the span that encompasses the attributes.
3674    pub fn span_with_attributes(&self) -> Span {
3675        self.attrs.iter().fold(self.span, |acc, attr| acc.to(attr.span))
3676    }
3677
3678    pub fn opt_generics(&self) -> Option<&Generics> {
3679        match &self.kind {
3680            ItemKind::ExternCrate(..)
3681            | ItemKind::ConstBlock(_)
3682            | ItemKind::Use(_)
3683            | ItemKind::Mod(..)
3684            | ItemKind::ForeignMod(_)
3685            | ItemKind::GlobalAsm(_)
3686            | ItemKind::MacCall(_)
3687            | ItemKind::Delegation(_)
3688            | ItemKind::DelegationMac(_)
3689            | ItemKind::MacroDef(..) => None,
3690            ItemKind::Static(_) => None,
3691            ItemKind::Const(i) => Some(&i.generics),
3692            ItemKind::Fn(i) => Some(&i.generics),
3693            ItemKind::TyAlias(i) => Some(&i.generics),
3694            ItemKind::TraitAlias(i) => Some(&i.generics),
3695
3696            ItemKind::Enum(_, generics, _)
3697            | ItemKind::Struct(_, generics, _)
3698            | ItemKind::Union(_, generics, _) => Some(&generics),
3699            ItemKind::Trait(i) => Some(&i.generics),
3700            ItemKind::Impl(i) => Some(&i.generics),
3701        }
3702    }
3703}
3704
3705/// `extern` qualifier on a function item or function type.
3706#[derive(#[automatically_derived]
impl ::core::clone::Clone for Extern {
    #[inline]
    fn clone(&self) -> Extern {
        let _: ::core::clone::AssertParamIsClone<Span>;
        let _: ::core::clone::AssertParamIsClone<StrLit>;
        *self
    }
}Clone, #[automatically_derived]
impl ::core::marker::Copy for Extern { }Copy, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for Extern {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        Extern::None => { 0usize }
                        Extern::Implicit(ref __binding_0) => { 1usize }
                        Extern::Explicit(ref __binding_0, ref __binding_1) => {
                            2usize
                        }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    Extern::None => {}
                    Extern::Implicit(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    Extern::Explicit(ref __binding_0, ref __binding_1) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for Extern {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => { Extern::None }
                    1usize => {
                        Extern::Implicit(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    2usize => {
                        Extern::Explicit(::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder))
                    }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `Extern`, expected 0..3, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for Extern {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            Extern::None => ::core::fmt::Formatter::write_str(f, "None"),
            Extern::Implicit(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "Implicit", &__self_0),
            Extern::Explicit(__self_0, __self_1) =>
                ::core::fmt::Formatter::debug_tuple_field2_finish(f,
                    "Explicit", __self_0, &__self_1),
        }
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for Extern where
            __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    Extern::None => {}
                    Extern::Implicit(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    Extern::Explicit(ref __binding_0, ref __binding_1) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for Extern where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    Extern::None => {}
                    Extern::Implicit(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                    Extern::Explicit(ref mut __binding_0, ref mut __binding_1)
                        => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
3707pub enum Extern {
3708    /// No explicit extern keyword was used.
3709    ///
3710    /// E.g. `fn foo() {}`.
3711    None,
3712    /// An explicit extern keyword was used, but with implicit ABI.
3713    ///
3714    /// E.g. `extern fn foo() {}`.
3715    ///
3716    /// This is just `extern "C"` (see `rustc_abi::ExternAbi::FALLBACK`).
3717    Implicit(Span),
3718    /// An explicit extern keyword was used with an explicit ABI.
3719    ///
3720    /// E.g. `extern "C" fn foo() {}`.
3721    Explicit(StrLit, Span),
3722}
3723
3724impl Extern {
3725    pub fn from_abi(abi: Option<StrLit>, span: Span) -> Extern {
3726        match abi {
3727            Some(name) => Extern::Explicit(name, span),
3728            None => Extern::Implicit(span),
3729        }
3730    }
3731
3732    pub fn span(self) -> Option<Span> {
3733        match self {
3734            Extern::None => None,
3735            Extern::Implicit(span) | Extern::Explicit(_, span) => Some(span),
3736        }
3737    }
3738}
3739
3740/// A function header.
3741///
3742/// All the information between the visibility and the name of the function is
3743/// included in this struct (e.g., `async unsafe fn` or `const extern "C" fn`).
3744#[derive(#[automatically_derived]
impl ::core::clone::Clone for FnHeader {
    #[inline]
    fn clone(&self) -> FnHeader {
        let _: ::core::clone::AssertParamIsClone<Const>;
        let _: ::core::clone::AssertParamIsClone<Option<CoroutineKind>>;
        let _: ::core::clone::AssertParamIsClone<Safety>;
        let _: ::core::clone::AssertParamIsClone<Extern>;
        *self
    }
}Clone, #[automatically_derived]
impl ::core::marker::Copy for FnHeader { }Copy, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for FnHeader {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    FnHeader {
                        constness: ref __binding_0,
                        coroutine_kind: ref __binding_1,
                        safety: ref __binding_2,
                        ext: ref __binding_3 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_3,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for FnHeader {
            fn decode(__decoder: &mut __D) -> Self {
                FnHeader {
                    constness: ::rustc_serialize::Decodable::decode(__decoder),
                    coroutine_kind: ::rustc_serialize::Decodable::decode(__decoder),
                    safety: ::rustc_serialize::Decodable::decode(__decoder),
                    ext: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for FnHeader {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field4_finish(f, "FnHeader",
            "constness", &self.constness, "coroutine_kind",
            &self.coroutine_kind, "safety", &self.safety, "ext", &&self.ext)
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for FnHeader
            where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    FnHeader {
                        constness: ref __binding_0,
                        coroutine_kind: ref __binding_1,
                        safety: ref __binding_2,
                        ext: ref __binding_3 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_2,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_3,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for FnHeader where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    FnHeader {
                        constness: ref mut __binding_0,
                        coroutine_kind: ref mut __binding_1,
                        safety: ref mut __binding_2,
                        ext: ref mut __binding_3 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_2,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_3,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
3745pub struct FnHeader {
3746    /// The `const` keyword, if any
3747    pub constness: Const,
3748    /// Whether this is `async`, `gen`, or nothing.
3749    pub coroutine_kind: Option<CoroutineKind>,
3750    /// Whether this is `unsafe`, or has a default safety.
3751    pub safety: Safety,
3752    /// The `extern` keyword and corresponding ABI string, if any.
3753    pub ext: Extern,
3754}
3755
3756impl FnHeader {
3757    /// Does this function header have any qualifiers or is it empty?
3758    pub fn has_qualifiers(&self) -> bool {
3759        let Self { safety, coroutine_kind, constness, ext } = self;
3760        #[allow(non_exhaustive_omitted_patterns)] match safety {
    Safety::Unsafe(_) => true,
    _ => false,
}matches!(safety, Safety::Unsafe(_))
3761            || coroutine_kind.is_some()
3762            || #[allow(non_exhaustive_omitted_patterns)] match constness {
    Const::Yes(_) => true,
    _ => false,
}matches!(constness, Const::Yes(_))
3763            || !#[allow(non_exhaustive_omitted_patterns)] match ext {
    Extern::None => true,
    _ => false,
}matches!(ext, Extern::None)
3764    }
3765}
3766
3767impl Default for FnHeader {
3768    fn default() -> FnHeader {
3769        FnHeader {
3770            safety: Safety::Default,
3771            coroutine_kind: None,
3772            constness: Const::No,
3773            ext: Extern::None,
3774        }
3775    }
3776}
3777
3778#[derive(#[automatically_derived]
impl ::core::clone::Clone for TraitAlias {
    #[inline]
    fn clone(&self) -> TraitAlias {
        TraitAlias {
            constness: ::core::clone::Clone::clone(&self.constness),
            ident: ::core::clone::Clone::clone(&self.ident),
            generics: ::core::clone::Clone::clone(&self.generics),
            bounds: ::core::clone::Clone::clone(&self.bounds),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for TraitAlias {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    TraitAlias {
                        constness: ref __binding_0,
                        ident: ref __binding_1,
                        generics: ref __binding_2,
                        bounds: ref __binding_3 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_3,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for TraitAlias {
            fn decode(__decoder: &mut __D) -> Self {
                TraitAlias {
                    constness: ::rustc_serialize::Decodable::decode(__decoder),
                    ident: ::rustc_serialize::Decodable::decode(__decoder),
                    generics: ::rustc_serialize::Decodable::decode(__decoder),
                    bounds: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for TraitAlias {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field4_finish(f, "TraitAlias",
            "constness", &self.constness, "ident", &self.ident, "generics",
            &self.generics, "bounds", &&self.bounds)
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for TraitAlias
            where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    TraitAlias {
                        constness: ref __binding_0,
                        ident: ref __binding_1,
                        generics: ref __binding_2,
                        bounds: ref __binding_3 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_2,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_3,
                                        __visitor, (BoundKind::Bound))) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for TraitAlias where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    TraitAlias {
                        constness: ref mut __binding_0,
                        ident: ref mut __binding_1,
                        generics: ref mut __binding_2,
                        bounds: ref mut __binding_3 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_2,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_3,
                                __visitor, (BoundKind::Bound))
                        }
                    }
                }
            }
        }
    };Walkable)]
3779pub struct TraitAlias {
3780    pub constness: Const,
3781    pub ident: Ident,
3782    pub generics: Generics,
3783    #[visitable(extra = BoundKind::Bound)]
3784    pub bounds: GenericBounds,
3785}
3786
3787#[derive(#[automatically_derived]
impl ::core::clone::Clone for Trait {
    #[inline]
    fn clone(&self) -> Trait {
        Trait {
            constness: ::core::clone::Clone::clone(&self.constness),
            safety: ::core::clone::Clone::clone(&self.safety),
            is_auto: ::core::clone::Clone::clone(&self.is_auto),
            impl_restriction: ::core::clone::Clone::clone(&self.impl_restriction),
            ident: ::core::clone::Clone::clone(&self.ident),
            generics: ::core::clone::Clone::clone(&self.generics),
            bounds: ::core::clone::Clone::clone(&self.bounds),
            items: ::core::clone::Clone::clone(&self.items),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for Trait {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    Trait {
                        constness: ref __binding_0,
                        safety: ref __binding_1,
                        is_auto: ref __binding_2,
                        impl_restriction: ref __binding_3,
                        ident: ref __binding_4,
                        generics: ref __binding_5,
                        bounds: ref __binding_6,
                        items: ref __binding_7 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_3,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_4,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_5,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_6,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_7,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for Trait {
            fn decode(__decoder: &mut __D) -> Self {
                Trait {
                    constness: ::rustc_serialize::Decodable::decode(__decoder),
                    safety: ::rustc_serialize::Decodable::decode(__decoder),
                    is_auto: ::rustc_serialize::Decodable::decode(__decoder),
                    impl_restriction: ::rustc_serialize::Decodable::decode(__decoder),
                    ident: ::rustc_serialize::Decodable::decode(__decoder),
                    generics: ::rustc_serialize::Decodable::decode(__decoder),
                    bounds: ::rustc_serialize::Decodable::decode(__decoder),
                    items: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for Trait {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["constness", "safety", "is_auto", "impl_restriction", "ident",
                        "generics", "bounds", "items"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.constness, &self.safety, &self.is_auto,
                        &self.impl_restriction, &self.ident, &self.generics,
                        &self.bounds, &&self.items];
        ::core::fmt::Formatter::debug_struct_fields_finish(f, "Trait", names,
            values)
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for Trait where
            __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    Trait {
                        constness: ref __binding_0,
                        safety: ref __binding_1,
                        is_auto: ref __binding_2,
                        impl_restriction: ref __binding_3,
                        ident: ref __binding_4,
                        generics: ref __binding_5,
                        bounds: ref __binding_6,
                        items: ref __binding_7 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_2,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_3,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_4,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_5,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_6,
                                        __visitor, (BoundKind::SuperTraits))) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_7,
                                        __visitor, (AssocCtxt::Trait))) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for Trait where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    Trait {
                        constness: ref mut __binding_0,
                        safety: ref mut __binding_1,
                        is_auto: ref mut __binding_2,
                        impl_restriction: ref mut __binding_3,
                        ident: ref mut __binding_4,
                        generics: ref mut __binding_5,
                        bounds: ref mut __binding_6,
                        items: ref mut __binding_7 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_2,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_3,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_4,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_5,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_6,
                                __visitor, (BoundKind::SuperTraits))
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_7,
                                __visitor, (AssocCtxt::Trait))
                        }
                    }
                }
            }
        }
    };Walkable)]
3788pub struct Trait {
3789    pub constness: Const,
3790    pub safety: Safety,
3791    pub is_auto: IsAuto,
3792    pub impl_restriction: ImplRestriction,
3793    pub ident: Ident,
3794    pub generics: Generics,
3795    #[visitable(extra = BoundKind::SuperTraits)]
3796    pub bounds: GenericBounds,
3797    #[visitable(extra = AssocCtxt::Trait)]
3798    pub items: ThinVec<Box<AssocItem>>,
3799}
3800
3801#[derive(#[automatically_derived]
impl ::core::clone::Clone for TyAlias {
    #[inline]
    fn clone(&self) -> TyAlias {
        TyAlias {
            defaultness: ::core::clone::Clone::clone(&self.defaultness),
            ident: ::core::clone::Clone::clone(&self.ident),
            generics: ::core::clone::Clone::clone(&self.generics),
            after_where_clause: ::core::clone::Clone::clone(&self.after_where_clause),
            bounds: ::core::clone::Clone::clone(&self.bounds),
            ty: ::core::clone::Clone::clone(&self.ty),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for TyAlias {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    TyAlias {
                        defaultness: ref __binding_0,
                        ident: ref __binding_1,
                        generics: ref __binding_2,
                        after_where_clause: ref __binding_3,
                        bounds: ref __binding_4,
                        ty: ref __binding_5 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_3,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_4,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_5,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for TyAlias {
            fn decode(__decoder: &mut __D) -> Self {
                TyAlias {
                    defaultness: ::rustc_serialize::Decodable::decode(__decoder),
                    ident: ::rustc_serialize::Decodable::decode(__decoder),
                    generics: ::rustc_serialize::Decodable::decode(__decoder),
                    after_where_clause: ::rustc_serialize::Decodable::decode(__decoder),
                    bounds: ::rustc_serialize::Decodable::decode(__decoder),
                    ty: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for TyAlias {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["defaultness", "ident", "generics", "after_where_clause",
                        "bounds", "ty"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.defaultness, &self.ident, &self.generics,
                        &self.after_where_clause, &self.bounds, &&self.ty];
        ::core::fmt::Formatter::debug_struct_fields_finish(f, "TyAlias",
            names, values)
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for TyAlias
            where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    TyAlias {
                        defaultness: ref __binding_0,
                        ident: ref __binding_1,
                        generics: ref __binding_2,
                        after_where_clause: ref __binding_3,
                        bounds: ref __binding_4,
                        ty: ref __binding_5 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_2,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_3,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_4,
                                        __visitor, (BoundKind::Bound))) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_5,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for TyAlias where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    TyAlias {
                        defaultness: ref mut __binding_0,
                        ident: ref mut __binding_1,
                        generics: ref mut __binding_2,
                        after_where_clause: ref mut __binding_3,
                        bounds: ref mut __binding_4,
                        ty: ref mut __binding_5 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_2,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_3,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_4,
                                __visitor, (BoundKind::Bound))
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_5,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
3802pub struct TyAlias {
3803    pub defaultness: Defaultness,
3804    pub ident: Ident,
3805    pub generics: Generics,
3806    /// There are two locations for where clause on type aliases. This represents the second
3807    /// where clause, before the semicolon. The first where clause is stored inside `generics`.
3808    ///
3809    /// Take this example:
3810    /// ```ignore (only-for-syntax-highlight)
3811    /// trait Foo {
3812    ///   type Assoc<'a, 'b> where Self: 'a, Self: 'b;
3813    /// }
3814    /// impl Foo for () {
3815    ///   type Assoc<'a, 'b> where Self: 'a = () where Self: 'b;
3816    ///   //                 ^^^^^^^^^^^^^^ before where clause
3817    ///   //                                     ^^^^^^^^^^^^^^ after where clause
3818    /// }
3819    /// ```
3820    pub after_where_clause: WhereClause,
3821    #[visitable(extra = BoundKind::Bound)]
3822    pub bounds: GenericBounds,
3823    pub ty: Option<Box<Ty>>,
3824}
3825
3826#[derive(#[automatically_derived]
impl ::core::clone::Clone for Impl {
    #[inline]
    fn clone(&self) -> Impl {
        Impl {
            generics: ::core::clone::Clone::clone(&self.generics),
            constness: ::core::clone::Clone::clone(&self.constness),
            of_trait: ::core::clone::Clone::clone(&self.of_trait),
            self_ty: ::core::clone::Clone::clone(&self.self_ty),
            items: ::core::clone::Clone::clone(&self.items),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for Impl {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    Impl {
                        generics: ref __binding_0,
                        constness: ref __binding_1,
                        of_trait: ref __binding_2,
                        self_ty: ref __binding_3,
                        items: ref __binding_4 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_3,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_4,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for Impl {
            fn decode(__decoder: &mut __D) -> Self {
                Impl {
                    generics: ::rustc_serialize::Decodable::decode(__decoder),
                    constness: ::rustc_serialize::Decodable::decode(__decoder),
                    of_trait: ::rustc_serialize::Decodable::decode(__decoder),
                    self_ty: ::rustc_serialize::Decodable::decode(__decoder),
                    items: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for Impl {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field5_finish(f, "Impl",
            "generics", &self.generics, "constness", &self.constness,
            "of_trait", &self.of_trait, "self_ty", &self.self_ty, "items",
            &&self.items)
    }
}Debug)]
3827pub struct Impl {
3828    pub generics: Generics,
3829    pub constness: Const,
3830    pub of_trait: Option<Box<TraitImplHeader>>,
3831    pub self_ty: Box<Ty>,
3832    pub items: ThinVec<Box<AssocItem>>,
3833}
3834
3835#[derive(#[automatically_derived]
impl ::core::clone::Clone for TraitImplHeader {
    #[inline]
    fn clone(&self) -> TraitImplHeader {
        TraitImplHeader {
            defaultness: ::core::clone::Clone::clone(&self.defaultness),
            safety: ::core::clone::Clone::clone(&self.safety),
            polarity: ::core::clone::Clone::clone(&self.polarity),
            trait_ref: ::core::clone::Clone::clone(&self.trait_ref),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for TraitImplHeader {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    TraitImplHeader {
                        defaultness: ref __binding_0,
                        safety: ref __binding_1,
                        polarity: ref __binding_2,
                        trait_ref: ref __binding_3 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_3,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for TraitImplHeader {
            fn decode(__decoder: &mut __D) -> Self {
                TraitImplHeader {
                    defaultness: ::rustc_serialize::Decodable::decode(__decoder),
                    safety: ::rustc_serialize::Decodable::decode(__decoder),
                    polarity: ::rustc_serialize::Decodable::decode(__decoder),
                    trait_ref: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for TraitImplHeader {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field4_finish(f,
            "TraitImplHeader", "defaultness", &self.defaultness, "safety",
            &self.safety, "polarity", &self.polarity, "trait_ref",
            &&self.trait_ref)
    }
}Debug)]
3836pub struct TraitImplHeader {
3837    pub defaultness: Defaultness,
3838    pub safety: Safety,
3839    pub polarity: ImplPolarity,
3840    pub trait_ref: TraitRef,
3841}
3842
3843#[derive(#[automatically_derived]
impl ::core::clone::Clone for FnContract {
    #[inline]
    fn clone(&self) -> FnContract {
        FnContract {
            declarations: ::core::clone::Clone::clone(&self.declarations),
            requires: ::core::clone::Clone::clone(&self.requires),
            ensures: ::core::clone::Clone::clone(&self.ensures),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for FnContract {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    FnContract {
                        declarations: ref __binding_0,
                        requires: ref __binding_1,
                        ensures: ref __binding_2 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for FnContract {
            fn decode(__decoder: &mut __D) -> Self {
                FnContract {
                    declarations: ::rustc_serialize::Decodable::decode(__decoder),
                    requires: ::rustc_serialize::Decodable::decode(__decoder),
                    ensures: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for FnContract {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field3_finish(f, "FnContract",
            "declarations", &self.declarations, "requires", &self.requires,
            "ensures", &&self.ensures)
    }
}Debug, #[automatically_derived]
impl ::core::default::Default for FnContract {
    #[inline]
    fn default() -> FnContract {
        FnContract {
            declarations: ::core::default::Default::default(),
            requires: ::core::default::Default::default(),
            ensures: ::core::default::Default::default(),
        }
    }
}Default, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for FnContract
            where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    FnContract {
                        declarations: ref __binding_0,
                        requires: ref __binding_1,
                        ensures: ref __binding_2 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_2,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for FnContract where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    FnContract {
                        declarations: ref mut __binding_0,
                        requires: ref mut __binding_1,
                        ensures: ref mut __binding_2 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_2,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
3844pub struct FnContract {
3845    /// Declarations of variables accessible both in the `requires` and
3846    /// `ensures` clauses.
3847    pub declarations: ThinVec<Stmt>,
3848    pub requires: Option<Box<Expr>>,
3849    pub ensures: Option<Box<Expr>>,
3850}
3851
3852#[derive(#[automatically_derived]
impl ::core::clone::Clone for Fn {
    #[inline]
    fn clone(&self) -> Fn {
        Fn {
            defaultness: ::core::clone::Clone::clone(&self.defaultness),
            ident: ::core::clone::Clone::clone(&self.ident),
            generics: ::core::clone::Clone::clone(&self.generics),
            sig: ::core::clone::Clone::clone(&self.sig),
            contract: ::core::clone::Clone::clone(&self.contract),
            define_opaque: ::core::clone::Clone::clone(&self.define_opaque),
            body: ::core::clone::Clone::clone(&self.body),
            eii_impls: ::core::clone::Clone::clone(&self.eii_impls),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for Fn {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    Fn {
                        defaultness: ref __binding_0,
                        ident: ref __binding_1,
                        generics: ref __binding_2,
                        sig: ref __binding_3,
                        contract: ref __binding_4,
                        define_opaque: ref __binding_5,
                        body: ref __binding_6,
                        eii_impls: ref __binding_7 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_3,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_4,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_5,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_6,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_7,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for Fn {
            fn decode(__decoder: &mut __D) -> Self {
                Fn {
                    defaultness: ::rustc_serialize::Decodable::decode(__decoder),
                    ident: ::rustc_serialize::Decodable::decode(__decoder),
                    generics: ::rustc_serialize::Decodable::decode(__decoder),
                    sig: ::rustc_serialize::Decodable::decode(__decoder),
                    contract: ::rustc_serialize::Decodable::decode(__decoder),
                    define_opaque: ::rustc_serialize::Decodable::decode(__decoder),
                    body: ::rustc_serialize::Decodable::decode(__decoder),
                    eii_impls: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for Fn {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["defaultness", "ident", "generics", "sig", "contract",
                        "define_opaque", "body", "eii_impls"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.defaultness, &self.ident, &self.generics, &self.sig,
                        &self.contract, &self.define_opaque, &self.body,
                        &&self.eii_impls];
        ::core::fmt::Formatter::debug_struct_fields_finish(f, "Fn", names,
            values)
    }
}Debug)]
3853pub struct Fn {
3854    pub defaultness: Defaultness,
3855    pub ident: Ident,
3856    pub generics: Generics,
3857    pub sig: FnSig,
3858    pub contract: Option<Box<FnContract>>,
3859    pub define_opaque: Option<ThinVec<(NodeId, Path)>>,
3860    pub body: Option<Box<Block>>,
3861
3862    /// This function is an implementation of an externally implementable item (EII).
3863    /// This means, there was an EII declared somewhere and this function is the
3864    /// implementation that should be run when the declaration is called.
3865    pub eii_impls: ThinVec<EiiImpl>,
3866}
3867
3868#[derive(#[automatically_derived]
impl ::core::clone::Clone for EiiImpl {
    #[inline]
    fn clone(&self) -> EiiImpl {
        EiiImpl {
            node_id: ::core::clone::Clone::clone(&self.node_id),
            eii_macro_path: ::core::clone::Clone::clone(&self.eii_macro_path),
            known_eii_macro_resolution: ::core::clone::Clone::clone(&self.known_eii_macro_resolution),
            impl_safety: ::core::clone::Clone::clone(&self.impl_safety),
            span: ::core::clone::Clone::clone(&self.span),
            inner_span: ::core::clone::Clone::clone(&self.inner_span),
            is_default: ::core::clone::Clone::clone(&self.is_default),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for EiiImpl {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    EiiImpl {
                        node_id: ref __binding_0,
                        eii_macro_path: ref __binding_1,
                        known_eii_macro_resolution: ref __binding_2,
                        impl_safety: ref __binding_3,
                        span: ref __binding_4,
                        inner_span: ref __binding_5,
                        is_default: ref __binding_6 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_3,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_4,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_5,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_6,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for EiiImpl {
            fn decode(__decoder: &mut __D) -> Self {
                EiiImpl {
                    node_id: ::rustc_serialize::Decodable::decode(__decoder),
                    eii_macro_path: ::rustc_serialize::Decodable::decode(__decoder),
                    known_eii_macro_resolution: ::rustc_serialize::Decodable::decode(__decoder),
                    impl_safety: ::rustc_serialize::Decodable::decode(__decoder),
                    span: ::rustc_serialize::Decodable::decode(__decoder),
                    inner_span: ::rustc_serialize::Decodable::decode(__decoder),
                    is_default: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for EiiImpl {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["node_id", "eii_macro_path", "known_eii_macro_resolution",
                        "impl_safety", "span", "inner_span", "is_default"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.node_id, &self.eii_macro_path,
                        &self.known_eii_macro_resolution, &self.impl_safety,
                        &self.span, &self.inner_span, &&self.is_default];
        ::core::fmt::Formatter::debug_struct_fields_finish(f, "EiiImpl",
            names, values)
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for EiiImpl
            where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    EiiImpl {
                        node_id: ref __binding_0,
                        eii_macro_path: ref __binding_1,
                        known_eii_macro_resolution: ref __binding_2,
                        impl_safety: ref __binding_3,
                        span: ref __binding_4,
                        inner_span: ref __binding_5,
                        is_default: ref __binding_6 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_2,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_3,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_4,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_5,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_6,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for EiiImpl where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    EiiImpl {
                        node_id: ref mut __binding_0,
                        eii_macro_path: ref mut __binding_1,
                        known_eii_macro_resolution: ref mut __binding_2,
                        impl_safety: ref mut __binding_3,
                        span: ref mut __binding_4,
                        inner_span: ref mut __binding_5,
                        is_default: ref mut __binding_6 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_2,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_3,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_4,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_5,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_6,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
3869pub struct EiiImpl {
3870    pub node_id: NodeId,
3871    pub eii_macro_path: Path,
3872    /// This field is an implementation detail that prevents a lot of bugs.
3873    /// See <https://github.com/rust-lang/rust/issues/149981> for an example.
3874    ///
3875    /// The problem is, that if we generate a declaration *together* with its default,
3876    /// we generate both a declaration and an implementation. The generated implementation
3877    /// uses the same mechanism to register itself as a user-defined implementation would,
3878    /// despite being invisible to users. What does happen is a name resolution step.
3879    /// The invisible default implementation has to find the declaration.
3880    /// Both are generated at the same time, so we can skip that name resolution step.
3881    ///
3882    /// This field is that shortcut: we prefill the extern target to skip a name resolution step,
3883    /// making sure it never fails. It'd be awful UX if we fail name resolution in code invisible to the user.
3884    pub known_eii_macro_resolution: Option<EiiDecl>,
3885    pub impl_safety: Safety,
3886    pub span: Span,
3887    pub inner_span: Span,
3888    pub is_default: bool,
3889}
3890
3891#[derive(#[automatically_derived]
impl ::core::clone::Clone for Delegation {
    #[inline]
    fn clone(&self) -> Delegation {
        Delegation {
            id: ::core::clone::Clone::clone(&self.id),
            qself: ::core::clone::Clone::clone(&self.qself),
            path: ::core::clone::Clone::clone(&self.path),
            ident: ::core::clone::Clone::clone(&self.ident),
            rename: ::core::clone::Clone::clone(&self.rename),
            body: ::core::clone::Clone::clone(&self.body),
            from_glob: ::core::clone::Clone::clone(&self.from_glob),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for Delegation {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    Delegation {
                        id: ref __binding_0,
                        qself: ref __binding_1,
                        path: ref __binding_2,
                        ident: ref __binding_3,
                        rename: ref __binding_4,
                        body: ref __binding_5,
                        from_glob: ref __binding_6 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_3,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_4,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_5,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_6,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for Delegation {
            fn decode(__decoder: &mut __D) -> Self {
                Delegation {
                    id: ::rustc_serialize::Decodable::decode(__decoder),
                    qself: ::rustc_serialize::Decodable::decode(__decoder),
                    path: ::rustc_serialize::Decodable::decode(__decoder),
                    ident: ::rustc_serialize::Decodable::decode(__decoder),
                    rename: ::rustc_serialize::Decodable::decode(__decoder),
                    body: ::rustc_serialize::Decodable::decode(__decoder),
                    from_glob: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for Delegation {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["id", "qself", "path", "ident", "rename", "body", "from_glob"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.id, &self.qself, &self.path, &self.ident, &self.rename,
                        &self.body, &&self.from_glob];
        ::core::fmt::Formatter::debug_struct_fields_finish(f, "Delegation",
            names, values)
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for Delegation
            where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    Delegation {
                        id: ref __binding_0,
                        qself: ref __binding_1,
                        path: ref __binding_2,
                        ident: ref __binding_3,
                        rename: ref __binding_4,
                        body: ref __binding_5,
                        from_glob: ref __binding_6 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_2,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_3,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_4,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_5,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_6,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for Delegation where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    Delegation {
                        id: ref mut __binding_0,
                        qself: ref mut __binding_1,
                        path: ref mut __binding_2,
                        ident: ref mut __binding_3,
                        rename: ref mut __binding_4,
                        body: ref mut __binding_5,
                        from_glob: ref mut __binding_6 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_2,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_3,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_4,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_5,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_6,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
3892pub struct Delegation {
3893    /// Path resolution id.
3894    pub id: NodeId,
3895    pub qself: Option<Box<QSelf>>,
3896    pub path: Path,
3897    pub ident: Ident,
3898    pub rename: Option<Ident>,
3899    pub body: Option<Box<Block>>,
3900    /// The item was expanded from a glob delegation item.
3901    pub from_glob: bool,
3902}
3903
3904#[derive(#[automatically_derived]
impl ::core::clone::Clone for DelegationSuffixes {
    #[inline]
    fn clone(&self) -> DelegationSuffixes {
        match self {
            DelegationSuffixes::List(__self_0) =>
                DelegationSuffixes::List(::core::clone::Clone::clone(__self_0)),
            DelegationSuffixes::Glob(__self_0) =>
                DelegationSuffixes::Glob(::core::clone::Clone::clone(__self_0)),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for DelegationSuffixes {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        DelegationSuffixes::List(ref __binding_0) => { 0usize }
                        DelegationSuffixes::Glob(ref __binding_0) => { 1usize }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    DelegationSuffixes::List(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    DelegationSuffixes::Glob(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for DelegationSuffixes {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => {
                        DelegationSuffixes::List(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    1usize => {
                        DelegationSuffixes::Glob(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `DelegationSuffixes`, expected 0..2, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for DelegationSuffixes {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            DelegationSuffixes::List(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "List",
                    &__self_0),
            DelegationSuffixes::Glob(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Glob",
                    &__self_0),
        }
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for
            DelegationSuffixes where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    DelegationSuffixes::List(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    DelegationSuffixes::Glob(ref __binding_0) => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for DelegationSuffixes
            where __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    DelegationSuffixes::List(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                    DelegationSuffixes::Glob(ref mut __binding_0) => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
3905pub enum DelegationSuffixes {
3906    List(ThinVec<(Ident, Option<Ident>)>),
3907    Glob(Span),
3908}
3909
3910#[derive(#[automatically_derived]
impl ::core::clone::Clone for DelegationMac {
    #[inline]
    fn clone(&self) -> DelegationMac {
        DelegationMac {
            qself: ::core::clone::Clone::clone(&self.qself),
            prefix: ::core::clone::Clone::clone(&self.prefix),
            suffixes: ::core::clone::Clone::clone(&self.suffixes),
            body: ::core::clone::Clone::clone(&self.body),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for DelegationMac {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    DelegationMac {
                        qself: ref __binding_0,
                        prefix: ref __binding_1,
                        suffixes: ref __binding_2,
                        body: ref __binding_3 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_3,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for DelegationMac {
            fn decode(__decoder: &mut __D) -> Self {
                DelegationMac {
                    qself: ::rustc_serialize::Decodable::decode(__decoder),
                    prefix: ::rustc_serialize::Decodable::decode(__decoder),
                    suffixes: ::rustc_serialize::Decodable::decode(__decoder),
                    body: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for DelegationMac {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field4_finish(f, "DelegationMac",
            "qself", &self.qself, "prefix", &self.prefix, "suffixes",
            &self.suffixes, "body", &&self.body)
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for
            DelegationMac where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    DelegationMac {
                        qself: ref __binding_0,
                        prefix: ref __binding_1,
                        suffixes: ref __binding_2,
                        body: ref __binding_3 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_2,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_3,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for DelegationMac where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    DelegationMac {
                        qself: ref mut __binding_0,
                        prefix: ref mut __binding_1,
                        suffixes: ref mut __binding_2,
                        body: ref mut __binding_3 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_2,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_3,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
3911pub struct DelegationMac {
3912    pub qself: Option<Box<QSelf>>,
3913    pub prefix: Path,
3914    pub suffixes: DelegationSuffixes,
3915    pub body: Option<Box<Block>>,
3916}
3917
3918#[derive(#[automatically_derived]
impl ::core::clone::Clone for StaticItem {
    #[inline]
    fn clone(&self) -> StaticItem {
        StaticItem {
            ident: ::core::clone::Clone::clone(&self.ident),
            ty: ::core::clone::Clone::clone(&self.ty),
            safety: ::core::clone::Clone::clone(&self.safety),
            mutability: ::core::clone::Clone::clone(&self.mutability),
            expr: ::core::clone::Clone::clone(&self.expr),
            define_opaque: ::core::clone::Clone::clone(&self.define_opaque),
            eii_impls: ::core::clone::Clone::clone(&self.eii_impls),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for StaticItem {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    StaticItem {
                        ident: ref __binding_0,
                        ty: ref __binding_1,
                        safety: ref __binding_2,
                        mutability: ref __binding_3,
                        expr: ref __binding_4,
                        define_opaque: ref __binding_5,
                        eii_impls: ref __binding_6 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_3,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_4,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_5,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_6,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for StaticItem {
            fn decode(__decoder: &mut __D) -> Self {
                StaticItem {
                    ident: ::rustc_serialize::Decodable::decode(__decoder),
                    ty: ::rustc_serialize::Decodable::decode(__decoder),
                    safety: ::rustc_serialize::Decodable::decode(__decoder),
                    mutability: ::rustc_serialize::Decodable::decode(__decoder),
                    expr: ::rustc_serialize::Decodable::decode(__decoder),
                    define_opaque: ::rustc_serialize::Decodable::decode(__decoder),
                    eii_impls: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for StaticItem {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["ident", "ty", "safety", "mutability", "expr", "define_opaque",
                        "eii_impls"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.ident, &self.ty, &self.safety, &self.mutability,
                        &self.expr, &self.define_opaque, &&self.eii_impls];
        ::core::fmt::Formatter::debug_struct_fields_finish(f, "StaticItem",
            names, values)
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for StaticItem
            where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    StaticItem {
                        ident: ref __binding_0,
                        ty: ref __binding_1,
                        safety: ref __binding_2,
                        mutability: ref __binding_3,
                        expr: ref __binding_4,
                        define_opaque: ref __binding_5,
                        eii_impls: ref __binding_6 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_2,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_3,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_4,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_5,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_6,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for StaticItem where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    StaticItem {
                        ident: ref mut __binding_0,
                        ty: ref mut __binding_1,
                        safety: ref mut __binding_2,
                        mutability: ref mut __binding_3,
                        expr: ref mut __binding_4,
                        define_opaque: ref mut __binding_5,
                        eii_impls: ref mut __binding_6 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_2,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_3,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_4,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_5,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_6,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
3919pub struct StaticItem {
3920    pub ident: Ident,
3921    pub ty: Box<Ty>,
3922    pub safety: Safety,
3923    pub mutability: Mutability,
3924    pub expr: Option<Box<Expr>>,
3925    pub define_opaque: Option<ThinVec<(NodeId, Path)>>,
3926
3927    /// This static is an implementation of an externally implementable item (EII).
3928    /// This means, there was an EII declared somewhere and this static is the
3929    /// implementation that should be used for the declaration.
3930    ///
3931    /// For statics, there may be at most one `EiiImpl`, but this is a `ThinVec` to make usages of this field nicer.
3932    pub eii_impls: ThinVec<EiiImpl>,
3933}
3934
3935#[derive(#[automatically_derived]
impl ::core::clone::Clone for ConstItem {
    #[inline]
    fn clone(&self) -> ConstItem {
        ConstItem {
            defaultness: ::core::clone::Clone::clone(&self.defaultness),
            ident: ::core::clone::Clone::clone(&self.ident),
            generics: ::core::clone::Clone::clone(&self.generics),
            ty: ::core::clone::Clone::clone(&self.ty),
            rhs_kind: ::core::clone::Clone::clone(&self.rhs_kind),
            define_opaque: ::core::clone::Clone::clone(&self.define_opaque),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for ConstItem {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    ConstItem {
                        defaultness: ref __binding_0,
                        ident: ref __binding_1,
                        generics: ref __binding_2,
                        ty: ref __binding_3,
                        rhs_kind: ref __binding_4,
                        define_opaque: ref __binding_5 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_3,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_4,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_5,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for ConstItem {
            fn decode(__decoder: &mut __D) -> Self {
                ConstItem {
                    defaultness: ::rustc_serialize::Decodable::decode(__decoder),
                    ident: ::rustc_serialize::Decodable::decode(__decoder),
                    generics: ::rustc_serialize::Decodable::decode(__decoder),
                    ty: ::rustc_serialize::Decodable::decode(__decoder),
                    rhs_kind: ::rustc_serialize::Decodable::decode(__decoder),
                    define_opaque: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for ConstItem {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["defaultness", "ident", "generics", "ty", "rhs_kind",
                        "define_opaque"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.defaultness, &self.ident, &self.generics, &self.ty,
                        &self.rhs_kind, &&self.define_opaque];
        ::core::fmt::Formatter::debug_struct_fields_finish(f, "ConstItem",
            names, values)
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for ConstItem
            where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    ConstItem {
                        defaultness: ref __binding_0,
                        ident: ref __binding_1,
                        generics: ref __binding_2,
                        ty: ref __binding_3,
                        rhs_kind: ref __binding_4,
                        define_opaque: ref __binding_5 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_2,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_3,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_4,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_5,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for ConstItem where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    ConstItem {
                        defaultness: ref mut __binding_0,
                        ident: ref mut __binding_1,
                        generics: ref mut __binding_2,
                        ty: ref mut __binding_3,
                        rhs_kind: ref mut __binding_4,
                        define_opaque: ref mut __binding_5 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_2,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_3,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_4,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_5,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
3936pub struct ConstItem {
3937    pub defaultness: Defaultness,
3938    pub ident: Ident,
3939    pub generics: Generics,
3940    pub ty: Box<Ty>,
3941    pub rhs_kind: ConstItemRhsKind,
3942    pub define_opaque: Option<ThinVec<(NodeId, Path)>>,
3943}
3944
3945#[derive(#[automatically_derived]
impl ::core::clone::Clone for ConstItemRhsKind {
    #[inline]
    fn clone(&self) -> ConstItemRhsKind {
        match self {
            ConstItemRhsKind::Body { rhs: __self_0 } =>
                ConstItemRhsKind::Body {
                    rhs: ::core::clone::Clone::clone(__self_0),
                },
            ConstItemRhsKind::TypeConst { rhs: __self_0 } =>
                ConstItemRhsKind::TypeConst {
                    rhs: ::core::clone::Clone::clone(__self_0),
                },
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for ConstItemRhsKind {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        ConstItemRhsKind::Body { rhs: ref __binding_0 } => {
                            0usize
                        }
                        ConstItemRhsKind::TypeConst { rhs: ref __binding_0 } => {
                            1usize
                        }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    ConstItemRhsKind::Body { rhs: ref __binding_0 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    ConstItemRhsKind::TypeConst { rhs: ref __binding_0 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for ConstItemRhsKind {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => {
                        ConstItemRhsKind::Body {
                            rhs: ::rustc_serialize::Decodable::decode(__decoder),
                        }
                    }
                    1usize => {
                        ConstItemRhsKind::TypeConst {
                            rhs: ::rustc_serialize::Decodable::decode(__decoder),
                        }
                    }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `ConstItemRhsKind`, expected 0..2, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for ConstItemRhsKind {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            ConstItemRhsKind::Body { rhs: __self_0 } =>
                ::core::fmt::Formatter::debug_struct_field1_finish(f, "Body",
                    "rhs", &__self_0),
            ConstItemRhsKind::TypeConst { rhs: __self_0 } =>
                ::core::fmt::Formatter::debug_struct_field1_finish(f,
                    "TypeConst", "rhs", &__self_0),
        }
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for
            ConstItemRhsKind where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    ConstItemRhsKind::Body { rhs: ref __binding_0 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                    ConstItemRhsKind::TypeConst { rhs: ref __binding_0 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for ConstItemRhsKind
            where __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    ConstItemRhsKind::Body { rhs: ref mut __binding_0 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                    ConstItemRhsKind::TypeConst { rhs: ref mut __binding_0 } =>
                        {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
3946pub enum ConstItemRhsKind {
3947    Body { rhs: Option<Box<Expr>> },
3948    TypeConst { rhs: Option<AnonConst> },
3949}
3950
3951impl ConstItemRhsKind {
3952    pub fn new_body(rhs: Box<Expr>) -> Self {
3953        Self::Body { rhs: Some(rhs) }
3954    }
3955
3956    pub fn span(&self) -> Option<Span> {
3957        Some(self.expr()?.span)
3958    }
3959
3960    pub fn expr(&self) -> Option<&Expr> {
3961        match self {
3962            Self::Body { rhs: Some(body) } => Some(&body),
3963            Self::TypeConst { rhs: Some(anon) } => Some(&anon.value),
3964            _ => None,
3965        }
3966    }
3967
3968    pub fn has_expr(&self) -> bool {
3969        match self {
3970            Self::Body { rhs: Some(_) } => true,
3971            Self::TypeConst { rhs: Some(_) } => true,
3972            _ => false,
3973        }
3974    }
3975
3976    pub fn is_type_const(&self) -> bool {
3977        #[allow(non_exhaustive_omitted_patterns)] match self {
    &Self::TypeConst { .. } => true,
    _ => false,
}matches!(self, &Self::TypeConst { .. })
3978    }
3979}
3980
3981#[derive(#[automatically_derived]
impl ::core::clone::Clone for ConstBlockItem {
    #[inline]
    fn clone(&self) -> ConstBlockItem {
        ConstBlockItem {
            id: ::core::clone::Clone::clone(&self.id),
            span: ::core::clone::Clone::clone(&self.span),
            block: ::core::clone::Clone::clone(&self.block),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for ConstBlockItem {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    ConstBlockItem {
                        id: ref __binding_0,
                        span: ref __binding_1,
                        block: ref __binding_2 } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for ConstBlockItem {
            fn decode(__decoder: &mut __D) -> Self {
                ConstBlockItem {
                    id: ::rustc_serialize::Decodable::decode(__decoder),
                    span: ::rustc_serialize::Decodable::decode(__decoder),
                    block: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for ConstBlockItem {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field3_finish(f,
            "ConstBlockItem", "id", &self.id, "span", &self.span, "block",
            &&self.block)
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for
            ConstBlockItem where __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    ConstBlockItem {
                        id: ref __binding_0,
                        span: ref __binding_1,
                        block: ref __binding_2 } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_2,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for ConstBlockItem where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    ConstBlockItem {
                        id: ref mut __binding_0,
                        span: ref mut __binding_1,
                        block: ref mut __binding_2 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_2,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
3982pub struct ConstBlockItem {
3983    pub id: NodeId,
3984    pub span: Span,
3985    pub block: Box<Block>,
3986}
3987
3988impl ConstBlockItem {
3989    pub const IDENT: Ident = Ident { name: kw::Underscore, span: DUMMY_SP };
3990}
3991
3992#[derive(#[automatically_derived]
impl ::core::clone::Clone for Guard {
    #[inline]
    fn clone(&self) -> Guard {
        Guard {
            cond: ::core::clone::Clone::clone(&self.cond),
            span_with_leading_if: ::core::clone::Clone::clone(&self.span_with_leading_if),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for Guard {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    Guard {
                        cond: ref __binding_0, span_with_leading_if: ref __binding_1
                        } => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for Guard {
            fn decode(__decoder: &mut __D) -> Self {
                Guard {
                    cond: ::rustc_serialize::Decodable::decode(__decoder),
                    span_with_leading_if: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for Guard {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field2_finish(f, "Guard", "cond",
            &self.cond, "span_with_leading_if", &&self.span_with_leading_if)
    }
}Debug, const _: () =
    {
        impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for Guard where
            __V: crate::visit::Visitor<'__ast> {
            fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
                match *self {
                    Guard {
                        cond: ref __binding_0, span_with_leading_if: ref __binding_1
                        } => {
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_0,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                        {
                            match ::rustc_ast_ir::visit::VisitorResult::branch(crate::visit::Visitable::visit(__binding_1,
                                        __visitor, ())) {
                                core::ops::ControlFlow::Continue(()) =>
                                    (),
                                    #[allow(unreachable_code)]
                                    core::ops::ControlFlow::Break(r) => {
                                    return ::rustc_ast_ir::visit::VisitorResult::from_residual(r);
                                }
                            }
                        }
                    }
                }
                <__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
            }
        }
        impl<__V> crate::mut_visit::MutWalkable<__V> for Guard where
            __V: crate::mut_visit::MutVisitor {
            fn walk_mut(&mut self, __visitor: &mut __V) {
                match *self {
                    Guard {
                        cond: ref mut __binding_0,
                        span_with_leading_if: ref mut __binding_1 } => {
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_0,
                                __visitor, ())
                        }
                        {
                            crate::mut_visit::MutVisitable::visit_mut(__binding_1,
                                __visitor, ())
                        }
                    }
                }
            }
        }
    };Walkable)]
3993pub struct Guard {
3994    pub cond: Expr,
3995    pub span_with_leading_if: Span,
3996}
3997
3998impl Guard {
3999    pub fn span(&self) -> Span {
4000        self.cond.span
4001    }
4002}
4003
4004// Adding a new variant? Please update `test_item` in `tests/ui/macros/stringify.rs`.
4005#[derive(#[automatically_derived]
impl ::core::clone::Clone for ItemKind {
    #[inline]
    fn clone(&self) -> ItemKind {
        match self {
            ItemKind::ExternCrate(__self_0, __self_1) =>
                ItemKind::ExternCrate(::core::clone::Clone::clone(__self_0),
                    ::core::clone::Clone::clone(__self_1)),
            ItemKind::Use(__self_0) =>
                ItemKind::Use(::core::clone::Clone::clone(__self_0)),
            ItemKind::Static(__self_0) =>
                ItemKind::Static(::core::clone::Clone::clone(__self_0)),
            ItemKind::Const(__self_0) =>
                ItemKind::Const(::core::clone::Clone::clone(__self_0)),
            ItemKind::ConstBlock(__self_0) =>
                ItemKind::ConstBlock(::core::clone::Clone::clone(__self_0)),
            ItemKind::Fn(__self_0) =>
                ItemKind::Fn(::core::clone::Clone::clone(__self_0)),
            ItemKind::Mod(__self_0, __self_1, __self_2) =>
                ItemKind::Mod(::core::clone::Clone::clone(__self_0),
                    ::core::clone::Clone::clone(__self_1),
                    ::core::clone::Clone::clone(__self_2)),
            ItemKind::ForeignMod(__self_0) =>
                ItemKind::ForeignMod(::core::clone::Clone::clone(__self_0)),
            ItemKind::GlobalAsm(__self_0) =>
                ItemKind::GlobalAsm(::core::clone::Clone::clone(__self_0)),
            ItemKind::TyAlias(__self_0) =>
                ItemKind::TyAlias(::core::clone::Clone::clone(__self_0)),
            ItemKind::Enum(__self_0, __self_1, __self_2) =>
                ItemKind::Enum(::core::clone::Clone::clone(__self_0),
                    ::core::clone::Clone::clone(__self_1),
                    ::core::clone::Clone::clone(__self_2)),
            ItemKind::Struct(__self_0, __self_1, __self_2) =>
                ItemKind::Struct(::core::clone::Clone::clone(__self_0),
                    ::core::clone::Clone::clone(__self_1),
                    ::core::clone::Clone::clone(__self_2)),
            ItemKind::Union(__self_0, __self_1, __self_2) =>
                ItemKind::Union(::core::clone::Clone::clone(__self_0),
                    ::core::clone::Clone::clone(__self_1),
                    ::core::clone::Clone::clone(__self_2)),
            ItemKind::Trait(__self_0) =>
                ItemKind::Trait(::core::clone::Clone::clone(__self_0)),
            ItemKind::TraitAlias(__self_0) =>
                ItemKind::TraitAlias(::core::clone::Clone::clone(__self_0)),
            ItemKind::Impl(__self_0) =>
                ItemKind::Impl(::core::clone::Clone::clone(__self_0)),
            ItemKind::MacCall(__self_0) =>
                ItemKind::MacCall(::core::clone::Clone::clone(__self_0)),
            ItemKind::MacroDef(__self_0, __self_1) =>
                ItemKind::MacroDef(::core::clone::Clone::clone(__self_0),
                    ::core::clone::Clone::clone(__self_1)),
            ItemKind::Delegation(__self_0) =>
                ItemKind::Delegation(::core::clone::Clone::clone(__self_0)),
            ItemKind::DelegationMac(__self_0) =>
                ItemKind::DelegationMac(::core::clone::Clone::clone(__self_0)),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for ItemKind {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        ItemKind::ExternCrate(ref __binding_0, ref __binding_1) => {
                            0usize
                        }
                        ItemKind::Use(ref __binding_0) => { 1usize }
                        ItemKind::Static(ref __binding_0) => { 2usize }
                        ItemKind::Const(ref __binding_0) => { 3usize }
                        ItemKind::ConstBlock(ref __binding_0) => { 4usize }
                        ItemKind::Fn(ref __binding_0) => { 5usize }
                        ItemKind::Mod(ref __binding_0, ref __binding_1,
                            ref __binding_2) => {
                            6usize
                        }
                        ItemKind::ForeignMod(ref __binding_0) => { 7usize }
                        ItemKind::GlobalAsm(ref __binding_0) => { 8usize }
                        ItemKind::TyAlias(ref __binding_0) => { 9usize }
                        ItemKind::Enum(ref __binding_0, ref __binding_1,
                            ref __binding_2) => {
                            10usize
                        }
                        ItemKind::Struct(ref __binding_0, ref __binding_1,
                            ref __binding_2) => {
                            11usize
                        }
                        ItemKind::Union(ref __binding_0, ref __binding_1,
                            ref __binding_2) => {
                            12usize
                        }
                        ItemKind::Trait(ref __binding_0) => { 13usize }
                        ItemKind::TraitAlias(ref __binding_0) => { 14usize }
                        ItemKind::Impl(ref __binding_0) => { 15usize }
                        ItemKind::MacCall(ref __binding_0) => { 16usize }
                        ItemKind::MacroDef(ref __binding_0, ref __binding_1) => {
                            17usize
                        }
                        ItemKind::Delegation(ref __binding_0) => { 18usize }
                        ItemKind::DelegationMac(ref __binding_0) => { 19usize }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    ItemKind::ExternCrate(ref __binding_0, ref __binding_1) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                    }
                    ItemKind::Use(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    ItemKind::Static(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    ItemKind::Const(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    ItemKind::ConstBlock(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    ItemKind::Fn(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    ItemKind::Mod(ref __binding_0, ref __binding_1,
                        ref __binding_2) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                    }
                    ItemKind::ForeignMod(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    ItemKind::GlobalAsm(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    ItemKind::TyAlias(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    ItemKind::Enum(ref __binding_0, ref __binding_1,
                        ref __binding_2) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                    }
                    ItemKind::Struct(ref __binding_0, ref __binding_1,
                        ref __binding_2) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                    }
                    ItemKind::Union(ref __binding_0, ref __binding_1,
                        ref __binding_2) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_2,
                            __encoder);
                    }
                    ItemKind::Trait(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    ItemKind::TraitAlias(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    ItemKind::Impl(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    ItemKind::MacCall(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    ItemKind::MacroDef(ref __binding_0, ref __binding_1) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_1,
                            __encoder);
                    }
                    ItemKind::Delegation(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    ItemKind::DelegationMac(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for ItemKind {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => {
                        ItemKind::ExternCrate(::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder))
                    }
                    1usize => {
                        ItemKind::Use(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    2usize => {
                        ItemKind::Static(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    3usize => {
                        ItemKind::Const(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    4usize => {
                        ItemKind::ConstBlock(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    5usize => {
                        ItemKind::Fn(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    6usize => {
                        ItemKind::Mod(::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder))
                    }
                    7usize => {
                        ItemKind::ForeignMod(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    8usize => {
                        ItemKind::GlobalAsm(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    9usize => {
                        ItemKind::TyAlias(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    10usize => {
                        ItemKind::Enum(::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder))
                    }
                    11usize => {
                        ItemKind::Struct(::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder))
                    }
                    12usize => {
                        ItemKind::Union(::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder))
                    }
                    13usize => {
                        ItemKind::Trait(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    14usize => {
                        ItemKind::TraitAlias(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    15usize => {
                        ItemKind::Impl(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    16usize => {
                        ItemKind::MacCall(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    17usize => {
                        ItemKind::MacroDef(::rustc_serialize::Decodable::decode(__decoder),
                            ::rustc_serialize::Decodable::decode(__decoder))
                    }
                    18usize => {
                        ItemKind::Delegation(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    19usize => {
                        ItemKind::DelegationMac(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `ItemKind`, expected 0..20, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for ItemKind {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            ItemKind::ExternCrate(__self_0, __self_1) =>
                ::core::fmt::Formatter::debug_tuple_field2_finish(f,
                    "ExternCrate", __self_0, &__self_1),
            ItemKind::Use(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Use",
                    &__self_0),
            ItemKind::Static(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Static",
                    &__self_0),
            ItemKind::Const(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Const",
                    &__self_0),
            ItemKind::ConstBlock(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "ConstBlock", &__self_0),
            ItemKind::Fn(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Fn",
                    &__self_0),
            ItemKind::Mod(__self_0, __self_1, __self_2) =>
                ::core::fmt::Formatter::debug_tuple_field3_finish(f, "Mod",
                    __self_0, __self_1, &__self_2),
            ItemKind::ForeignMod(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "ForeignMod", &__self_0),
            ItemKind::GlobalAsm(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "GlobalAsm", &__self_0),
            ItemKind::TyAlias(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "TyAlias", &__self_0),
            ItemKind::Enum(__self_0, __self_1, __self_2) =>
                ::core::fmt::Formatter::debug_tuple_field3_finish(f, "Enum",
                    __self_0, __self_1, &__self_2),
            ItemKind::Struct(__self_0, __self_1, __self_2) =>
                ::core::fmt::Formatter::debug_tuple_field3_finish(f, "Struct",
                    __self_0, __self_1, &__self_2),
            ItemKind::Union(__self_0, __self_1, __self_2) =>
                ::core::fmt::Formatter::debug_tuple_field3_finish(f, "Union",
                    __self_0, __self_1, &__self_2),
            ItemKind::Trait(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Trait",
                    &__self_0),
            ItemKind::TraitAlias(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "TraitAlias", &__self_0),
            ItemKind::Impl(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Impl",
                    &__self_0),
            ItemKind::MacCall(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "MacCall", &__self_0),
            ItemKind::MacroDef(__self_0, __self_1) =>
                ::core::fmt::Formatter::debug_tuple_field2_finish(f,
                    "MacroDef", __self_0, &__self_1),
            ItemKind::Delegation(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "Delegation", &__self_0),
            ItemKind::DelegationMac(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "DelegationMac", &__self_0),
        }
    }
}Debug)]
4006pub enum ItemKind {
4007    /// An `extern crate` item, with the optional *original* crate name if the crate was renamed.
4008    ///
4009    /// E.g., `extern crate foo` or `extern crate foo_bar as foo`.
4010    ExternCrate(Option<Symbol>, Ident),
4011    /// A use declaration item (`use`).
4012    ///
4013    /// E.g., `use foo;`, `use foo::bar;` or `use foo::bar as FooBar;`.
4014    Use(UseTree),
4015    /// A static item (`static`).
4016    ///
4017    /// E.g., `static FOO: i32 = 42;` or `static FOO: &'static str = "bar";`.
4018    Static(Box<StaticItem>),
4019    /// A constant item (`const`).
4020    ///
4021    /// E.g., `const FOO: i32 = 42;`.
4022    Const(Box<ConstItem>),
4023    /// A module-level const block.
4024    /// Equivalent to `const _: () = const { ... };`.
4025    ///
4026    /// E.g., `const { assert!(true) }`.
4027    ConstBlock(ConstBlockItem),
4028    /// A function declaration (`fn`).
4029    ///
4030    /// E.g., `fn foo(bar: usize) -> usize { .. }`.
4031    Fn(Box<Fn>),
4032    /// A module declaration (`mod`).
4033    ///
4034    /// E.g., `mod foo;` or `mod foo { .. }`.
4035    /// `unsafe` keyword on modules is accepted syntactically for macro DSLs, but not
4036    /// semantically by Rust.
4037    Mod(Safety, Ident, ModKind),
4038    /// An external module (`extern`).
4039    ///
4040    /// E.g., `extern {}` or `extern "C" {}`.
4041    ForeignMod(ForeignMod),
4042    /// Module-level inline assembly (from `global_asm!()`).
4043    GlobalAsm(Box<InlineAsm>),
4044    /// A type alias (`type`).
4045    ///
4046    /// E.g., `type Foo = Bar<u8>;`.
4047    TyAlias(Box<TyAlias>),
4048    /// An enum definition (`enum`).
4049    ///
4050    /// E.g., `enum Foo<A, B> { C<A>, D<B> }`.
4051    Enum(Ident, Generics, EnumDef),
4052    /// A struct definition (`struct`).
4053    ///
4054    /// E.g., `struct Foo<A> { x: A }`.
4055    Struct(Ident, Generics, VariantData),
4056    /// A union definition (`union`).
4057    ///
4058    /// E.g., `union Foo<A, B> { x: A, y: B }`.
4059    Union(Ident, Generics, VariantData),
4060    /// A trait declaration (`trait`).
4061    ///
4062    /// E.g., `trait Foo { .. }`, `trait Foo<T> { .. }` or `auto trait Foo {}`.
4063    Trait(Box<Trait>),
4064    /// Trait alias.
4065    ///
4066    /// E.g., `trait Foo = Bar + Quux;`.
4067    TraitAlias(Box<TraitAlias>),
4068    /// An implementation.
4069    ///
4070    /// E.g., `impl<A> Foo<A> { .. }` or `impl<A> Trait for Foo<A> { .. }`.
4071    Impl(Impl),
4072    /// A macro invocation.
4073    ///
4074    /// E.g., `foo!(..)`.
4075    MacCall(Box<MacCall>),
4076    /// A macro definition.
4077    MacroDef(Ident, MacroDef),
4078    /// A single delegation item (`reuse`).
4079    ///
4080    /// E.g. `reuse <Type as Trait>::name { target_expr_template }`.
4081    Delegation(Box<Delegation>),
4082    /// A list or glob delegation item (`reuse prefix::{a, b, c}`, `reuse prefix::*`).
4083    /// Treated similarly to a macro call and expanded early.
4084    DelegationMac(Box<DelegationMac>),
4085}
4086
4087impl ItemKind {
4088    pub fn ident(&self) -> Option<Ident> {
4089        match *self {
4090            ItemKind::ExternCrate(_, ident)
4091            | ItemKind::Static(box StaticItem { ident, .. })
4092            | ItemKind::Const(box ConstItem { ident, .. })
4093            | ItemKind::Fn(box Fn { ident, .. })
4094            | ItemKind::Mod(_, ident, _)
4095            | ItemKind::TyAlias(box TyAlias { ident, .. })
4096            | ItemKind::Enum(ident, ..)
4097            | ItemKind::Struct(ident, ..)
4098            | ItemKind::Union(ident, ..)
4099            | ItemKind::Trait(box Trait { ident, .. })
4100            | ItemKind::TraitAlias(box TraitAlias { ident, .. })
4101            | ItemKind::MacroDef(ident, _)
4102            | ItemKind::Delegation(box Delegation { ident, .. }) => Some(ident),
4103
4104            ItemKind::ConstBlock(_) => Some(ConstBlockItem::IDENT),
4105
4106            ItemKind::Use(_)
4107            | ItemKind::ForeignMod(_)
4108            | ItemKind::GlobalAsm(_)
4109            | ItemKind::Impl(_)
4110            | ItemKind::MacCall(_)
4111            | ItemKind::DelegationMac(_) => None,
4112        }
4113    }
4114
4115    /// "a" or "an"
4116    pub fn article(&self) -> &'static str {
4117        use ItemKind::*;
4118        match self {
4119            Use(..) | Static(..) | Const(..) | ConstBlock(..) | Fn(..) | Mod(..)
4120            | GlobalAsm(..) | TyAlias(..) | Struct(..) | Union(..) | Trait(..) | TraitAlias(..)
4121            | MacroDef(..) | Delegation(..) | DelegationMac(..) => "a",
4122            ExternCrate(..) | ForeignMod(..) | MacCall(..) | Enum(..) | Impl { .. } => "an",
4123        }
4124    }
4125
4126    pub fn descr(&self) -> &'static str {
4127        match self {
4128            ItemKind::ExternCrate(..) => "extern crate",
4129            ItemKind::Use(..) => "`use` import",
4130            ItemKind::Static(..) => "static item",
4131            ItemKind::Const(..) => "constant item",
4132            ItemKind::ConstBlock(..) => "const block",
4133            ItemKind::Fn(..) => "function",
4134            ItemKind::Mod(..) => "module",
4135            ItemKind::ForeignMod(..) => "extern block",
4136            ItemKind::GlobalAsm(..) => "global asm item",
4137            ItemKind::TyAlias(..) => "type alias",
4138            ItemKind::Enum(..) => "enum",
4139            ItemKind::Struct(..) => "struct",
4140            ItemKind::Union(..) => "union",
4141            ItemKind::Trait(..) => "trait",
4142            ItemKind::TraitAlias(..) => "trait alias",
4143            ItemKind::MacCall(..) => "item macro invocation",
4144            ItemKind::MacroDef(..) => "macro definition",
4145            ItemKind::Impl { .. } => "implementation",
4146            ItemKind::Delegation(..) => "delegated function",
4147            ItemKind::DelegationMac(..) => "delegation",
4148        }
4149    }
4150
4151    pub fn generics(&self) -> Option<&Generics> {
4152        match self {
4153            Self::Fn(box Fn { generics, .. })
4154            | Self::TyAlias(box TyAlias { generics, .. })
4155            | Self::Const(box ConstItem { generics, .. })
4156            | Self::Enum(_, generics, _)
4157            | Self::Struct(_, generics, _)
4158            | Self::Union(_, generics, _)
4159            | Self::Trait(box Trait { generics, .. })
4160            | Self::TraitAlias(box TraitAlias { generics, .. })
4161            | Self::Impl(Impl { generics, .. }) => Some(generics),
4162
4163            Self::ExternCrate(..)
4164            | Self::Use(..)
4165            | Self::Static(..)
4166            | Self::ConstBlock(..)
4167            | Self::Mod(..)
4168            | Self::ForeignMod(..)
4169            | Self::GlobalAsm(..)
4170            | Self::MacCall(..)
4171            | Self::MacroDef(..)
4172            | Self::Delegation(..)
4173            | Self::DelegationMac(..) => None,
4174        }
4175    }
4176}
4177
4178/// Represents associated items.
4179/// These include items in `impl` and `trait` definitions.
4180pub type AssocItem = Item<AssocItemKind>;
4181
4182/// Represents associated item kinds.
4183///
4184/// The term "provided" in the variants below refers to the item having a default
4185/// definition / body. Meanwhile, a "required" item lacks a definition / body.
4186/// In an implementation, all items must be provided.
4187/// The `Option`s below denote the bodies, where `Some(_)`
4188/// means "provided" and conversely `None` means "required".
4189#[derive(#[automatically_derived]
impl ::core::clone::Clone for AssocItemKind {
    #[inline]
    fn clone(&self) -> AssocItemKind {
        match self {
            AssocItemKind::Const(__self_0) =>
                AssocItemKind::Const(::core::clone::Clone::clone(__self_0)),
            AssocItemKind::Fn(__self_0) =>
                AssocItemKind::Fn(::core::clone::Clone::clone(__self_0)),
            AssocItemKind::Type(__self_0) =>
                AssocItemKind::Type(::core::clone::Clone::clone(__self_0)),
            AssocItemKind::MacCall(__self_0) =>
                AssocItemKind::MacCall(::core::clone::Clone::clone(__self_0)),
            AssocItemKind::Delegation(__self_0) =>
                AssocItemKind::Delegation(::core::clone::Clone::clone(__self_0)),
            AssocItemKind::DelegationMac(__self_0) =>
                AssocItemKind::DelegationMac(::core::clone::Clone::clone(__self_0)),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for AssocItemKind {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        AssocItemKind::Const(ref __binding_0) => { 0usize }
                        AssocItemKind::Fn(ref __binding_0) => { 1usize }
                        AssocItemKind::Type(ref __binding_0) => { 2usize }
                        AssocItemKind::MacCall(ref __binding_0) => { 3usize }
                        AssocItemKind::Delegation(ref __binding_0) => { 4usize }
                        AssocItemKind::DelegationMac(ref __binding_0) => { 5usize }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    AssocItemKind::Const(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    AssocItemKind::Fn(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    AssocItemKind::Type(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    AssocItemKind::MacCall(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    AssocItemKind::Delegation(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    AssocItemKind::DelegationMac(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for AssocItemKind {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => {
                        AssocItemKind::Const(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    1usize => {
                        AssocItemKind::Fn(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    2usize => {
                        AssocItemKind::Type(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    3usize => {
                        AssocItemKind::MacCall(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    4usize => {
                        AssocItemKind::Delegation(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    5usize => {
                        AssocItemKind::DelegationMac(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `AssocItemKind`, expected 0..6, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for AssocItemKind {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            AssocItemKind::Const(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Const",
                    &__self_0),
            AssocItemKind::Fn(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Fn",
                    &__self_0),
            AssocItemKind::Type(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Type",
                    &__self_0),
            AssocItemKind::MacCall(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "MacCall", &__self_0),
            AssocItemKind::Delegation(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "Delegation", &__self_0),
            AssocItemKind::DelegationMac(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "DelegationMac", &__self_0),
        }
    }
}Debug)]
4190pub enum AssocItemKind {
4191    /// An associated constant, `const $ident: $ty $def?;` where `def ::= "=" $expr? ;`.
4192    /// If `def` is parsed, then the constant is provided, and otherwise required.
4193    Const(Box<ConstItem>),
4194    /// An associated function.
4195    Fn(Box<Fn>),
4196    /// An associated type.
4197    Type(Box<TyAlias>),
4198    /// A macro expanding to associated items.
4199    MacCall(Box<MacCall>),
4200    /// An associated delegation item.
4201    Delegation(Box<Delegation>),
4202    /// An associated list or glob delegation item.
4203    DelegationMac(Box<DelegationMac>),
4204}
4205
4206impl AssocItemKind {
4207    pub fn ident(&self) -> Option<Ident> {
4208        match *self {
4209            AssocItemKind::Const(box ConstItem { ident, .. })
4210            | AssocItemKind::Fn(box Fn { ident, .. })
4211            | AssocItemKind::Type(box TyAlias { ident, .. })
4212            | AssocItemKind::Delegation(box Delegation { ident, .. }) => Some(ident),
4213
4214            AssocItemKind::MacCall(_) | AssocItemKind::DelegationMac(_) => None,
4215        }
4216    }
4217
4218    pub fn defaultness(&self) -> Defaultness {
4219        match *self {
4220            Self::Const(box ConstItem { defaultness, .. })
4221            | Self::Fn(box Fn { defaultness, .. })
4222            | Self::Type(box TyAlias { defaultness, .. }) => defaultness,
4223            Self::MacCall(..) | Self::Delegation(..) | Self::DelegationMac(..) => {
4224                Defaultness::Implicit
4225            }
4226        }
4227    }
4228}
4229
4230impl From<AssocItemKind> for ItemKind {
4231    fn from(assoc_item_kind: AssocItemKind) -> ItemKind {
4232        match assoc_item_kind {
4233            AssocItemKind::Const(item) => ItemKind::Const(item),
4234            AssocItemKind::Fn(fn_kind) => ItemKind::Fn(fn_kind),
4235            AssocItemKind::Type(ty_alias_kind) => ItemKind::TyAlias(ty_alias_kind),
4236            AssocItemKind::MacCall(a) => ItemKind::MacCall(a),
4237            AssocItemKind::Delegation(delegation) => ItemKind::Delegation(delegation),
4238            AssocItemKind::DelegationMac(delegation) => ItemKind::DelegationMac(delegation),
4239        }
4240    }
4241}
4242
4243impl TryFrom<ItemKind> for AssocItemKind {
4244    type Error = ItemKind;
4245
4246    fn try_from(item_kind: ItemKind) -> Result<AssocItemKind, ItemKind> {
4247        Ok(match item_kind {
4248            ItemKind::Const(item) => AssocItemKind::Const(item),
4249            ItemKind::Fn(fn_kind) => AssocItemKind::Fn(fn_kind),
4250            ItemKind::TyAlias(ty_kind) => AssocItemKind::Type(ty_kind),
4251            ItemKind::MacCall(a) => AssocItemKind::MacCall(a),
4252            ItemKind::Delegation(d) => AssocItemKind::Delegation(d),
4253            ItemKind::DelegationMac(d) => AssocItemKind::DelegationMac(d),
4254            _ => return Err(item_kind),
4255        })
4256    }
4257}
4258
4259/// An item in `extern` block.
4260#[derive(#[automatically_derived]
impl ::core::clone::Clone for ForeignItemKind {
    #[inline]
    fn clone(&self) -> ForeignItemKind {
        match self {
            ForeignItemKind::Static(__self_0) =>
                ForeignItemKind::Static(::core::clone::Clone::clone(__self_0)),
            ForeignItemKind::Fn(__self_0) =>
                ForeignItemKind::Fn(::core::clone::Clone::clone(__self_0)),
            ForeignItemKind::TyAlias(__self_0) =>
                ForeignItemKind::TyAlias(::core::clone::Clone::clone(__self_0)),
            ForeignItemKind::MacCall(__self_0) =>
                ForeignItemKind::MacCall(::core::clone::Clone::clone(__self_0)),
        }
    }
}Clone, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for ForeignItemKind {
            fn encode(&self, __encoder: &mut __E) {
                let disc =
                    match *self {
                        ForeignItemKind::Static(ref __binding_0) => { 0usize }
                        ForeignItemKind::Fn(ref __binding_0) => { 1usize }
                        ForeignItemKind::TyAlias(ref __binding_0) => { 2usize }
                        ForeignItemKind::MacCall(ref __binding_0) => { 3usize }
                    };
                ::rustc_serialize::Encoder::emit_u8(__encoder, disc as u8);
                match *self {
                    ForeignItemKind::Static(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    ForeignItemKind::Fn(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    ForeignItemKind::TyAlias(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                    ForeignItemKind::MacCall(ref __binding_0) => {
                        ::rustc_serialize::Encodable::<__E>::encode(__binding_0,
                            __encoder);
                    }
                }
            }
        }
    };Encodable, const _: () =
    {
        impl<__D: ::rustc_span::SpanDecoder> ::rustc_serialize::Decodable<__D>
            for ForeignItemKind {
            fn decode(__decoder: &mut __D) -> Self {
                match ::rustc_serialize::Decoder::read_u8(__decoder) as usize
                    {
                    0usize => {
                        ForeignItemKind::Static(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    1usize => {
                        ForeignItemKind::Fn(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    2usize => {
                        ForeignItemKind::TyAlias(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    3usize => {
                        ForeignItemKind::MacCall(::rustc_serialize::Decodable::decode(__decoder))
                    }
                    n => {
                        ::core::panicking::panic_fmt(format_args!("invalid enum variant tag while decoding `ForeignItemKind`, expected 0..4, actual {0}",
                                n));
                    }
                }
            }
        }
    };Decodable, #[automatically_derived]
impl ::core::fmt::Debug for ForeignItemKind {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            ForeignItemKind::Static(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Static",
                    &__self_0),
            ForeignItemKind::Fn(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Fn",
                    &__self_0),
            ForeignItemKind::TyAlias(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "TyAlias", &__self_0),
            ForeignItemKind::MacCall(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "MacCall", &__self_0),
        }
    }
}Debug)]
4261pub enum ForeignItemKind {
4262    /// A foreign static item (`static FOO: u8`).
4263    Static(Box<StaticItem>),
4264    /// A foreign function.
4265    Fn(Box<Fn>),
4266    /// A foreign type.
4267    TyAlias(Box<TyAlias>),
4268    /// A macro expanding to foreign items.
4269    MacCall(Box<MacCall>),
4270}
4271
4272impl ForeignItemKind {
4273    pub fn ident(&self) -> Option<Ident> {
4274        match *self {
4275            ForeignItemKind::Static(box StaticItem { ident, .. })
4276            | ForeignItemKind::Fn(box Fn { ident, .. })
4277            | ForeignItemKind::TyAlias(box TyAlias { ident, .. }) => Some(ident),
4278
4279            ForeignItemKind::MacCall(_) => None,
4280        }
4281    }
4282}
4283
4284impl From<ForeignItemKind> for ItemKind {
4285    fn from(foreign_item_kind: ForeignItemKind) -> ItemKind {
4286        match foreign_item_kind {
4287            ForeignItemKind::Static(static_foreign_item) => ItemKind::Static(static_foreign_item),
4288            ForeignItemKind::Fn(fn_kind) => ItemKind::Fn(fn_kind),
4289            ForeignItemKind::TyAlias(ty_alias_kind) => ItemKind::TyAlias(ty_alias_kind),
4290            ForeignItemKind::MacCall(a) => ItemKind::MacCall(a),
4291        }
4292    }
4293}
4294
4295impl TryFrom<ItemKind> for ForeignItemKind {
4296    type Error = ItemKind;
4297
4298    fn try_from(item_kind: ItemKind) -> Result<ForeignItemKind, ItemKind> {
4299        Ok(match item_kind {
4300            ItemKind::Static(static_item) => ForeignItemKind::Static(static_item),
4301            ItemKind::Fn(fn_kind) => ForeignItemKind::Fn(fn_kind),
4302            ItemKind::TyAlias(ty_alias_kind) => ForeignItemKind::TyAlias(ty_alias_kind),
4303            ItemKind::MacCall(a) => ForeignItemKind::MacCall(a),
4304            _ => return Err(item_kind),
4305        })
4306    }
4307}
4308
4309pub type ForeignItem = Item<ForeignItemKind>;
4310
4311// Some nodes are used a lot. Make sure they don't unintentionally get bigger.
4312#[cfg(target_pointer_width = "64")]
4313mod size_asserts {
4314    use rustc_data_structures::static_assert_size;
4315
4316    use super::*;
4317    // tidy-alphabetical-start
4318    const _: [(); 80] = [(); ::std::mem::size_of::<AssocItem>()];static_assert_size!(AssocItem, 80);
4319    const _: [(); 16] = [(); ::std::mem::size_of::<AssocItemKind>()];static_assert_size!(AssocItemKind, 16);
4320    const _: [(); 32] = [(); ::std::mem::size_of::<Attribute>()];static_assert_size!(Attribute, 32);
4321    const _: [(); 32] = [(); ::std::mem::size_of::<Block>()];static_assert_size!(Block, 32);
4322    const _: [(); 72] = [(); ::std::mem::size_of::<Expr>()];static_assert_size!(Expr, 72);
4323    const _: [(); 40] = [(); ::std::mem::size_of::<ExprKind>()];static_assert_size!(ExprKind, 40);
4324    const _: [(); 192] = [(); ::std::mem::size_of::<Fn>()];static_assert_size!(Fn, 192);
4325    const _: [(); 80] = [(); ::std::mem::size_of::<ForeignItem>()];static_assert_size!(ForeignItem, 80);
4326    const _: [(); 16] = [(); ::std::mem::size_of::<ForeignItemKind>()];static_assert_size!(ForeignItemKind, 16);
4327    const _: [(); 24] = [(); ::std::mem::size_of::<GenericArg>()];static_assert_size!(GenericArg, 24);
4328    const _: [(); 88] = [(); ::std::mem::size_of::<GenericBound>()];static_assert_size!(GenericBound, 88);
4329    const _: [(); 40] = [(); ::std::mem::size_of::<Generics>()];static_assert_size!(Generics, 40);
4330    const _: [(); 80] = [(); ::std::mem::size_of::<Impl>()];static_assert_size!(Impl, 80);
4331    const _: [(); 152] = [(); ::std::mem::size_of::<Item>()];static_assert_size!(Item, 152);
4332    const _: [(); 88] = [(); ::std::mem::size_of::<ItemKind>()];static_assert_size!(ItemKind, 88);
4333    const _: [(); 24] = [(); ::std::mem::size_of::<LitKind>()];static_assert_size!(LitKind, 24);
4334    const _: [(); 96] = [(); ::std::mem::size_of::<Local>()];static_assert_size!(Local, 96);
4335    const _: [(); 40] = [(); ::std::mem::size_of::<MetaItemLit>()];static_assert_size!(MetaItemLit, 40);
4336    const _: [(); 40] = [(); ::std::mem::size_of::<Param>()];static_assert_size!(Param, 40);
4337    const _: [(); 80] = [(); ::std::mem::size_of::<Pat>()];static_assert_size!(Pat, 80);
4338    const _: [(); 56] = [(); ::std::mem::size_of::<PatKind>()];static_assert_size!(PatKind, 56);
4339    const _: [(); 24] = [(); ::std::mem::size_of::<Path>()];static_assert_size!(Path, 24);
4340    const _: [(); 24] = [(); ::std::mem::size_of::<PathSegment>()];static_assert_size!(PathSegment, 24);
4341    const _: [(); 32] = [(); ::std::mem::size_of::<Stmt>()];static_assert_size!(Stmt, 32);
4342    const _: [(); 16] = [(); ::std::mem::size_of::<StmtKind>()];static_assert_size!(StmtKind, 16);
4343    const _: [(); 72] = [(); ::std::mem::size_of::<TraitImplHeader>()];static_assert_size!(TraitImplHeader, 72);
4344    const _: [(); 64] = [(); ::std::mem::size_of::<Ty>()];static_assert_size!(Ty, 64);
4345    const _: [(); 40] = [(); ::std::mem::size_of::<TyKind>()];static_assert_size!(TyKind, 40);
4346    // tidy-alphabetical-end
4347}