about summary refs log tree commit diff
path: root/src/librustc_incremental
diff options
context:
space:
mode:
authorMatthew Jasper <mjjasper1@gmail.com>2020-06-11 15:49:57 +0100
committerMatthew Jasper <mjjasper1@gmail.com>2020-08-14 17:34:30 +0100
commitcbcef3effcf64bd0d89ea2dc8973e18d7fcf94c3 (patch)
treecf11d5e77bdfe87b0a19d5f93ff251b256770325 /src/librustc_incremental
parent55b9adfafa11b2ced5c0477c949fd875b19b3877 (diff)
Rework `rustc_serialize`
- Move the type parameter from `encode` and `decode` methods to
  the trait.
- Remove `UseSpecialized(En|De)codable` traits.
- Remove blanket impls for references.
- Add `RefDecodable` trait to allow deserializing to arena-allocated
  references safely.
- Remove ability to (de)serialize HIR.
- Create proc-macros `(Ty)?(En|De)codable` to help implement these new
  traits.
Diffstat (limited to 'src/librustc_incremental')
-rw-r--r--src/librustc_incremental/Cargo.toml1
-rw-r--r--src/librustc_incremental/persist/data.rs3
2 files changed, 3 insertions, 1 deletions
diff --git a/src/librustc_incremental/Cargo.toml b/src/librustc_incremental/Cargo.toml
index 60a87078d63..2b597c7da80 100644
--- a/src/librustc_incremental/Cargo.toml
+++ b/src/librustc_incremental/Cargo.toml
@@ -18,6 +18,7 @@ rustc_data_structures = { path = "../librustc_data_structures" }
 rustc_hir = { path = "../librustc_hir" }
 rustc_serialize = { path = "../librustc_serialize" }
 rustc_ast = { path = "../librustc_ast" }
+rustc_macros = { path = "../librustc_macros" }
 rustc_span = { path = "../librustc_span" }
 rustc_fs_util = { path = "../librustc_fs_util" }
 rustc_session = { path = "../librustc_session" }
diff --git a/src/librustc_incremental/persist/data.rs b/src/librustc_incremental/persist/data.rs
index ea0fd4eb7ee..81e5410978d 100644
--- a/src/librustc_incremental/persist/data.rs
+++ b/src/librustc_incremental/persist/data.rs
@@ -1,8 +1,9 @@
 //! The data that we will serialize and deserialize.
 
+use rustc_macros::{Decodable, Encodable};
 use rustc_middle::dep_graph::{WorkProduct, WorkProductId};
 
-#[derive(Debug, RustcEncodable, RustcDecodable)]
+#[derive(Debug, Encodable, Decodable)]
 pub struct SerializedWorkProduct {
     /// node that produced the work-product
     pub id: WorkProductId,