Skip to content

Commit 842938a

Browse files
committed
cache adt_drop_tys
1 parent 3eb5241 commit 842938a

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/librustc/query/mod.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,9 @@ rustc_queries! {
670670
/// A list of types where the ADT requires drop if and only if any of
671671
/// those types require drop. If the ADT is known to always need drop
672672
/// then `Err(AlwaysRequiresDrop)` is returned.
673-
query adt_drop_tys(_: DefId) -> Result<&'tcx ty::List<Ty<'tcx>>, AlwaysRequiresDrop> {}
673+
query adt_drop_tys(_: DefId) -> Result<&'tcx ty::List<Ty<'tcx>>, AlwaysRequiresDrop> {
674+
cache_on_disk_if { true }
675+
}
674676

675677
query layout_raw(
676678
env: ty::ParamEnvAnd<'tcx, Ty<'tcx>>

src/librustc/ty/util.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1056,5 +1056,5 @@ pub fn needs_drop_components(
10561056
}
10571057
}
10581058

1059-
#[derive(Copy, Clone, Debug, HashStable)]
1059+
#[derive(Copy, Clone, Debug, HashStable, RustcEncodable, RustcDecodable)]
10601060
pub struct AlwaysRequiresDrop;

0 commit comments

Comments
 (0)