rust/src/test/compile-fail
Huon Wilson 5ec118383b rustc: avoid compiler generated unsafe blocks leaking.
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.
2014-02-20 23:29:57 +11:00
..
2014-02-14 22:55:21 -08:00
2014-01-12 10:35:10 +01:00
2013-09-04 23:09:51 -04:00
2014-02-14 22:55:21 -08:00
2014-02-14 22:55:21 -08:00
2014-02-14 22:55:21 -08:00
2014-02-14 22:55:21 -08:00
2014-02-14 22:55:21 -08:00
2014-02-12 20:23:45 +01:00
2014-02-14 22:55:21 -08:00
2014-02-14 22:55:21 -08:00
2014-02-14 22:55:21 -08:00
2014-02-14 22:55:21 -08:00
2014-02-15 12:11:41 -05:00
2014-02-14 22:55:21 -08:00
2014-02-17 21:48:53 +01:00
2014-02-17 21:48:53 +01:00
2014-02-14 22:55:21 -08:00
2014-02-12 20:23:45 +01:00
2014-02-14 22:55:21 -08:00
2014-02-14 22:55:21 -08:00
2014-02-14 22:55:21 -08:00
2014-02-14 22:55:21 -08:00
2014-02-14 22:55:21 -08:00
2014-02-14 22:55:21 -08:00
2014-02-14 22:55:21 -08:00
2014-02-14 22:55:21 -08:00
2014-02-14 22:55:21 -08:00
2014-02-14 22:55:21 -08:00
2014-02-07 00:38:33 +02:00
2014-02-14 22:55:21 -08:00
2014-02-14 22:55:21 -08:00
2014-02-07 12:49:24 -06:00
2013-03-07 22:37:58 -08:00
2014-02-14 22:55:21 -08:00