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

wordlet fails to compile #1

Closed
crinklywrappr opened this issue Jan 22, 2022 · 4 comments
Closed

wordlet fails to compile #1

crinklywrappr opened this issue Jan 22, 2022 · 4 comments

Comments

@crinklywrappr
Copy link

crinklywrappr commented Jan 22, 2022

mostly looks like incomplete invocations of the format! macro.

$ cargo install wordlet
...
   Compiling wordlet v0.2.0
error: there is no argument named `answer`
   --> /home/crinklywrappr/.cargo/registry/src/github.com-1ecc6299db9ec823/wordlet-0.2.0/src/ui.rs:249:49
    |
249 |             format!("Game over! The answer was '{answer}'. Press any key to exit.")
    |                                                 ^^^^^^^^

error: there is no argument named `letter`
   --> /home/crinklywrappr/.cargo/registry/src/github.com-1ecc6299db9ec823/wordlet-0.2.0/src/ui.rs:253:64
    |
253 |                 format!("Does not include the required letter '{letter}'")
    |                                                                ^^^^^^^^

error: there is no argument named `ch`
   --> /home/crinklywrappr/.cargo/registry/src/github.com-1ecc6299db9ec823/wordlet-0.2.0/src/ui.rs:260:35
    |
260 |                     _ => format!("{ch}th"),
    |                                   ^^^^

error: there is no argument named `number`
   --> /home/crinklywrappr/.cargo/registry/src/github.com-1ecc6299db9ec823/wordlet-0.2.0/src/ui.rs:262:30
    |
262 |                 format!("The {number} letter must be '{ch}'")
    |                              ^^^^^^^^

error: there is no argument named `ch`
   --> /home/crinklywrappr/.cargo/registry/src/github.com-1ecc6299db9ec823/wordlet-0.2.0/src/ui.rs:262:55
    |
262 |                 format!("The {number} letter must be '{ch}'")
    |                                                       ^^^^

error: there is no argument named `le`
   --> /home/crinklywrappr/.cargo/registry/src/github.com-1ecc6299db9ec823/wordlet-0.2.0/src/ui.rs:349:26
    |
349 |         true => format!("{le} "),
    |                          ^^^^

error: failed to compile `wordlet v0.2.0`, intermediate artifacts can be found at `/tmp/cargo-installO2YmIV`

Caused by:
  could not compile `wordlet` due to 6 previous errors
Exception: cargo exited with 101
[tty 19], line 1: cargo install wordlet
@cubicles
Copy link

Getting the same error here

@sammylupt
Copy link
Owner

This is using a new feature of Rust 1.58 (captured identifiers). Try upgrading your Rust version and building again! 😄

@cubicles
Copy link

Thanks @scottluptowski , it is working now! 😀

@sammylupt
Copy link
Owner

Great @cubicles! I added a sentence to the readme to show that 1.58 or higher is required. Closing this issue now

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

3 participants