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

Build fails with rustc 1.80.1 #119

Open
jonathan-conder opened this issue Aug 18, 2024 · 4 comments · Fixed by NixOS/nixpkgs#335518
Open

Build fails with rustc 1.80.1 #119

jonathan-conder opened this issue Aug 18, 2024 · 4 comments · Fixed by NixOS/nixpkgs#335518
Labels
bug Something isn't working

Comments

@jonathan-conder
Copy link

Describe the bug

error[E0282]: type annotations needed
   --> src/ui.rs:388:26
    |
388 |                         .collect::<Box<_>>()
    |                          ^^^^^^^ cannot infer type of the type parameter `B` declared on the method `collect`
389 |                         .join(" ")
    |                          ---- type must be known at this point
    |
help: consider specifying the generic argument
    |
388 |                         .collect::<Vec<_>>()
    |                                 ~~~~~~~~~~

For more information about this error, try `rustc --explain E0282`.
error: could not compile `nvim-gtk` (bin "nvim-gtk") due to 1 previous error

Seems to be related to rust-lang/rust#127343

Possible fix:

diff -ru a/src/ui.rs b/src/ui.rs
--- a/src/ui.rs
+++ b/src/ui.rs
@@ -385,7 +386,7 @@
                     files_list
                         .iter()
                         .map(|f| misc::escape_filename(f))
-                        .collect::<Box<_>>()
+                        .collect::<Box<[_]>>()
                         .join(" ")
                 ));
             } else {

Technical information (please complete the following information):

  • OS: NixOS unstable
  • Neovim version: 0.10.1
  • Neovim-Gtk build version: 1.0.4
@Lyude
Copy link
Owner

Lyude commented Sep 10, 2024

Hi - this fix looks fine to me, would you mind filing an MR?

@Lyude Lyude added the bug Something isn't working label Sep 10, 2024
@Lyude
Copy link
Owner

Lyude commented Sep 10, 2024

...also - I had no idea distros had actually started packaging this - I'm going to actually put something on my schedule to check github more often then :). Sorry about the delay!

@jonathan-conder
Copy link
Author

It looks like this is already fixed on the main branch, so if anything this is more of a request to make a new release

@jonathan-conder
Copy link
Author

There's no rush though, I already added this patch to the nix package. But would be nice to be able to remove that at some point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants