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

error[E0277]: the trait bound ... --> src/ui/mod.rs:62:10 #7

Closed
toddyamakawa opened this issue Mar 21, 2021 · 2 comments
Closed

error[E0277]: the trait bound ... --> src/ui/mod.rs:62:10 #7

toddyamakawa opened this issue Mar 21, 2021 · 2 comments

Comments

@toddyamakawa
Copy link

I'm seeing an error when I try to build lazycli. I don't know Rust at all.

Rust version: rustc 1.43.1 (8d69840ab 2020-05-04)
Cargo command: cargo install --git https://github.com/jesseduffield/lazycli --verbose

Error message:

error[E0277]: the trait bound `std::vec::Vec<tui::layout::Constraint>: std::convert::From<[tui::layout::Constraint; 3]>` is not satisfied
  --> src/ui/mod.rs:62:10
   |
62 |         .constraints([
   |          ^^^^^^^^^^^ the trait `std::convert::From<[tui::layout::Constraint; 3]>` is not implemented for `std::vec::Vec<tui::layout::Constraint>`
   |
   = help: the following implementations were found:
             <std::vec::Vec<T> as std::convert::From<&[T]>>
             <std::vec::Vec<T> as std::convert::From<&mut [T]>>
             <std::vec::Vec<T> as std::convert::From<std::borrow::Cow<'a, [T]>>>
             <std::vec::Vec<T> as std::convert::From<std::boxed::Box<[T]>>>
           and 5 others
   = note: required because of the requirements on the impl of `std::convert::Into<std::vec::Vec<tui::layout::Constraint>>` for `[tui::layout::Constraint; 3]`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0277`.
error: failed to compile `lazycli v0.1.14 (https://github.com/jesseduffield/lazycli#49fbe2b6)`, intermediate artifacts can be found at `/tmp/cargo-installmQuRvH`

Caused by:
  could not compile `lazycli`.

Caused by:
  process didn't exit successfully: `rustc --crate-name lazycli --edition=2018 src/main.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C opt-level=3 -C metadata=641deed7a2de3b28 -C extra-filename=-641deed7a2de3b28 --out-dir /tmp/cargo-installmQuRvH/release/deps -L dependency=/tmp/cargo-installmQuRvH/release/deps --extern clap=/tmp/cargo-installmQuRvH/release/deps/libclap-dc7b4d1fc59537f9.rlib --extern crossterm=/tmp/cargo-installmQuRvH/release/deps/libcrossterm-1bc56029921d54d6.rlib --extern directories=/tmp/cargo-installmQuRvH/release/deps/libdirectories-5958782e7f9edfea.rlib --extern regex=/tmp/cargo-installmQuRvH/release/deps/libregex-2fe96743b173e2a1.rlib --extern serde=/tmp/cargo-installmQuRvH/release/deps/libserde-e57fc93ae4eeb771.rlib --extern serde_yaml=/tmp/cargo-installmQuRvH/release/deps/libserde_yaml-a4f8433055b73ece.rlib --extern ticker=/tmp/cargo-installmQuRvH/release/deps/libticker-36944b801d7aa26c.rlib --extern tui=/tmp/cargo-installmQuRvH/release/deps/libtui-6833afb078b918e4.rlib` (exit code: 1)
@jesseduffield
Copy link
Owner

@toddyamakawa could you see if using version rustc 1.51.0-nightly (44e3daf5e 2020-12-31) solves the issue?

@jesseduffield
Copy link
Owner

I've updated the readme to include using the '--locked' flag so that the lockfile is used. I'll close this off but can reopen if the issue remains

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

2 participants