diff options
| author | Matthew Jasper <mjjasper1@gmail.com> | 2020-02-09 10:56:18 +0000 |
|---|---|---|
| committer | Matthew Jasper <mjjasper1@gmail.com> | 2020-02-09 10:56:18 +0000 |
| commit | 842938a82f673f0483e40328709c3887a2091534 (patch) | |
| tree | dd510024db6d34da0196c2f5658e7faeb144e74c | |
| parent | 3eb524188451fcec6cd5ed7e3cba2404021b75eb (diff) | |
| download | rust-842938a82f673f0483e40328709c3887a2091534.tar.gz rust-842938a82f673f0483e40328709c3887a2091534.zip | |
cache adt_drop_tys
| -rw-r--r-- | src/librustc/query/mod.rs | 4 | ||||
| -rw-r--r-- | src/librustc/ty/util.rs | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/librustc/query/mod.rs b/src/librustc/query/mod.rs index c705956f454..39046df56e5 100644 --- a/src/librustc/query/mod.rs +++ b/src/librustc/query/mod.rs @@ -670,7 +670,9 @@ rustc_queries! { /// A list of types where the ADT requires drop if and only if any of /// those types require drop. If the ADT is known to always need drop /// then `Err(AlwaysRequiresDrop)` is returned. - query adt_drop_tys(_: DefId) -> Result<&'tcx ty::List<Ty<'tcx>>, AlwaysRequiresDrop> {} + query adt_drop_tys(_: DefId) -> Result<&'tcx ty::List<Ty<'tcx>>, AlwaysRequiresDrop> { + cache_on_disk_if { true } + } query layout_raw( env: ty::ParamEnvAnd<'tcx, Ty<'tcx>> diff --git a/src/librustc/ty/util.rs b/src/librustc/ty/util.rs index 4011c010c03..5a77bac8cf2 100644 --- a/src/librustc/ty/util.rs +++ b/src/librustc/ty/util.rs @@ -1056,5 +1056,5 @@ pub fn needs_drop_components( } } -#[derive(Copy, Clone, Debug, HashStable)] +#[derive(Copy, Clone, Debug, HashStable, RustcEncodable, RustcDecodable)] pub struct AlwaysRequiresDrop; |
