]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #40178 - arielb1:provide-destructors, r=eddyb
authorbors <bors@rust-lang.org>
Fri, 3 Mar 2017 05:16:10 +0000 (05:16 +0000)
committerbors <bors@rust-lang.org>
Fri, 3 Mar 2017 05:16:10 +0000 (05:16 +0000)
convert AdtDef::destructor to on-demand

This removes the `Cell` from `AdtDef`. Also, moving destructor validity
checking to on-demand (forced during item-type checking) ensures that
invalid destructors can't cause ICEs.

Fixes #38868.
Fixes #40132.

r? @eddyb

1  2 
src/librustc/dep_graph/dep_node.rs
src/librustc/ty/mod.rs
src/librustc_typeck/check/mod.rs

index 2777c4d248710c42c0177608b62e5224ba6db2d3,6a70dce35c9b60e0684fe05ef904958245e3b154..254cae61152b90f4b20d74ac2f7d566c1f80ec9c
@@@ -114,9 -110,9 +112,10 @@@ pub enum DepNode<D: Clone + Debug> 
      ItemSignature(D),
      TypeParamPredicates((D, D)),
      SizedConstraint(D),
+     AdtDestructor(D),
      AssociatedItemDefIds(D),
      InherentImpls(D),
 +    TypeckBodiesKrate,
      TypeckTables(D),
      UsedTraitImports(D),
      MonomorphicConstEval(D),
Simple merge
Simple merge