Skip to content

Removed some dead code (check_for_box in kind.rs) #10726

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 29, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions src/librustc/middle/kind.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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,
Expand Down