rust-paillier icon indicating copy to clipboard operation
rust-paillier copied to clipboard

The release 0.1.7 [cargo check] is giving the following errors

Open eNipu opened this issue 3 years ago • 1 comments

 $cargo check
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/Downloads/rust-paillier-0.1.7/benches/helpers.rs
* /Users/al-amin/Downloads/rust-paillier-0.1.7/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
    Checking hamming v0.1.3
    Checking ieee754 v0.2.6
   Compiling num-traits v0.2.14
   Compiling num-integer v0.1.44
    Checking rand v0.4.6
    Checking num-traits v0.1.43
    Checking 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[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[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 24 previous errors

Some errors have detailed explanations: E0200, E0407, E0432, E0433, E0554, 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.

eNipu avatar Dec 02 '20 04:12 eNipu

have you figure this issue?

rowlanja avatar Sep 07 '22 09:09 rowlanja