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

Calling method on closure trait object leads to 'source trait is private' error #16600

Closed
huonw opened this issue Aug 19, 2014 · 0 comments · Fixed by #16615
Closed

Calling method on closure trait object leads to 'source trait is private' error #16600

huonw opened this issue Aug 19, 2014 · 0 comments · Fixed by #16615
Labels
A-closures Area: Closures (`|…| { … }`)

Comments

@huonw
Copy link
Member

huonw commented Aug 19, 2014

#![feature(unboxed_closures, unboxed_closure_sugar)]

fn main() {
    let task: Box<|: int| -> int> = box |: x| x;
    task.call_once((0i, ));
}
<anon>:5:5: 5:27 error: source trait is private
<anon>:5     task.call_once((0i, ));
             ^~~~~~~~~~~~~~~~~~~~~~

(Adding a use std::ops::FnOnce hits #16599.)

pcwalton added a commit to pcwalton/rust that referenced this issue Aug 19, 2014
bors added a commit to rust-lang-ci/rust that referenced this issue Feb 25, 2024
internal: Also downgrade node to 16

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

Successfully merging a pull request may close this issue.

1 participant