Skip to main content

rustc_incremental/persist/
data.rs

1//! The data that we will serialize and deserialize.
2
3use rustc_macros::{Decodable, Encodable};
4use rustc_middle::dep_graph::{WorkProduct, WorkProductId};
5
6#[derive(#[automatically_derived]
impl ::core::fmt::Debug for SerializedWorkProduct {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field2_finish(f,
            "SerializedWorkProduct", "id", &self.id, "work_product",
            &&self.work_product)
    }
}Debug, const _: () =
    {
        impl<__E: ::rustc_span::SpanEncoder> ::rustc_serialize::Encodable<__E>
            for SerializedWorkProduct {
            fn encode(&self, __encoder: &mut __E) {
                match *self {
                    SerializedWorkProduct {
                        id: ref __binding_0, work_product: 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 SerializedWorkProduct {
            fn decode(__decoder: &mut __D) -> Self {
                SerializedWorkProduct {
                    id: ::rustc_serialize::Decodable::decode(__decoder),
                    work_product: ::rustc_serialize::Decodable::decode(__decoder),
                }
            }
        }
    };Decodable)]
7pub(crate) struct SerializedWorkProduct {
8    /// node that produced the work-product
9    pub id: WorkProductId,
10
11    /// work-product data itself
12    pub work_product: WorkProduct,
13}