rust-paillier
rust-paillier copied to clipboard
Failure to compile frame with nightly compiler
Hello! Exciting framework, I'm trying to do some performance work on Paillier encryption, but I can't seem to compile this framework with the nightly Rust compiler. I followed the steps in the readme, and attempted to compile the framework using cargo build
.
I see that there was one prior issue that was opened and closed related to frame build support (#26 I believe), however I am uncertain if this is the same underlying issue.
Here's my setup:
Default host: x86_64-apple-darwin
installed toolchains
--------------------
stable-x86_64-apple-darwin
nightly-x86_64-apple-darwin (default)
active toolchain
----------------
nightly-x86_64-apple-darwin (default)
rustc 1.35.0-nightly (8159f389f 2019-04-06)
And here's the output of the build command:
$ cargo build
warning: An explicit [[bench]] section is specified in Cargo.toml which currently
disables Cargo from automatically inferring other benchmark targets.
This inference behavior will change in the Rust 2018 edition and the following
files will be included as a benchmark target:
* /Users/ocrickard/src/rust-paillier/benches/helpers.rs
* /Users/ocrickard/src/rust-paillier/benches/macros.rs
This is likely to break cargo build or cargo test as these files may not be
ready to be compiled as a benchmark target today. You can future-proof yourself
and disable this warning by adding `autobenches = false` to your [package]
section. You may also move the files to a location where Cargo would not
automatically infer them to be a target, such as in subfolders.
For more information on this warning you can consult
https://github.com/rust-lang/cargo/issues/5330
Compiling framp v0.3.7
error[E0432]: unresolved import `alloc::heap`
--> /Users/ocrickard/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/mem.rs:18:5
|
18 | use alloc::heap;
| ^^^^^^^^^^^ no `heap` in the root
error[E0433]: failed to resolve: could not find `heap` in `alloc`
--> /Users/ocrickard/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/int.rs:3614:46
|
3614 | ptr: unsafe { Unique::new(alloc::heap::EMPTY as *mut Limb) },
| ^^^^ could not find `heap` in `alloc`
error[E0407]: method `step` is not a member of trait `std::iter::Step`
--> /Users/ocrickard/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/int.rs:3688:5
|
3688 | / fn step(&self, by: &Int) -> Option<Int> {
3689 | | Some(self + by)
3690 | | }
| |_____^ not a member of trait `std::iter::Step`
error[E0407]: method `steps_between_by_one` is not a member of trait `std::iter::Step`
--> /Users/ocrickard/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/int.rs:3707:5
|
3707 | / fn steps_between_by_one(start: &Self, end: &Self) -> Option<usize> {
3708 | | Self::steps_between(start, end, &Self::one())
3709 | | }
| |_____^ not a member of trait `std::iter::Step`
error[E0407]: method `is_negative` is not a member of trait `std::iter::Step`
--> /Users/ocrickard/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/int.rs:3711:5
|
3711 | / fn is_negative(&self) -> bool {
3712 | | self.sign() < 0
3713 | | }
| |_____^ not a member of trait `std::iter::Step`
error[E0658]: use of unstable library feature 'ptr_internals': use NonNull instead and consider PhantomData<T> (if you also use #[may_dangle]), Send, and/or Sync
--> /Users/ocrickard/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/int.rs:32:5
|
32 | use std::ptr::Unique;
| ^^^^^^^^^^^^^^^^
|
= help: add #![feature(ptr_internals)] to the crate attributes to enable
error[E0658]: use of unstable library feature 'raw_vec_internals': implementation detail
--> /Users/ocrickard/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/int.rs:45:5
|
45 | use alloc::raw_vec::RawVec;
| ^^^^^^^^^^^^^^^^^^^^^^
|
= help: add #![feature(raw_vec_internals)] to the crate attributes to enable
error[E0658]: use of unstable library feature 'ptr_internals': use NonNull instead and consider PhantomData<T> (if you also use #[may_dangle]), Send, and/or Sync
--> /Users/ocrickard/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/int.rs:126:10
|
126 | ptr: Unique<Limb>,
| ^^^^^^^^^^^^
|
= help: add #![feature(ptr_internals)] to the crate attributes to enable
error[E0658]: use of unstable library feature 'raw_vec_internals': implementation detail
--> /Users/ocrickard/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/int.rs:155:36
|
155 | fn with_raw_vec<F: FnOnce(&mut RawVec<Limb>)>(&mut self, f: F) {
| ^^^^^^^^^^^^
|
= help: add #![feature(raw_vec_internals)] to the crate attributes to enable
error[E0658]: use of unstable library feature 'raw_vec_internals': implementation detail
--> /Users/ocrickard/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/int.rs:158:27
|
158 | let mut vec = RawVec::from_raw_parts(self.ptr.as_ptr(), old_cap);
| ^^^^^^^^^^^^^^^^^^^^^^
|
= help: add #![feature(raw_vec_internals)] to the crate attributes to enable
error[E0658]: use of unstable library feature 'ptr_internals': use NonNull instead and consider PhantomData<T> (if you also use #[may_dangle]), Send, and/or Sync
--> /Users/ocrickard/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/int.rs:165:24
|
165 | self.ptr = Unique::new(vec.ptr());
| ^^^^^^^^^^^
|
= help: add #![feature(ptr_internals)] to the crate attributes to enable
error[E0658]: use of unstable library feature 'raw_vec_internals': implementation detail
--> /Users/ocrickard/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/int.rs:979:22
|
979 | drop(RawVec::from_raw_parts(self.ptr.as_ptr(),
| ^^^^^^^^^^^^^^^^^^^^^^
|
= help: add #![feature(raw_vec_internals)] to the crate attributes to enable
error[E0658]: use of unstable library feature 'ptr_internals': use NonNull instead and consider PhantomData<T> (if you also use #[may_dangle]), Send, and/or Sync
--> /Users/ocrickard/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/int.rs:3614:27
|
3614 | ptr: unsafe { Unique::new(alloc::heap::EMPTY as *mut Limb) },
| ^^^^^^^^^^^
|
= help: add #![feature(ptr_internals)] to the crate attributes to enable
error[E0050]: method `steps_between` has 3 parameters but the declaration in trait `std::iter::Step::steps_between` has 2
--> /Users/ocrickard/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/int.rs:3692:29
|
3692 | fn steps_between(start: &Int, end: &Int, by: &Int) -> Option<usize> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^ expected 2 parameters, found 3
|
= note: `steps_between` from trait: `fn(&Self, &Self) -> std::option::Option<usize>`
error[E0046]: not all trait items implemented, missing: `add_usize`
--> /Users/ocrickard/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/int.rs:3687:1
|
3687 | impl std::iter::Step for Int {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `add_usize` in implementation
|
= note: `add_usize` from trait: `fn(&Self, usize) -> std::option::Option<Self>`
error: aborting due to 15 previous errors
Some errors occurred: E0046, E0050, E0407, E0432, E0433, E0658.
For more information about an error, try `rustc --explain E0046`.
error: Could not compile `framp`.
To learn more, run the command again with --verbose.
Having the similar issue.
Hi @eNipu ! I am using nightly-x86_64-apple-darwin unchanged - rustc 1.44.0-nightly (94d346360 2020-04-09) and cargo build works fine. Can you help me to reproduce please ?
Hi @omershlo Please check my settings and cargo build log
This is my setting:
cargo 1.50.0-nightly (bfca1cd22 2020-11-24)
rustc 1.50.0-nightly (1c389ffef 2020-11-24)
Log
cargo +nightly build
warning: An explicit [[bench]] section is specified in Cargo.toml which currently
disables Cargo from automatically inferring other benchmark targets.
This inference behavior will change in the Rust 2018 edition and the following
files will be included as a benchmark target:
* /Users/al-amin/Development/Playground/Rust/rust-paillier/benches/helpers.rs
* /Users/al-amin/Development/Playground/Rust/rust-paillier/benches/macros.rs
This is likely to break cargo build or cargo test as these files may not be
ready to be compiled as a benchmark target today. You can future-proof yourself
and disable this warning by adding `autobenches = false` to your [package]
section. You may also move the files to a location where Cargo would not
automatically infer them to be a target, such as in subfolders.
For more information on this warning you can consult
https://github.com/rust-lang/cargo/issues/5330
Updating crates.io index
Compiling autocfg v1.0.1
Compiling libc v0.2.80
Compiling rustc-serialize v0.3.24
Compiling gcc v0.3.55
Compiling rustc-cfg v0.2.0
Compiling ieee754 v0.2.6
Compiling hamming v0.1.3
Compiling num-traits v0.2.14
Compiling num-integer v0.1.44
Compiling rand v0.4.6
Compiling num-traits v0.1.43
Compiling rand v0.3.23
Compiling num-bigint v0.1.44
Compiling framp v0.3.7
error: the legacy LLVM-style asm! syntax is no longer supported
--> /Users/al-amin/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/ll/limb.rs:442:17
|
442 | asm!("mulq $3"
| ^---
| |
| _________________help: replace with: `llvm_asm!`
| |
443 | | : "={rdx}"(high.0), "={rax}"(low.0)
444 | | : "{rax}"(u.0), "r"(v.0));
| |_______________________________________________^
|
= note: consider migrating to the new asm! syntax specified in RFC 2873
= note: alternatively, switch to llvm_asm! to keep your code working as it is
error: the legacy LLVM-style asm! syntax is no longer supported
--> /Users/al-amin/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/ll/limb.rs:526:17
|
526 | asm!("addq $4, $0
| ^---
| |
| _________________help: replace with: `llvm_asm!`
| |
527 | | adcq $5, $1"
528 | | : "=r"(low.0), "=r"(high.0)
529 | | : "0"(al.0), "1"(ah.0), "r"(bl.0), "r"(bh.0));
| |___________________________________________________________________^
|
= note: consider migrating to the new asm! syntax specified in RFC 2873
= note: alternatively, switch to llvm_asm! to keep your code working as it is
error: the legacy LLVM-style asm! syntax is no longer supported
--> /Users/al-amin/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/ll/limb.rs:586:17
|
586 | asm!("subq $4, $0
| ^---
| |
| _________________help: replace with: `llvm_asm!`
| |
587 | | sbbq $5, $1"
588 | | : "=r"(low.0), "=r"(high.0)
589 | | : "0"(al.0), "1"(ah.0), "r"(bl.0), "r"(bh.0));
| |___________________________________________________________________^
|
= note: consider migrating to the new asm! syntax specified in RFC 2873
= note: alternatively, switch to llvm_asm! to keep your code working as it is
error: the legacy LLVM-style asm! syntax is no longer supported
--> /Users/al-amin/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/ll/limb.rs:653:17
|
653 | asm!("divq $4"
| ^---
| |
| _________________help: replace with: `llvm_asm!`
| |
654 | | : "={rdx}"(r.0), "={rax}"(q.0)
655 | | : "0"(nh.0), "1"(nl.0), "r"(d.0));
| |_______________________________________________________^
|
= note: consider migrating to the new asm! syntax specified in RFC 2873
= note: alternatively, switch to llvm_asm! to keep your code working as it is
error[E0432]: unresolved import `alloc::heap`
--> /Users/al-amin/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/mem.rs:18:5
|
18 | use alloc::heap;
| ^^^^^^^^^^^ no `heap` in the root
error[E0433]: failed to resolve: could not find `heap` in `alloc`
--> /Users/al-amin/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/int.rs:3614:46
|
3614 | ptr: unsafe { Unique::new(alloc::heap::EMPTY as *mut Limb) },
| ^^^^ could not find `heap` in `alloc`
error[E0407]: method `step` is not a member of trait `std::iter::Step`
--> /Users/al-amin/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/int.rs:3688:5
|
3688 | / fn step(&self, by: &Int) -> Option<Int> {
3689 | | Some(self + by)
3690 | | }
| |_____^ not a member of trait `std::iter::Step`
error[E0407]: method `steps_between_by_one` is not a member of trait `std::iter::Step`
--> /Users/al-amin/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/int.rs:3707:5
|
3707 | / fn steps_between_by_one(start: &Self, end: &Self) -> Option<usize> {
3708 | | Self::steps_between(start, end, &Self::one())
3709 | | }
| |_____^ not a member of trait `std::iter::Step`
error[E0407]: method `is_negative` is not a member of trait `std::iter::Step`
--> /Users/al-amin/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/int.rs:3711:5
|
3711 | / fn is_negative(&self) -> bool {
3712 | | self.sign() < 0
3713 | | }
| |_____^ not a member of trait `std::iter::Step`
error[E0407]: method `replace_one` is not a member of trait `std::iter::Step`
--> /Users/al-amin/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/int.rs:3715:5
|
3715 | / fn replace_one(&mut self) -> Self {
3716 | | mem::replace(self, Self::one())
3717 | | }
| |_____^ not a member of trait `std::iter::Step`
error[E0407]: method `replace_zero` is not a member of trait `std::iter::Step`
--> /Users/al-amin/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/int.rs:3719:5
|
3719 | / fn replace_zero(&mut self) -> Self {
3720 | | mem::replace(self, Self::zero())
3721 | | }
| |_____^ not a member of trait `std::iter::Step`
error[E0407]: method `add_one` is not a member of trait `std::iter::Step`
--> /Users/al-amin/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/int.rs:3723:5
|
3723 | / fn add_one(&self) -> Self {
3724 | | self + 1
3725 | | }
| |_____^ not a member of trait `std::iter::Step`
error[E0407]: method `sub_one` is not a member of trait `std::iter::Step`
--> /Users/al-amin/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/int.rs:3727:5
|
3727 | / fn sub_one(&self) -> Self {
3728 | | self - 1
3729 | | }
| |_____^ not a member of trait `std::iter::Step`
error[E0658]: use of unstable library feature 'ptr_internals': use `NonNull` instead and consider `PhantomData<T>` (if you also use `#[may_dangle]`), `Send`, and/or `Sync`
--> /Users/al-amin/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/int.rs:32:5
|
32 | use std::ptr::Unique;
| ^^^^^^^^^^^^^^^^
|
= help: add `#![feature(ptr_internals)]` to the crate attributes to enable
error[E0658]: use of unstable library feature 'raw_vec_internals': implementation detail
--> /Users/al-amin/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/int.rs:45:5
|
45 | use alloc::raw_vec::RawVec;
| ^^^^^^^^^^^^^^^^^^^^^^
|
= help: add `#![feature(raw_vec_internals)]` to the crate attributes to enable
error[E0658]: use of unstable library feature 'ptr_internals': use `NonNull` instead and consider `PhantomData<T>` (if you also use `#[may_dangle]`), `Send`, and/or `Sync`
--> /Users/al-amin/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/int.rs:126:10
|
126 | ptr: Unique<Limb>,
| ^^^^^^^^^^^^
|
= help: add `#![feature(ptr_internals)]` to the crate attributes to enable
error[E0658]: use of unstable library feature 'raw_vec_internals': implementation detail
--> /Users/al-amin/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/int.rs:155:36
|
155 | fn with_raw_vec<F: FnOnce(&mut RawVec<Limb>)>(&mut self, f: F) {
| ^^^^^^^^^^^^
|
= help: add `#![feature(raw_vec_internals)]` to the crate attributes to enable
error[E0658]: use of unstable library feature 'raw_vec_internals': implementation detail
--> /Users/al-amin/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/int.rs:158:27
|
158 | let mut vec = RawVec::from_raw_parts(self.ptr.as_ptr(), old_cap);
| ^^^^^^^^^^^^^^^^^^^^^^
|
= help: add `#![feature(raw_vec_internals)]` to the crate attributes to enable
error[E0658]: use of unstable library feature 'ptr_internals': use `NonNull` instead and consider `PhantomData<T>` (if you also use `#[may_dangle]`), `Send`, and/or `Sync`
--> /Users/al-amin/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/int.rs:165:24
|
165 | self.ptr = Unique::new(vec.ptr());
| ^^^^^^^^^^^
|
= help: add `#![feature(ptr_internals)]` to the crate attributes to enable
error[E0658]: use of unstable library feature 'raw_vec_internals': implementation detail
--> /Users/al-amin/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/int.rs:979:22
|
979 | drop(RawVec::from_raw_parts(self.ptr.as_ptr(),
| ^^^^^^^^^^^^^^^^^^^^^^
|
= help: add `#![feature(raw_vec_internals)]` to the crate attributes to enable
error[E0658]: use of unstable library feature 'ptr_internals': use `NonNull` instead and consider `PhantomData<T>` (if you also use `#[may_dangle]`), `Send`, and/or `Sync`
--> /Users/al-amin/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/int.rs:3614:27
|
3614 | ptr: unsafe { Unique::new(alloc::heap::EMPTY as *mut Limb) },
| ^^^^^^^^^^^
|
= help: add `#![feature(ptr_internals)]` to the crate attributes to enable
error[E0200]: the trait `Step` requires an `unsafe impl` declaration
--> /Users/al-amin/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/int.rs:3687:1
|
3687 | / impl std::iter::Step for Int {
3688 | | fn step(&self, by: &Int) -> Option<Int> {
3689 | | Some(self + by)
3690 | | }
... |
3729 | | }
3730 | | }
| |_^
error: aborting due to 22 previous errors
Some errors have detailed explanations: E0200, E0407, E0432, E0433, E0658.
For more information about an error, try `rustc --explain E0200`.
error: could not compile `framp`
To learn more, run the command again with --verbose.
@omershlo I also tried with stable version in Ubuntu 18.04. But similar error log is given.
I guess the framp
compilation is causing the problem.
what OS are you using ?
Distributor ID: Ubuntu
Description: Ubuntu 18.04.5 LTS
Release: 18.04
Codename: bionic
I am using MacOS. Can you try running on Mac ?
@omershlo , Here are the build error logs for MacOS.
Version used
rustc 1.44.0 (49cae5576 2020-06-01)
1.44.0-x86_64-apple-darwin (default)
warning: An explicit [[bench]] section is specified in Cargo.toml which currently
disables Cargo from automatically inferring other benchmark targets.
This inference behavior will change in the Rust 2018 edition and the following
files will be included as a benchmark target:
* /Users/al-amin/Development/Playground/Rust/rust-paillier/benches/helpers.rs
* /Users/al-amin/Development/Playground/Rust/rust-paillier/benches/macros.rs
This is likely to break cargo build or cargo test as these files may not be
ready to be compiled as a benchmark target today. You can future-proof yourself
and disable this warning by adding `autobenches = false` to your [package]
section. You may also move the files to a location where Cargo would not
automatically infer them to be a target, such as in subfolders.
For more information on this warning you can consult
https://github.com/rust-lang/cargo/issues/5330
Compiling autocfg v1.0.1
Compiling libc v0.2.80
Compiling rustc-serialize v0.3.24
Compiling gcc v0.3.55
Compiling rustc-cfg v0.2.0
Compiling hamming v0.1.3
Compiling ieee754 v0.2.6
Compiling num-traits v0.2.14
Compiling num-integer v0.1.44
Compiling rand v0.4.6
Compiling rand v0.3.23
Compiling num-traits v0.1.43
Compiling num-bigint v0.1.44
Compiling framp v0.3.7
error[E0432]: unresolved import `alloc::heap`
--> /Users/al-amin/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/mem.rs:18:5
|
18 | use alloc::heap;
| ^^^^^^^^^^^ no `heap` in the root
error[E0433]: failed to resolve: could not find `heap` in `alloc`
--> /Users/al-amin/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/int.rs:3614:46
|
3614 | ptr: unsafe { Unique::new(alloc::heap::EMPTY as *mut Limb) },
| ^^^^ could not find `heap` in `alloc`
error[E0407]: method `step` is not a member of trait `std::iter::Step`
--> /Users/al-amin/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/int.rs:3688:5
|
3688 | / fn step(&self, by: &Int) -> Option<Int> {
3689 | | Some(self + by)
3690 | | }
| |_____^ not a member of trait `std::iter::Step`
error[E0407]: method `steps_between_by_one` is not a member of trait `std::iter::Step`
--> /Users/al-amin/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/int.rs:3707:5
|
3707 | / fn steps_between_by_one(start: &Self, end: &Self) -> Option<usize> {
3708 | | Self::steps_between(start, end, &Self::one())
3709 | | }
| |_____^ not a member of trait `std::iter::Step`
error[E0407]: method `is_negative` is not a member of trait `std::iter::Step`
--> /Users/al-amin/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/int.rs:3711:5
|
3711 | / fn is_negative(&self) -> bool {
3712 | | self.sign() < 0
3713 | | }
| |_____^ not a member of trait `std::iter::Step`
error[E0554]: `#![feature]` may not be used on the stable release channel
--> /Users/al-amin/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/lib.rs:18:1
|
18 | #![feature(core_intrinsics, asm, heap_api, associated_consts)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0554]: `#![feature]` may not be used on the stable release channel
--> /Users/al-amin/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/lib.rs:19:1
|
19 | #![feature(step_trait, unique, alloc)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0658]: use of unstable library feature 'ptr_internals': use `NonNull` instead and consider `PhantomData<T>` (if you also use `#[may_dangle]`), `Send`, and/or `Sync`
--> /Users/al-amin/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/int.rs:32:5
|
32 | use std::ptr::Unique;
| ^^^^^^^^^^^^^^^^
error[E0658]: use of unstable library feature 'raw_vec_internals': implementation detail
--> /Users/al-amin/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/int.rs:45:5
|
45 | use alloc::raw_vec::RawVec;
| ^^^^^^^^^^^^^^^^^^^^^^
error[E0658]: use of unstable library feature 'ptr_internals': use `NonNull` instead and consider `PhantomData<T>` (if you also use `#[may_dangle]`), `Send`, and/or `Sync`
--> /Users/al-amin/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/int.rs:126:10
|
126 | ptr: Unique<Limb>,
| ^^^^^^^^^^^^
error[E0658]: use of unstable library feature 'raw_vec_internals': implementation detail
--> /Users/al-amin/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/int.rs:155:36
|
155 | fn with_raw_vec<F: FnOnce(&mut RawVec<Limb>)>(&mut self, f: F) {
| ^^^^^^^^^^^^
error[E0658]: use of unstable library feature 'raw_vec_internals': implementation detail
--> /Users/al-amin/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/int.rs:158:27
|
158 | let mut vec = RawVec::from_raw_parts(self.ptr.as_ptr(), old_cap);
| ^^^^^^^^^^^^^^^^^^^^^^
error[E0658]: use of unstable library feature 'ptr_internals': use `NonNull` instead and consider `PhantomData<T>` (if you also use `#[may_dangle]`), `Send`, and/or `Sync`
--> /Users/al-amin/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/int.rs:165:24
|
165 | self.ptr = Unique::new(vec.ptr());
| ^^^^^^^^^^^
error[E0658]: use of unstable library feature 'raw_vec_internals': implementation detail
--> /Users/al-amin/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/int.rs:979:22
|
979 | drop(RawVec::from_raw_parts(self.ptr.as_ptr(),
| ^^^^^^^^^^^^^^^^^^^^^^
error[E0658]: use of unstable library feature 'ptr_internals': use `NonNull` instead and consider `PhantomData<T>` (if you also use `#[may_dangle]`), `Send`, and/or `Sync`
--> /Users/al-amin/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/int.rs:3614:27
|
3614 | ptr: unsafe { Unique::new(alloc::heap::EMPTY as *mut Limb) },
| ^^^^^^^^^^^
error[E0050]: method `steps_between` has 3 parameters but the declaration in trait `std::iter::Step::steps_between` has 2
--> /Users/al-amin/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/int.rs:3692:29
|
3692 | fn steps_between(start: &Int, end: &Int, by: &Int) -> Option<usize> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^ expected 2 parameters, found 3
|
= note: `steps_between` from trait: `fn(&Self, &Self) -> std::option::Option<usize>`
error[E0046]: not all trait items implemented, missing: `add_usize`
--> /Users/al-amin/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/int.rs:3687:1
|
3687 | impl std::iter::Step for Int {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `add_usize` in implementation
|
= help: implement the missing item: `fn add_usize(&self, _: usize) -> std::option::Option<Self> { todo!() }`
error[E0658]: use of unstable library feature 'ptr_internals'
--> /Users/al-amin/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/int.rs:144:20
|
144 | *i.ptr.as_ptr() = limb;
| ^^^^^^
error[E0658]: use of unstable library feature 'ptr_internals'
--> /Users/al-amin/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/int.rs:158:59
|
158 | let mut vec = RawVec::from_raw_parts(self.ptr.as_ptr(), old_cap);
| ^^^^^^
error[E0658]: use of unstable library feature 'ptr_internals'
--> /Users/al-amin/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/int.rs:165:24
|
165 | self.ptr = Unique::new(vec.ptr());
| ^^^^^^^^^^^
error[E0658]: use of unstable library feature 'raw_vec_internals': implementation detail
--> /Users/al-amin/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/int.rs:165:40
|
165 | self.ptr = Unique::new(vec.ptr());
| ^^^
error[E0308]: mismatched types
--> /Users/al-amin/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/int.rs:165:24
|
165 | self.ptr = Unique::new(vec.ptr());
| ^^^^^^^^^^^^^^^^^^^^^^ expected struct `std::ptr::Unique`, found enum `std::option::Option`
|
= note: expected struct `std::ptr::Unique<_>`
found enum `std::option::Option<std::ptr::Unique<_>>`
error[E0599]: no method named `cap` found for struct `alloc::raw_vec::RawVec<ll::limb::Limb>` in the current scope
--> /Users/al-amin/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/int.rs:166:31
|
166 | let new_cap = vec.cap();
| ^^^ private field, not a method
error[E0658]: use of unstable library feature 'raw_vec_internals': implementation detail
--> /Users/al-amin/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/int.rs:187:36
|
187 | ret.with_raw_vec(|v| v.reserve_exact(0, cap as usize))
| ^^^^^^^^^^^^^
error[E0658]: use of unstable library feature 'ptr_internals'
--> /Users/al-amin/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/int.rs:224:39
|
224 | return unsafe { *self.ptr.as_ref() };
| ^^^^^^
error[E0658]: use of unstable library feature 'raw_vec_internals': implementation detail
--> /Users/al-amin/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/int.rs:288:15
|
288 | v.shrink_to_fit(size);
| ^^^^^^^^^^^^^
error[E0658]: use of unstable library feature 'ptr_internals'
--> /Users/al-amin/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/int.rs:631:53
|
631 | std::slice::from_raw_parts(self.ptr.as_ref() as *const _ as *const u8,
| ^^^^^^
error[E0658]: use of unstable library feature 'ptr_internals'
--> /Users/al-amin/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/int.rs:740:33
|
740 | Limbs::new(self.ptr.as_ref(), 0, self.abs_size())
| ^^^^^^
error[E0658]: use of unstable library feature 'ptr_internals'
--> /Users/al-amin/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/int.rs:746:36
|
746 | LimbsMut::new(self.ptr.as_ptr(), 0, self.abs_size())
| ^^^^^^
error[E0658]: use of unstable library feature 'ptr_internals'
--> /Users/al-amin/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/int.rs:751:32
|
751 | LimbsMut::new(self.ptr.as_ptr(), 0, self.cap as i32)
| ^^^^^^
error[E0658]: use of unstable library feature 'raw_vec_internals': implementation detail
--> /Users/al-amin/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/int.rs:758:19
|
758 | v.reserve_exact(old_cap, cap as usize - old_cap)
| ^^^^^^^^^^^^^
error[E0658]: use of unstable library feature 'ptr_internals'
--> /Users/al-amin/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/int.rs:787:27
|
787 | *self.ptr.as_ptr().offset((self.abs_size() - 1) as isize) == 0 {
| ^^^^^^
error[E0658]: use of unstable library feature 'ptr_internals'
--> /Users/al-amin/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/int.rs:807:23
|
807 | *self.ptr.as_ptr().offset((self.abs_size() - 1) as isize)
| ^^^^^^
error[E0658]: use of unstable library feature 'ptr_internals'
--> /Users/al-amin/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/int.rs:979:54
|
979 | drop(RawVec::from_raw_parts(self.ptr.as_ptr(),
| ^^^^^^
error[E0658]: use of unstable library feature 'ptr_internals'
--> /Users/al-amin/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/int.rs:3565:55
|
3565 | let higher = unsafe { (*i.ptr.as_ptr().offset(1)).0 } as $t;
| ^^^^^^
...
3608 | impl_from_for_prim!(signed i8, i16, i32, i64, isize);
| ------------------------------------------------------- in this macro invocation
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0658]: use of unstable library feature 'ptr_internals'
--> /Users/al-amin/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/int.rs:3593:55
|
3593 | let higher = unsafe { (*i.ptr.as_ptr().offset(1)).0 } as $t;
| ^^^^^^
...
3609 | impl_from_for_prim!(unsigned u8, u16, u32, u64, usize);
| ------------------------------------------------------- in this macro invocation
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0658]: use of unstable library feature 'ptr_internals'
--> /Users/al-amin/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/int.rs:3614:27
|
3614 | ptr: unsafe { Unique::new(alloc::heap::EMPTY as *mut Limb) },
| ^^^^^^^^^^^
error[E0308]: mismatched types
--> /Users/al-amin/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/int.rs:3614:27
|
3614 | ptr: unsafe { Unique::new(alloc::heap::EMPTY as *mut Limb) },
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `std::ptr::Unique`, found enum `std::option::Option`
|
= note: expected struct `std::ptr::Unique<ll::limb::Limb>`
found enum `std::option::Option<std::ptr::Unique<_>>`
error[E0061]: this function takes 2 arguments but 3 arguments were supplied
--> /Users/al-amin/.cargo/registry/src/github.com-1ecc6299db9ec823/framp-0.3.7/src/int.rs:3708:9
|
3708 | Self::steps_between(start, end, &Self::one())
| ^^^^^^^^^^^^^^^^^^^ ----- --- ------------ supplied 3 arguments
| |
| expected 2 arguments
error: aborting due to 39 previous errors
Some errors have detailed explanations: E0046, E0050, E0061, E0308, E0407, E0432, E0433, E0554, E0599...
For more information about an error, try `rustc --explain E0046`.
error: could not compile `framp`.
To learn more, run the command again with --verbose.
can you move to nightly on Mac ? Since I am failing to reproduce - can we chat over telegram to iterate faster? my user name: Omershlo