Skip to content
This repository was archived by the owner on Apr 5, 2024. It is now read-only.
This repository was archived by the owner on Apr 5, 2024. It is now read-only.

Truncate box deref in move closures #50

Closed
rust-lang/rust
#86445
@arora-aman

Description

@arora-aman
#![feature(capture_disjoint_fields)]
#![feature(rustc_attrs)]

struct S(i32, String);

fn main() {
    let x = Box::new(S(0, String::new()));
    
    let c = move || {
        println!("{}, x.1); // currently capture x.1 by Move
    };
}

This should capture x by move.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions