Skip to content

Commit ffc8c0b

Browse files
committed
Looser restrictions on what can be captured in unbounded heap closures.
1 parent f8c892a commit ffc8c0b

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

src/librustc/middle/kind.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -169,10 +169,6 @@ fn with_appropriate_checker(cx: Context, id: node_id,
169169
let id = ast_util::def_id_of_def(fv.def).node;
170170
let var_t = ty::node_id_to_type(cx.tcx, id);
171171

172-
// FIXME(#3569): Once closure capabilities are restricted based on their
173-
// incoming bounds, make this check conditional based on the bounds.
174-
if !check_owned(cx, var_t, fv.span) { return; }
175-
176172
// check that only immutable variables are implicitly copied in
177173
check_imm_free_var(cx, fv.def, fv.span);
178174

@@ -184,10 +180,6 @@ fn with_appropriate_checker(cx: Context, id: node_id,
184180
let id = ast_util::def_id_of_def(fv.def).node;
185181
let var_t = ty::node_id_to_type(cx.tcx, id);
186182

187-
// FIXME(#3569): Once closure capabilities are restricted based on their
188-
// incoming bounds, make this check conditional based on the bounds.
189-
if !check_durable(cx.tcx, var_t, fv.span) { return; }
190-
191183
// check that only immutable variables are implicitly copied in
192184
check_imm_free_var(cx, fv.def, fv.span);
193185

0 commit comments

Comments
 (0)