vhakulinen / gnvim

GUI for neovim, without any web bloat
MIT License
1.86k stars 68 forks source link

build error error[E0658]: deriving `Default` on enums is experimental #200

Closed djacobow closed 1 year ago

djacobow commented 1 year ago

Error building on Ubuntu 22.04.1 using rust from apt.

david@cavalier:~/build/gnvim$ lsb_release -a 
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.1 LTS
Release:    22.04
Codename:   jammy
david@cavalier:~/build/gnvim$ rustc --version
rustc 1.61.0
david@cavalier:~/build/gnvim$ make build
cargo build --release
   Compiling nvim-rs v0.1.0 (/home/david/build/gnvim/lib/nvim-rs)
   Compiling gsk4-sys v0.4.2
   Compiling gtk4-sys v0.4.5
   Compiling gobject-sys v0.15.10
   Compiling cairo-sys-rs v0.15.1
   Compiling graphene-sys v0.15.10
   Compiling gio-sys v0.15.10
   Compiling glib v0.15.12
   Compiling pango-sys v0.15.10
error[E0658]: deriving `Default` on enums is experimental
 --> lib/nvim-rs/src/types/manual.rs:1:30
  |
1 | #[derive(Debug, Clone, Copy, Default)]
  |                              ^^^^^^^
  |
  = note: see issue #86985 <https://github.com/rust-lang/rust/issues/86985> for more information
  = note: this error originates in the derive macro `Default` (in Nightly builds, run with -Z macro-backtrace for more info)

   Compiling gdk-pixbuf-sys v0.15.10
   Compiling gdk4-sys v0.4.2
For more information about this error, try `rustc --explain E0658`.
error: could not compile `nvim-rs` due to previous error
warning: build failed, waiting for other jobs to finish...
make: *** [Makefile:6: build] Error 101
vhakulinen commented 1 year ago

You need newer rust version. The Default derive for enums was introduced in rust 1.62.

dup of #195