Skip to content
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

failure to infer move mode for a variable when the move is from *x #23675

Closed
nikomatsakis opened this issue Mar 24, 2015 · 3 comments
Closed
Labels
A-closures Area: Closures (`|…| { … }`) C-bug Category: This is a bug.

Comments

@nikomatsakis
Copy link
Contributor

Example (play: http://is.gd/idpRaW)

use std::mem;
struct Trace;
fn foo(b: Box<Trace>) {
    do1(|| mem::drop(*b));
}
fn do1<F:FnOnce()>(f: F) { }
fn main() { }

If you change mem::drop(*b) to mem::drop(b), it compiles.

@nikomatsakis nikomatsakis added A-closures Area: Closures (`|…| { … }`) I-wrong labels Mar 24, 2015
@bstrie
Copy link
Contributor

bstrie commented Oct 8, 2016

Triage: still relevant.

@Mark-Simulacrum Mark-Simulacrum added C-bug Category: This is a bug. and removed C-enhancement Category: An issue proposing an enhancement or a PR with one. I-wrong labels Jul 22, 2017
@memoryruins
Copy link
Contributor

Triage: now compiles on both editions.
rustc: 1.32.0

@matthewjasper
Copy link
Contributor

The fix appears to have been in 1.23

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-closures Area: Closures (`|…| { … }`) C-bug Category: This is a bug.
Projects
None yet
Development

No branches or pull requests

5 participants