rust/compiler/rustc_passes
bors f8e1e92380 Auto merge of #84549 - tmiasko:static-initializer, r=varkor
Reachable statics have reachable initializers

Static initializer can read other statics. Initializers are evaluated at
compile time, and so their content could become inlined into another
crate. Ensure that initializers of reachable statics are also reachable.

Previously, when an item incorrectly considered to be unreachable was
reached from another crate an attempt would be made to codegen it. The
attempt could fail with an ICE (in the case MIR wasn't available to do
so) in some circumstances the attempt could also succeed resulting in
a local codegen of non-local items, including static ones.

Fixes #84455.
2021-05-16 15:11:48 +00:00
..
src Auto merge of #84549 - tmiasko:static-initializer, r=varkor 2021-05-16 15:11:48 +00:00
Cargo.toml Use pretty-printer instead of span_to_snippet 2021-03-14 14:39:25 -07:00