I'm trying to play around with the "actix-web" crate using Cargo. I'm using the WSL version of Ubuntu on Windows 10.
Steps I ran:
- Install Cargo (and Rust with it) using
sudo apt install cargo
- Created a project using
cargo new hello
- Added
actix-web = "0.7.8"
under the[dependencies]
in theCargo.toml
file - Ran
cargo run
and got the following compile error:
error[E0658]: non-reference pattern used to match a reference (see issue #42640)
--> /home/ash/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/build.rs:375:9
|
375 | let (_, _, perlasm_format) = ASM_TARGETS.iter().find(|entry| {
| ^^^^^^^^^^^^^^^^^^^^^^ help: consider using a reference: `&(_, _, perlasm_format)`
error[E0658]: non-reference pattern used to match a reference (see issue #42640)
--> /home/ash/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/build.rs:674:9
|
674 | for (src, dst) in src_dst {
| ^^^^^^^^^^ help: consider using a reference: `&(src, dst)`
error[E0658]: non-reference pattern used to match a reference (see issue #42640)
--> /home/ash/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/build.rs:737:35
|
737 | RING_SRCS.iter().any(|(_, f)| cmp(f)) ||
| ^^^^^^ help: consider using a reference: `&(_, f)`
error[E0658]: non-reference pattern used to match a reference (see issue #42640)
--> /home/ash/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.2/build.rs:741:35
|
741 | RING_SRCS.iter().any(|(_, f)| cmp(f)) ||
| ^^^^^^ help: consider using a reference: `&(_, f)`
I tried using a wildcard dependency but I could not get it to work.
rustc
is version 1.25.0
cargo
is version 0.26.0