-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Cannot call a Box<FnBox(_)> with a reference parameter #25647
Labels
Comments
Strangely, the function does work if you change the body to closure.call_box((&42,)); // <- no longer an error Looks like the sugar confuses the compiler? |
KyleMayes
changed the title
Cannot call a Box<FnOnce(_)> with a reference parameter
Cannot call a Box<FnBox(_)> with a reference parameter
May 20, 2015
This is still a problem in the 1.7 nightly. |
This is still a problem in the Rust 1.26 nightly. |
This is still a problem in Rust 1.28 nightly. |
It seems to work now. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Rust Playpen
Error
On a semi-related note, the closure argument type is inferred for the
Closure
passed toworks
but not for theClosureReference
passed todoes_not_work
, but I think this is likely an extension of #24680.Meta
The text was updated successfully, but these errors were encountered: