[GH-ISSUE #503] error[E0308]: mismatched types, white compiling #316

Closed
opened 2026-02-27 19:29:59 +03:00 by kerem · 1 comment
Owner

Originally created by @iTeeLion on GitHub (Jul 21, 2020).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/503

cargo install librespot

Compiling librespot-protocol v0.1.1
error[E0308]: mismatched types
  --> /home/iteelion/.cargo/registry/src/github.com-1285ae84e5963aae/librespot-protocol-0.1.1/build.rs:45:39
   |
45 |         let p = parse_and_typecheck(&["proto"], &[src]).expect("protoc");
   |                                       ^^^^^^^ expected struct `std::path::Path`, found `str`
   |
   = note: expected reference `&std::path::Path`
              found reference `&'static str`

error[E0308]: mismatched types
  --> /home/iteelion/.cargo/registry/src/github.com-1285ae84e5963aae/librespot-protocol-0.1.1/build.rs:45:51
   |
45 |         let p = parse_and_typecheck(&["proto"], &[src]).expect("protoc");
   |                                                   ^^^ expected struct `std::path::Path`, found struct `std::string::String`
   |
   = note: expected reference `&std::path::Path`
              found reference `&std::string::String`

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0308`.
error: could not compile `librespot-protocol`.
Originally created by @iTeeLion on GitHub (Jul 21, 2020). Original GitHub issue: https://github.com/librespot-org/librespot/issues/503 **cargo install librespot** ``` Compiling librespot-protocol v0.1.1 error[E0308]: mismatched types --> /home/iteelion/.cargo/registry/src/github.com-1285ae84e5963aae/librespot-protocol-0.1.1/build.rs:45:39 | 45 | let p = parse_and_typecheck(&["proto"], &[src]).expect("protoc"); | ^^^^^^^ expected struct `std::path::Path`, found `str` | = note: expected reference `&std::path::Path` found reference `&'static str` error[E0308]: mismatched types --> /home/iteelion/.cargo/registry/src/github.com-1285ae84e5963aae/librespot-protocol-0.1.1/build.rs:45:51 | 45 | let p = parse_and_typecheck(&["proto"], &[src]).expect("protoc"); | ^^^ expected struct `std::path::Path`, found struct `std::string::String` | = note: expected reference `&std::path::Path` found reference `&std::string::String` error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0308`. error: could not compile `librespot-protocol`. ```
kerem closed this issue 2026-02-27 19:29:59 +03:00
Author
Owner

@ashthespy commented on GitHub (Jul 21, 2020):

Dupe of #477 and others mentioned there..

<!-- gh-comment-id:661867433 --> @ashthespy commented on GitHub (Jul 21, 2020): Dupe of #477 and others mentioned there..
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/librespot#316
No description provided.