Auto merge of #67603 - oli-obk:no_mut_static_ref_from_const, r=RalfJung

Promoteds can contain raw pointers, but these must still only point to immutable allocations

fixes #67601

r? @RalfJung

cc @wesleywiser in order to not change behaviour in this PR, const prop uses the constant rules for interning, but at least there's an explicit mode for it now that we can think about this in the future
This commit is contained in:
bors 2020-01-15 16:28:06 +00:00
commit faf45c5dad
6 changed files with 55 additions and 21 deletions

View file

@ -0,0 +1,5 @@
// check-pass
pub const FOO: &'static *const i32 = &(&0 as _);
fn main() {}