No longer compiles
BHouwens opened this issue · 3 comments
BHouwens commented
Maintenance on open source stuff is tough, so while I open this issue I also understand that it might not be possible to solve these problems right away and I'm happy to help with a PR if someone can point me in the right direction.
It seems that this library relies on traits in the std
and heap
libraries that have since been made unstable or deprecated, and as a result it doesn't compile
vks commented
ramp
only works on nightly, see the README:
NOTE Due to use of unstable features (notably inline assembly), Ramp can only be compiled with a nightly build of rustc.
frol commented
rustc 1.27.0-nightly (66363b288 2018-04-28)
$ cargo +nightly build
Compiling num-traits v0.2.2
Compiling libc v0.2.40
Compiling rustc-serialize v0.3.24
Compiling gcc v0.3.54
Compiling rustc-cfg v0.2.0
Compiling hamming v0.1.3
Compiling ieee754 v0.2.2
Compiling rand v0.4.2
Compiling num-integer v0.1.36
Compiling num-traits v0.1.43
Compiling rand v0.3.22
Compiling num-bigint v0.1.43
Compiling ramp v0.3.12
error[E0308]: mismatched types
--> /home/frol/.cargo/registry/src/github.com-1ecc6299db9ec823/ramp-0.3.12/src/mem.rs:33:12
|
33 | if let Some(l) = allocator::Layout::from_size_align(size, alignment) {
| ^^^^^^^ expected enum `std::result::Result`, found enum `std::option::Option`
|
= note: expected type `std::result::Result<std::heap::Layout, std::heap::LayoutErr>`
found type `std::option::Option<_>`
error[E0308]: mismatched types
--> /home/frol/.cargo/registry/src/github.com-1ecc6299db9ec823/ramp-0.3.12/src/mem.rs:58:22
|
58 | ptr::write_bytes(ret, 0, size);
| ^^^ expected *-ptr, found struct `std::ptr::NonNull`
|
= note: expected type `*mut _`
found type `std::ptr::NonNull<std::heap::Opaque>`
error[E0308]: mismatched types
--> /home/frol/.cargo/registry/src/github.com-1ecc6299db9ec823/ramp-0.3.12/src/mem.rs:59:5
|
45 | pub unsafe fn allocate_bytes(size: usize) -> *mut u8 {
| ------- expected `*mut u8` because of return type
...
59 | ret
| ^^^ expected *-ptr, found struct `std::ptr::NonNull`
|
= note: expected type `*mut u8`
found type `std::ptr::NonNull<std::heap::Opaque>`
error[E0308]: mismatched types
--> /home/frol/.cargo/registry/src/github.com-1ecc6299db9ec823/ramp-0.3.12/src/mem.rs:64:24
|
64 | heap::Heap.dealloc(ptr, layout);
| ^^^ expected struct `std::ptr::NonNull`, found *-ptr
|
= note: expected type `std::ptr::NonNull<std::heap::Opaque>`
found type `*mut u8`
error: aborting due to 4 previous errors
For more information about this error, try `rustc --explain E0308`.
error: Could not compile `ramp`.
rozbb commented
Version 0.3.13 compiles as of Jun 16, 2018. I'm sorry for taking so long to respond to all this.