rust/src/librustc/middle
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
..
borrowck Removed the obsolete ast::CallSugar (previously used by do). 2014-02-14 07:48:13 -08:00
cfg Removed the obsolete ast::CallSugar (previously used by do). 2014-02-14 07:48:13 -08:00
trans rustc: avoid compiler generated unsafe blocks leaking. 2014-02-20 23:29:57 +11:00
typeck rustc: avoid compiler generated unsafe blocks leaking. 2014-02-20 23:29:57 +11:00
astencode.rs Refactored ast_map and friends, mainly to have Paths without storing them. 2014-02-14 08:43:29 +02:00
check_const.rs Removed the obsolete ast::CallSugar (previously used by do). 2014-02-14 07:48:13 -08:00
check_loop.rs Replace crate usage with krate 2014-02-13 20:52:07 +01:00
check_match.rs Refactored ast_map and friends, mainly to have Paths without storing them. 2014-02-14 08:43:29 +02:00
const_eval.rs Refactored ast_map and friends, mainly to have Paths without storing them. 2014-02-14 08:43:29 +02:00
dataflow.rs Removed the obsolete ast::CallSugar (previously used by do). 2014-02-14 07:48:13 -08:00
dead.rs Refactored ast_map and friends, mainly to have Paths without storing them. 2014-02-14 08:43:29 +02:00
effect.rs rustc: avoid compiler generated unsafe blocks leaking. 2014-02-20 23:29:57 +11:00
entry.rs Refactored ast_map and friends, mainly to have Paths without storing them. 2014-02-14 08:43:29 +02:00
freevars.rs Replace crate usage with krate 2014-02-13 20:52:07 +01:00
graph.rs
kind.rs Refactored ast_map and friends, mainly to have Paths without storing them. 2014-02-14 08:43:29 +02:00
lang_items.rs Replace crate usage with krate 2014-02-13 20:52:07 +01:00
lint.rs Refactored ast_map and friends, mainly to have Paths without storing them. 2014-02-14 08:43:29 +02:00
liveness.rs Removed the obsolete ast::CallSugar (previously used by do). 2014-02-14 07:48:13 -08:00
mem_categorization.rs Refactored ast_map and friends, mainly to have Paths without storing them. 2014-02-14 08:43:29 +02:00
moves.rs Removed the obsolete ast::CallSugar (previously used by do). 2014-02-14 07:48:13 -08:00
pat_util.rs
privacy.rs Make priavcy checking aware that a use directive can point to two defintions (namespaces) with different privacy. Closes #4110 2014-02-19 14:47:10 +13:00
reachable.rs Refactored ast_map and friends, mainly to have Paths without storing them. 2014-02-14 08:43:29 +02:00
region.rs Replace crate usage with krate 2014-02-13 20:52:07 +01:00
resolve_lifetime.rs Refactored ast_map and friends, mainly to have Paths without storing them. 2014-02-14 08:43:29 +02:00
resolve.rs Make priavcy checking aware that a use directive can point to two defintions (namespaces) with different privacy. Closes #4110 2014-02-19 14:47:10 +13:00
subst.rs Substitute type params in default type params using them. 2014-02-02 12:54:22 +02:00
ty_fold.rs Removed ty_type (previously used to represent *tydesc). 2014-02-12 14:17:06 +02:00
ty.rs Remove CloneableTuple and ImmutableTuple traits 2014-02-17 00:57:56 +11:00