diff options
| author | bors <bors@rust-lang.org> | 2013-11-29 09:36:40 -0800 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-11-29 09:36:40 -0800 |
| commit | 631cbd2e11eda1937cefcd7d8ba7831cadec21cf (patch) | |
| tree | 523aeb2529128c9ee075a5547569332a60dda93a | |
| parent | 6c672ee094a1a8e72c100100f43c73a9741f08a7 (diff) | |
| parent | fffa10c175fcadd8c7f473e1f91d9776cf6c24f6 (diff) | |
| download | rust-631cbd2e11eda1937cefcd7d8ba7831cadec21cf.tar.gz rust-631cbd2e11eda1937cefcd7d8ba7831cadec21cf.zip | |
auto merge of #10726 : pnkfelix/rust/fsk-remove-at-fn-artifact, r=thestinger
While tracking down how this function became dead, identified a spot (@fn cannot happen) where we probably would prefer to ICE rather than pass silently; so added fail! invocation.
| -rw-r--r-- | src/librustc/middle/kind.rs | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/librustc/middle/kind.rs b/src/librustc/middle/kind.rs index a4348a71d21..bd6e7d528a7 100644 --- a/src/librustc/middle/kind.rs +++ b/src/librustc/middle/kind.rs @@ -182,17 +182,6 @@ fn with_appropriate_checker(cx: &Context, check_freevar_bounds(cx, fv.span, var_t, bounds, None); } - fn check_for_box(cx: &Context, fv: &freevar_entry, bounds: ty::BuiltinBounds) { - // all captured data must be owned - let id = ast_util::def_id_of_def(fv.def).node; - let var_t = ty::node_id_to_type(cx.tcx, id); - - // check that only immutable variables are implicitly copied in - check_imm_free_var(cx, fv.def, fv.span); - - check_freevar_bounds(cx, fv.span, var_t, bounds, None); - } - fn check_for_block(cx: &Context, fv: &freevar_entry, bounds: ty::BuiltinBounds, region: ty::Region) { let id = ast_util::def_id_of_def(fv.def).node; @@ -225,6 +214,7 @@ fn with_appropriate_checker(cx: &Context, .. }) => { // can't happen + fail!("internal error: saw closure with managed sigil (@fn)"); } ty::ty_closure(ty::ClosureTy { sigil: BorrowedSigil, |
