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]
#[doc(hidden)]
unsafe impl ::core::clone::TrivialClone for SolverProjectionLangItem { }
#[automatically_derived]
impl ::core::clone::Clone for SolverProjectionLangItem {
    #[inline]
    fn clone(&self) -> Self { *self }
}Clone, #[automatically_derived]
impl ::core::marker::Copy for SolverProjectionLangItem { }Copy, #[automatically_derived]
impl ::core::marker::StructuralPartialEq for SolverProjectionLangItem { }
#[automatically_derived]
impl ::core::cmp::PartialEq for SolverProjectionLangItem {
    #[inline]
    fn eq(&self, other: &Self) -> bool {
        ::core::intrinsics::discriminant_value(self) ==
            ::core::intrinsics::discriminant_value(other)
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::Eq for SolverProjectionLangItem { }Eq, #[automatically_derived]
impl ::core::hash::Hash for SolverProjectionLangItem {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        ::core::hash::Hash::hash(&::core::intrinsics::discriminant_value(self),
            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::OwnedBox => "OwnedBox",
                SolverAdtLangItem::Poll => "Poll",
            })
    }
}Debug, #[automatically_derived]
#[doc(hidden)]
unsafe impl ::core::clone::TrivialClone for SolverAdtLangItem { }
#[automatically_derived]
impl ::core::clone::Clone for SolverAdtLangItem {
    #[inline]
    fn clone(&self) -> Self { *self }
}Clone, #[automatically_derived]
impl ::core::marker::Copy for SolverAdtLangItem { }Copy, #[automatically_derived]
impl ::core::marker::StructuralPartialEq for SolverAdtLangItem { }
#[automatically_derived]
impl ::core::cmp::PartialEq for SolverAdtLangItem {
    #[inline]
    fn eq(&self, other: &Self) -> bool {
        ::core::intrinsics::discriminant_value(self) ==
            ::core::intrinsics::discriminant_value(other)
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::Eq for SolverAdtLangItem { }Eq, #[automatically_derived]
impl ::core::hash::Hash for SolverAdtLangItem {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        ::core::hash::Hash::hash(&::core::intrinsics::discriminant_value(self),
            state)
    }
}Hash)]
20pub enum SolverAdtLangItem {
21    // tidy-alphabetical-start
22    DynMetadata,
23    Option,
24    OwnedBox,
25    Poll,
26    // tidy-alphabetical-end
27}
28
29#[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::TryAsDyn => "TryAsDyn",
                SolverTraitLangItem::Tuple => "Tuple",
                SolverTraitLangItem::Unpin => "Unpin",
                SolverTraitLangItem::Unsize => "Unsize",
            })
    }
}Debug, #[automatically_derived]
#[doc(hidden)]
unsafe impl ::core::clone::TrivialClone for SolverTraitLangItem { }
#[automatically_derived]
impl ::core::clone::Clone for SolverTraitLangItem {
    #[inline]
    fn clone(&self) -> Self { *self }
}Clone, #[automatically_derived]
impl ::core::marker::Copy for SolverTraitLangItem { }Copy, #[automatically_derived]
impl ::core::marker::StructuralPartialEq for SolverTraitLangItem { }
#[automatically_derived]
impl ::core::cmp::PartialEq for SolverTraitLangItem {
    #[inline]
    fn eq(&self, other: &Self) -> bool {
        ::core::intrinsics::discriminant_value(self) ==
            ::core::intrinsics::discriminant_value(other)
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::Eq for SolverTraitLangItem { }Eq, #[automatically_derived]
impl ::core::hash::Hash for SolverTraitLangItem {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        ::core::hash::Hash::hash(&::core::intrinsics::discriminant_value(self),
            state)
    }
}Hash)]
30pub enum SolverTraitLangItem {
31    // tidy-alphabetical-start
32    AsyncFn,
33    AsyncFnKindHelper,
34    AsyncFnMut,
35    AsyncFnOnce,
36    AsyncIterator,
37    BikeshedGuaranteedNoDrop,
38    Clone,
39    Copy,
40    Coroutine,
41    Destruct,
42    DiscriminantKind,
43    Drop,
44    Field,
45    Fn,
46    FnMut,
47    FnOnce,
48    FnPtrTrait,
49    FusedIterator,
50    Future,
51    Iterator,
52    MetaSized,
53    PointeeSized,
54    PointeeTrait,
55    Sized,
56    TransmuteTrait,
57    TrivialClone,
58    TryAsDyn,
59    Tuple,
60    Unpin,
61    Unsize,
62    // tidy-alphabetical-end
63}