2022-02-06 16:43:51 +08:00
|
|
|
$ cargo build
|
2024-10-20 23:44:05 +08:00
|
|
|
Downloading crates ...
|
|
|
|
Downloaded rand_core v0.6.2
|
|
|
|
Downloaded getrandom v0.2.2
|
|
|
|
Downloaded rand_chacha v0.3.0
|
|
|
|
Downloaded ppv-lite86 v0.2.10
|
|
|
|
Downloaded libc v0.2.86
|
2022-02-06 16:43:51 +08:00
|
|
|
Compiling libc v0.2.86
|
|
|
|
Compiling getrandom v0.2.2
|
|
|
|
Compiling cfg-if v1.0.0
|
|
|
|
Compiling ppv-lite86 v0.2.10
|
|
|
|
Compiling rand_core v0.6.2
|
|
|
|
Compiling rand_chacha v0.3.0
|
2023-01-16 17:34:52 +08:00
|
|
|
Compiling rand v0.8.5
|
2022-02-06 16:43:51 +08:00
|
|
|
Compiling guessing_game v0.1.0 (file:///projects/guessing_game)
|
|
|
|
error[E0308]: mismatched types
|
|
|
|
--> src/main.rs:22:21
|
|
|
|
|
|
|
|
|
22 | match guess.cmp(&secret_number) {
|
2024-06-06 21:23:21 +08:00
|
|
|
| --- ^^^^^^^^^^^^^^ expected `&String`, found `&{integer}`
|
2023-01-16 17:34:52 +08:00
|
|
|
| |
|
2024-06-06 21:23:21 +08:00
|
|
|
| arguments to this method are incorrect
|
2022-02-06 16:43:51 +08:00
|
|
|
|
|
|
|
|
= note: expected reference `&String`
|
|
|
|
found reference `&{integer}`
|
2024-06-06 21:23:21 +08:00
|
|
|
note: method defined here
|
2024-10-20 23:44:05 +08:00
|
|
|
--> /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/core/src/cmp.rs:839:8
|
2022-02-06 16:43:51 +08:00
|
|
|
|
2023-01-16 17:34:52 +08:00
|
|
|
For more information about this error, try `rustc --explain E0308`.
|
2024-06-06 21:23:21 +08:00
|
|
|
error: could not compile `guessing_game` (bin "guessing_game") due to 1 previous error
|