about summary refs log tree commit diff
path: root/src/test/debuginfo/enum-thinlto.rs
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-11-22 19:57:49 +0100
committerGitHub <noreply@github.com>2019-11-22 19:57:49 +0100
commit3031720d8fe850073ff3cf9509ae22eb2d2a3978 (patch)
treefb0ef7a3a051598c54d5eed9e7b90ee1e3f9e8b6 /src/test/debuginfo/enum-thinlto.rs
parentc66b508137c296699bae56fb40bc180c61dfa175 (diff)
parentbccc59a8e6e25c2b63308e77f853c6f23782e631 (diff)
downloadrust-3031720d8fe850073ff3cf9509ae22eb2d2a3978.tar.gz
rust-3031720d8fe850073ff3cf9509ae22eb2d2a3978.zip
Rollup merge of #66587 - matthewjasper:handle-static-as-const, r=oli-obk
Handle statics in MIR as const pointers

This is the first PR towards the goal of removing `PlaceBase::Static`. In this PR:

* Statics are lowered to dereferencing a const pointer.
* The temporaries holding such pointers are tracked in MIR, for the most part this is only used for diagnostics. There are two exceptions:
    * The borrow checker has some checks for thread-locals that directly use this data.
    * Const checking will suppress "cannot dereference raw pointer" diagnostics for pointers to `static mut`/`extern static`. This is to maintain the current behaviour (12 tests fail otherwise).

The following are left to future PRs (I think that @spastorino will be working on the first 3):

* Applying the same treatments to promoted statics.
* Removing `PlaceBase::Static`.
* Replacing `PlaceBase` with `Local`.
* Moving the ever growing collection of metadata that we have for diagnostics in MIR passes somewhere more appropriate.

r? @oli-obk
Diffstat (limited to 'src/test/debuginfo/enum-thinlto.rs')
0 files changed, 0 insertions, 0 deletions