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

Compilation error when proxying a function call via closure #84190

Closed
ivan770 opened this issue Apr 14, 2021 · 1 comment
Closed

Compilation error when proxying a function call via closure #84190

ivan770 opened this issue Apr 14, 2021 · 1 comment
Labels
C-bug Category: This is a bug.

Comments

@ivan770
Copy link

ivan770 commented Apr 14, 2021

I tried this code:
https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=1478c821bdd7d9e135ef3c752c1e2250

I expected to see this happen: code compiles successfully, just like it does without closure:
https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=bd2d963a5d0241a6272e9a39ac29aa0c

Instead, this happened: compilation error

@ivan770 ivan770 added the C-bug Category: This is a bug. label Apr 14, 2021
@jyn514
Copy link
Member

jyn514 commented Apr 14, 2021

Changing let to_call = |n| { to let to_call = |n: &mut _| { makes it compile, so this is a duplicate of #41078.

@jyn514 jyn514 closed this as completed Apr 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug.
Projects
None yet
Development

No branches or pull requests

2 participants