rust/src/librustc/middle
Felix S. Klock II 1829fa5199 Hack for "unsafety hygiene" -- push_unsafe! and pop_unsafe!.
Even after expansion, the generated expressions still track depth of
such pushes (i.e. how often you have "pushed" without a corresponding
"pop"), and we add a rule that in a context with a positive
`push_unsafe!` depth, it is effectively an `unsafe` block context.

(This way, we can inject code that uses `unsafe` features, but still
contains within it a sub-expression that should inherit the outer
safety checking setting, outside of the injected code.)

This is a total hack; it not only needs a feature-gate, but probably
should be feature-gated forever (if possible).

ignore-pretty in test/run-pass/pushpop-unsafe-okay.rs
2015-07-22 15:33:59 +02:00
..
cfg use is_method_call rather than directly accessing the method_map 2015-07-07 18:48:27 +03:00
infer implement 'a:'static region bounds 2015-07-20 00:16:35 +03:00
traits Auto merge of #27096 - apasel422:issue-26217, r=nikomatsakis 2015-07-18 11:02:58 +00:00
ty_relate Transition to the new object lifetime defaults, replacing the old 2015-07-14 19:36:15 -04:00
astconv_util.rs rustc: make ty::mk_* constructors into methods on ty::ctxt. 2015-06-26 07:34:56 +03:00
astencode.rs rustc: remove MethodOrigin and use the container to distinguish inherent methods. 2015-07-04 17:51:31 +03:00
cast.rs Rename TypeWithMutability to TypeAndMut 2015-07-10 18:27:06 -07:00
check_const.rs mark user-defined derefs as non-constant 2015-07-07 18:48:28 +03:00
check_loop.rs Fallout out rustc 2015-04-01 11:22:39 -04:00
check_match.rs Auto merge of #26895 - jroesch:modernize-typeck-names, r=nikomatsakis 2015-07-12 19:22:11 +00:00
check_rvalues.rs Address nits 2015-07-01 13:08:25 -07:00
check_static_recursion.rs Add comments about the checks for recursive variant definition, as requested by @nrc. 2015-07-08 20:51:47 -06:00
const_eval.rs Auto merge of #26935 - oli-obk:const_val_description, r=eddyb 2015-07-21 16:14:46 +00:00
dataflow.rs Use vec![elt; n] where possible 2015-07-09 11:05:32 +02:00
dead.rs rustc: remove MethodOrigin and use the container to distinguish inherent methods. 2015-07-04 17:51:31 +03:00
def.rs Structural changes for associated constants 2015-04-23 21:02:25 -06:00
dependency_format.rs Conver reborrows to .iter() calls where appropriate 2015-06-11 13:56:07 +01:00
effect.rs Hack for "unsafety hygiene" -- push_unsafe! and pop_unsafe!. 2015-07-22 15:33:59 +02:00
entry.rs syntax: move ast_map to librustc. 2015-06-10 02:40:45 +03:00
expr_use_visitor.rs Remove snake_case names from ty.rs 2015-07-08 12:38:19 -07:00
fast_reject.rs Don't ICE when missing owned_box lang item 2015-07-13 11:53:16 +12:00
free_region.rs implement 'a:'static region bounds 2015-07-20 00:16:35 +03:00
implicator.rs Rename TypeWithMutability to TypeAndMut 2015-07-10 18:27:06 -07:00
intrinsicck.rs rustc: switch most remaining middle::ty functions to methods. 2015-06-26 07:34:57 +03:00
lang_items.rs trans: Move rust_try into the compiler 2015-07-21 16:08:11 -07:00
liveness.rs Use vec![elt; n] where possible 2015-07-09 11:05:32 +02:00
mem_categorization.rs Rename TypeWithMutability to TypeAndMut 2015-07-10 18:27:06 -07:00
pat_util.rs rustc: switch most remaining middle::ty functions to methods. 2015-06-26 07:34:57 +03:00
privacy.rs Fallout out rustc 2015-04-01 11:22:39 -04:00
reachable.rs rustc: remove MethodOrigin and use the container to distinguish inherent methods. 2015-07-04 17:51:31 +03:00
recursion_limit.rs for x in xs.iter() -> for x in &xs 2015-02-02 13:40:18 -05:00
region.rs Conver reborrows to .iter() calls where appropriate 2015-06-11 13:56:07 +01:00
resolve_lifetime.rs Don't recurse down closures for duplicate-label checking 2015-07-17 23:48:05 +05:30
stability.rs Auto merge of #26747 - huonw:stability-issue, r=alexcrichton 2015-07-07 17:41:43 +00:00
subst.rs rustc: simplify ty::MethodOrigin and avoid trait item indices. 2015-07-04 06:21:00 +03:00
ty.rs Auto merge of #26935 - oli-obk:const_val_description, r=eddyb 2015-07-21 16:14:46 +00:00
ty_fold.rs Transition to the new object lifetime defaults, replacing the old 2015-07-14 19:36:15 -04:00
ty_match.rs Transition to the new object lifetime defaults, replacing the old 2015-07-14 19:36:15 -04:00
ty_walk.rs Fix lifetime elision region accounting 2015-06-30 01:33:16 +03:00
weak_lang_items.rs trans: Move rust_try into the compiler 2015-07-21 16:08:11 -07:00