Could not compile `loop-rs`
Open
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 697
- Forks
- 28
- PR merge metrics
- No merged PRs in 30d
Description
error[E0631]: type mismatch in function arguments
--> /Users/marcin/.cargo/registry/src/github.com-1ecc6299db9ec823/loop-rs-0.6.1/src/main.rs:238:48
|
238 | #[structopt(long = "for", parse(from_str = "get_values"))]
| ^^^^^^^^^^^^ expected signature of `fn(&str) -> _`
...
322 | fn get_values(input: &&str) -> Vec<String> {
| ------------------------------------------ found signature of `for<'r, 's> fn(&'r &'s str) -> _`
error[E0631]: type mismatch in function arguments
--> /Users/marcin/.cargo/registry/src/github.com-1ecc6299db9ec823/loop-rs-0.6.1/src/main.rs:266:69
|
266 | #[structopt(short = "r", long = "until-error", parse(from_str = "get_error_code"))]
| ^^^^^^^^^^^^^^^^ expected signature of `fn(&str) -> _`
...
314 | fn get_error_code(input: &&str) -> ErrorCode {
| -------------------------------------------- found signature of `for<'r, 's> fn(&'r &'s str) -> _`
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0631`.
error: failed to compile `loop-rs v0.6.1`, intermediate artifacts can be found at `/var/folders/gw/053czpm957z2rq6k8xqvnxx00000gn/T/cargo-installBihqf5`
Caused by:
could not compile `loop-rs`
My rust version:
$ rustup show
Default host: x86_64-apple-darwin
rustup home: /Users/marcin/.rustup
installed toolchains
--------------------
stable-x86_64-apple-darwin (default)
nightly-x86_64-apple-darwin
active toolchain
----------------
stable-x86_64-apple-darwin (default)
rustc 1.54.0 (a178d0322 2021-07-26)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the failure with the stable Rust toolchain and inspect loop-rs 0.6.1/src/main.rs around lines 238, 266, 314, and 322. Compare the parser callbacks with the signatures expected by structopt, then verify that loop-rs compiles and installs successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100