diff options
| author | bors <bors@rust-lang.org> | 2014-02-21 07:06:51 -0800 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-02-21 07:06:51 -0800 |
| commit | c6aaf2c7bd69af2a3fc9a109a8c3a6c3004616f2 (patch) | |
| tree | d5f71ef82ade3033bd3480e69ad9f7a3207171dd /src/rustllvm/PassWrapper.cpp | |
| parent | 2fa7d6b44fcc329e849f4dd43e11c6fdd43ebd76 (diff) | |
| parent | 5ec118383b39f00589dc72d01a0f510c1ed0511f (diff) | |
| download | rust-c6aaf2c7bd69af2a3fc9a109a8c3a6c3004616f2.tar.gz rust-c6aaf2c7bd69af2a3fc9a109a8c3a6c3004616f2.zip | |
auto merge of #12419 : huonw/rust/compiler-unsafe, r=alexcrichton
Previously an `unsafe` block created by the compiler (like those in the
formatting macros) would be "ignored" if surrounded by `unsafe`, that
is, the internal unsafety would be being legitimised by the external
block:
unsafe { println!("...") } =(expansion)=> unsafe { ... unsafe { ... } }
And the code in the inner block would be using the outer block, making
it considered used (and the inner one considered unused).
This patch forces the compiler to create a new unsafe context for
compiler generated blocks, so that their internal unsafety doesn't
escape to external blocks.
Fixes #12418.
Diffstat (limited to 'src/rustllvm/PassWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
