Skip to main content

rustc_type_ir/
lang_items.rs

1/// Lang items used by the new trait solver. This can be mapped to whatever internal
2/// representation of `LangItem`s used in the underlying compiler implementation.
3#[derive(#[automatically_derived]
impl ::core::fmt::Debug for SolverProjectionLangItem {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::write_str(f,
            match self {
                SolverProjectionLangItem::AsyncFnKindUpvars =>
                    "AsyncFnKindUpvars",
                SolverProjectionLangItem::AsyncFnOnceOutput =>
                    "AsyncFnOnceOutput",
                SolverProjectionLangItem::CallOnceFuture => "CallOnceFuture",
                SolverProjectionLangItem::CallRefFuture => "CallRefFuture",
                SolverProjectionLangItem::CoroutineReturn =>
                    "CoroutineReturn",
                SolverProjectionLangItem::CoroutineYield => "CoroutineYield",
                SolverProjectionLangItem::FieldBase => "FieldBase",
                SolverProjectionLangItem::FieldType => "FieldType",
                SolverProjectionLangItem::FutureOutput => "FutureOutput",
                SolverProjectionLangItem::Metadata => "Metadata",
            })
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for SolverProjectionLangItem {
    #[inline]
    fn clone(&self) -> SolverProjectionLangItem { *self }
}Clone, #[automatically_derived]
impl ::core::marker::Copy for SolverProjectionLangItem { }Copy, #[automatically_derived]
impl ::core::cmp::PartialEq for SolverProjectionLangItem {
    #[inline]
    fn eq(&self, other: &SolverProjectionLangItem) -> 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 SolverProjectionLangItem {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::hash::Hash for SolverProjectionLangItem {
    #[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)]
4pub enum SolverProjectionLangItem {
5    // tidy-alphabetical-start
6    AsyncFnKindUpvars,
7    AsyncFnOnceOutput,
8    CallOnceFuture,
9    CallRefFuture,
10    CoroutineReturn,
11    CoroutineYield,
12    FieldBase,
13    FieldType,
14    FutureOutput,
15    Metadata,
16    // tidy-alphabetical-end
17}
18
19#[derive(#[automatically_derived]
impl ::core::fmt::Debug for SolverAdtLangItem {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::write_str(f,
            match self {
                SolverAdtLangItem::DynMetadata => "DynMetadata",
                SolverAdtLangItem::Option => "Option",
                SolverAdtLangItem::Poll => "Poll",
            })
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for SolverAdtLangItem {
    #[inline]
    fn clone(&self) -> SolverAdtLangItem { *self }
}Clone, #[automatically_derived]
impl ::core::marker::Copy for SolverAdtLangItem { }Copy, #[automatically_derived]
impl ::core::cmp::PartialEq for SolverAdtLangItem {
    #[inline]
    fn eq(&self, other: &SolverAdtLangItem) -> 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 SolverAdtLangItem {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::hash::Hash for SolverAdtLangItem {
    #[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)]
20pub enum SolverAdtLangItem {
21    // tidy-alphabetical-start
22    DynMetadata,
23    Option,
24    Poll,
25    // tidy-alphabetical-end
26}
27
28#[derive(#[automatically_derived]
impl ::core::fmt::Debug for SolverTraitLangItem {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::write_str(f,
            match self {
                SolverTraitLangItem::AsyncFn => "AsyncFn",
                SolverTraitLangItem::AsyncFnKindHelper => "AsyncFnKindHelper",
                SolverTraitLangItem::AsyncFnMut => "AsyncFnMut",
                SolverTraitLangItem::AsyncFnOnce => "AsyncFnOnce",
                SolverTraitLangItem::AsyncIterator => "AsyncIterator",
                SolverTraitLangItem::BikeshedGuaranteedNoDrop =>
                    "BikeshedGuaranteedNoDrop",
                SolverTraitLangItem::Clone => "Clone",
                SolverTraitLangItem::Copy => "Copy",
                SolverTraitLangItem::Coroutine => "Coroutine",
                SolverTraitLangItem::Destruct => "Destruct",
                SolverTraitLangItem::DiscriminantKind => "DiscriminantKind",
                SolverTraitLangItem::Drop => "Drop",
                SolverTraitLangItem::Field => "Field",
                SolverTraitLangItem::Fn => "Fn",
                SolverTraitLangItem::FnMut => "FnMut",
                SolverTraitLangItem::FnOnce => "FnOnce",
                SolverTraitLangItem::FnPtrTrait => "FnPtrTrait",
                SolverTraitLangItem::FusedIterator => "FusedIterator",
                SolverTraitLangItem::Future => "Future",
                SolverTraitLangItem::Iterator => "Iterator",
                SolverTraitLangItem::MetaSized => "MetaSized",
                SolverTraitLangItem::PointeeSized => "PointeeSized",
                SolverTraitLangItem::PointeeTrait => "PointeeTrait",
                SolverTraitLangItem::Sized => "Sized",
                SolverTraitLangItem::TransmuteTrait => "TransmuteTrait",
                SolverTraitLangItem::TrivialClone => "TrivialClone",
                SolverTraitLangItem::Tuple => "Tuple",
                SolverTraitLangItem::Unpin => "Unpin",
                SolverTraitLangItem::Unsize => "Unsize",
            })
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for SolverTraitLangItem {
    #[inline]
    fn clone(&self) -> SolverTraitLangItem { *self }
}Clone, #[automatically_derived]
impl ::core::marker::Copy for SolverTraitLangItem { }Copy, #[automatically_derived]
impl ::core::cmp::PartialEq for SolverTraitLangItem {
    #[inline]
    fn eq(&self, other: &SolverTraitLangItem) -> 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 SolverTraitLangItem {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::hash::Hash for SolverTraitLangItem {
    #[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)]
29pub enum SolverTraitLangItem {
30    // tidy-alphabetical-start
31    AsyncFn,
32    AsyncFnKindHelper,
33    AsyncFnMut,
34    AsyncFnOnce,
35    AsyncIterator,
36    BikeshedGuaranteedNoDrop,
37    Clone,
38    Copy,
39    Coroutine,
40    Destruct,
41    DiscriminantKind,
42    Drop,
43    Field,
44    Fn,
45    FnMut,
46    FnOnce,
47    FnPtrTrait,
48    FusedIterator,
49    Future,
50    Iterator,
51    MetaSized,
52    PointeeSized,
53    PointeeTrait,
54    Sized,
55    TransmuteTrait,
56    TrivialClone,
57    Tuple,
58    Unpin,
59    Unsize,
60    // tidy-alphabetical-end
61}