Skip to content

Failed to install in rust 1.61.0-beta.4 #708

Closed
@trickster

Description

@trickster

Before you report, please take a look at Troubleshooting to see if there's already an answer to your problem. Also check out existing issues and known problems to see if your problem is already reported/known/fixed.

Also, please fill in all fields if possible - if the issue is too hard to reproduce or vague, it may not be fixed!

Describe the bug

Tried to install using cargo install bottom --locked. Type inference failure in Rust.

Give a high level description of the bug.

What operating system/architecture are you using?

Darwin/Intel x86-64

Please mention what operating system, version, and architecture you're experiencing the problem on (ex: macOS 10.13, x86_64). Please also ensure that your system is on the list of supported systems - bug reports on unsupported systems are likely to be closed.

What terminal are you using bottom on?

Please mention what terminal/terminal emulator you are using bottom on (ex: Konsole, Kitty), as well as their version and any relevant settings.

What version are you on?

The latest

Please mention which version of bottom you're running (btm -V, nightly, etc.)!

How did you install bottom?

cargo install bottom --locked
rustc 1.61.0-beta.4 (69a6d12e9 2022-04-25)

Please mention how you installed bottom. If you manually compiled it, please also mention your Rust version.

How can we reproduce this?

  1. Install latest beta toolchain (rustup update beta)

  2. cargo install bottom --locked

Provide detailed steps on how to reproduce your problem, to the best of your ability. Be as detailed as possible. Include config files or flags if relevant. If maintainers cannot reproduce the bug, it will be very hard to fix it.

What is the actual behaviour?

   Compiling heim v0.1.0-rc.1
error[E0283]: type annotations needed
   --> /home/user/.cargo/registry/src/github.1485827954.workers.dev-1ecc6299db9ec823/bottom-0.6.8/src/canvas/dialogs/dd_dialog.rs:385:22
    |
380 | /                     if app_state.dd_err.is_some() {
381 | |                         vec![Constraint::Percentage(100)]
382 | |                     } else {
383 | |                         vec![Constraint::Min(3), Constraint::Length(btn_height)]
384 | |                     }
385 | |                     .as_ref(),
    | |______________________^^^^^^_- this method call resolves to `&T`
    |                        |
    |                        cannot infer type for type parameter `T` declared on the trait `AsRef`
    |
    = note: multiple `impl`s satisfying `Vec<Constraint>: AsRef<_>` found in the `alloc` crate:
            - impl<T, A> AsRef<Vec<T, A>> for Vec<T, A>
              where A: Allocator;
            - impl<T, A> AsRef<[T]> for Vec<T, A>
              where A: Allocator;

error[E0283]: type annotations needed
   --> /home/user/.cargo/registry/src/github.1485827954.workers.dev-1ecc6299db9ec823/bottom-0.6.8/src/canvas.rs:630:59
    |
630 |                         .constraints(self.row_constraints.as_ref())
    |                                      ---------------------^^^^^^--
    |                                      |                    |
    |                                      |                    cannot infer type for type parameter `T` declared on the trait `AsRef`
    |                                      this method call resolves to `&T`
    |
    = note: multiple `impl`s satisfying `Vec<Constraint>: AsRef<_>` found in the `alloc` crate:
            - impl<T, A> AsRef<Vec<T, A>> for Vec<T, A>
              where A: Allocator;
            - impl<T, A> AsRef<[T]> for Vec<T, A>
              where A: Allocator;

For more information about this error, try `rustc --explain E0283`.
error: could not compile `bottom` due to 2 previous errors
error: failed to compile `bottom v0.6.8`, intermediate artifacts can be found at /home/user/.cargo/target`

➜ rustc --version  
rustc 1.61.0-beta.4 (69a6d12e9 2022-04-25)

What is the actual result of the given steps? Be detailed. Please include screenshots if relevant and possible.

What is the expected behaviour?

What do you believe the expected behaviour should be given these steps?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working the way that is expected.upstreamFor issues that depend on an upstream fix/change.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions