]> git.lizzy.rs Git - rust.git/commit - src/tools/miri
Auto merge of #81574 - tmiasko:p, r=oli-obk
authorbors <bors@rust-lang.org>
Thu, 18 Feb 2021 10:13:36 +0000 (10:13 +0000)
committerbors <bors@rust-lang.org>
Thu, 18 Feb 2021 10:13:36 +0000 (10:13 +0000)
commitcb2effd44e667d133e31ef334e30d10195218ce6
tree8b21f5bca535a15d6d4a85c789d4a97c7212e44f
parent25a2c13e9d19c18d5f3c2656e3d2dda086cb023b
parentb01976aa267620719afdd0effcc0501648bbefd4
Auto merge of #81574 - tmiasko:p, r=oli-obk

Precompute ancestors when checking privacy

Precompute ancestors of the old error node set so that check for private
types and traits in public interfaces can in constant time determine if
the current item has any descendants in the old error set.

This removes disparity in compilation time between public and private type
aliases reported in #50614 (from 30 s to 5 s, in an example making extensive use
of private type aliases).

No functional changes intended.
compiler/rustc_privacy/src/lib.rs