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

Missing crate attribute #[feature(maybe_uninit) #16

Closed
cireu opened this issue Jul 20, 2019 · 3 comments
Closed

Missing crate attribute #[feature(maybe_uninit) #16

cireu opened this issue Jul 20, 2019 · 3 comments

Comments

@cireu
Copy link
Contributor

cireu commented Jul 20, 2019

cargo build
    Updating `git://mirrors.ustc.edu.cn/crates.io-index` index
    Blocking waiting for file lock on package cache lock
    Blocking waiting for file lock on package cache lock
   Compiling emacs v0.10.1
error[E0658]: use of unstable library feature 'maybe_uninit'
 --> /home/chino/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/emacs-0.10.1/src/error.rs:4:5
  |
4 | use std::mem::MaybeUninit;
  |     ^^^^^^^^^^^^^^^^^^^^^
  |
  = note: for more information, see https://github.com/rust-lang/rust/issues/53491
  = help: add #![feature(maybe_uninit)] to the crate attributes to enable

error[E0658]: use of unstable library feature 'maybe_uninit'
   --> /home/chino/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/emacs-0.10.1/src/error.rs:111:26
    |
111 |         let mut symbol = MaybeUninit::uninit();
    |                          ^^^^^^^^^^^^^^^^^^^
    |
    = note: for more information, see https://github.com/rust-lang/rust/issues/53491
    = help: add #![feature(maybe_uninit)] to the crate attributes to enable

error[E0658]: use of unstable library feature 'maybe_uninit'
   --> /home/chino/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/emacs-0.10.1/src/error.rs:112:24
    |
112 |         let mut data = MaybeUninit::uninit();
    |                        ^^^^^^^^^^^^^^^^^^^
    |
    = note: for more information, see https://github.com/rust-lang/rust/issues/53491
    = help: add #![feature(maybe_uninit)] to the crate attributes to enable

error[E0658]: use of unstable library feature 'maybe_uninit'
   --> /home/chino/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/emacs-0.10.1/src/error.rs:213:22
    |
213 |         symbol: &mut MaybeUninit<emacs_value>,
    |                      ^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: for more information, see https://github.com/rust-lang/rust/issues/53491
    = help: add #![feature(maybe_uninit)] to the crate attributes to enable

error[E0658]: use of unstable library feature 'maybe_uninit'
   --> /home/chino/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/emacs-0.10.1/src/error.rs:214:20
    |
214 |         data: &mut MaybeUninit<emacs_value>,
    |                    ^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: for more information, see https://github.com/rust-lang/rust/issues/53491
    = help: add #![feature(maybe_uninit)] to the crate attributes to enable

error[E0658]: use of unstable library feature 'maybe_uninit'
   --> /home/chino/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/emacs-0.10.1/src/error.rs:120:60
    |
120 |                     symbol: unsafe { TempValue::new(symbol.assume_init()) },
    |                                                            ^^^^^^^^^^^
    |
    = note: for more information, see https://github.com/rust-lang/rust/issues/53491
    = help: add #![feature(maybe_uninit)] to the crate attributes to enable

error[E0658]: use of unstable library feature 'maybe_uninit'
   --> /home/chino/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/emacs-0.10.1/src/error.rs:121:56
    |
121 |                     data: unsafe { TempValue::new(data.assume_init()) },
    |                                                        ^^^^^^^^^^^
    |
    = note: for more information, see https://github.com/rust-lang/rust/issues/53491
    = help: add #![feature(maybe_uninit)] to the crate attributes to enable

error[E0658]: use of unstable library feature 'maybe_uninit'
   --> /home/chino/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/emacs-0.10.1/src/error.rs:128:54
    |
128 |                     tag: unsafe { TempValue::new(tag.assume_init()) },
    |                                                      ^^^^^^^^^^^
    |
    = note: for more information, see https://github.com/rust-lang/rust/issues/53491
    = help: add #![feature(maybe_uninit)] to the crate attributes to enable

error[E0658]: use of unstable library feature 'maybe_uninit'
   --> /home/chino/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/emacs-0.10.1/src/error.rs:129:58
    |
129 |                     value: unsafe { TempValue::new(value.assume_init()) },
    |                                                          ^^^^^^^^^^^
    |
    = note: for more information, see https://github.com/rust-lang/rust/issues/53491
    = help: add #![feature(maybe_uninit)] to the crate attributes to enable

error[E0658]: use of unstable library feature 'maybe_uninit'
   --> /home/chino/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/emacs-0.10.1/src/error.rs:216:60
    |
216 |         raw_call_no_exit!(self, non_local_exit_get, symbol.as_mut_ptr(), data.as_mut_ptr())
    |                                                            ^^^^^^^^^^
    |
    = note: for more information, see https://github.com/rust-lang/rust/issues/53491
    = help: add #![feature(maybe_uninit)] to the crate attributes to enable

error[E0658]: use of unstable library feature 'maybe_uninit'
   --> /home/chino/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/emacs-0.10.1/src/error.rs:216:79
    |
216 |         raw_call_no_exit!(self, non_local_exit_get, symbol.as_mut_ptr(), data.as_mut_ptr())
    |                                                                               ^^^^^^^^^^
    |
    = note: for more information, see https://github.com/rust-lang/rust/issues/53491
    = help: add #![feature(maybe_uninit)] to the crate attributes to enable

error: aborting due to 11 previous errors
@ubolonton
Copy link
Owner

I forgot that mem::MaybeUninit is new in 1.36.

Can you upgrade to Rust 1.36? If not, I'll try to revert back to mem::uninitialized for compatibility with older Rust (I prefer not to though, as it's considered UB).

@cireu
Copy link
Contributor Author

cireu commented Jul 20, 2019

I'am using Rust 1.36, but it still report this error.

I think the key point of this issue is the #[feature(maybe_uninit)] is needed in crate to ask rustc
enable this feature. I try to add it whether in src/lib.rs or src/error.rs, but it doesn't work.

@cireu
Copy link
Contributor Author

cireu commented Jul 20, 2019

Plz ignore above comment! I found I'm using 1.35 (2019-05 ver) but cargo --version reports 1.36

@cireu cireu closed this as completed Jul 20, 2019
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