-
Notifications
You must be signed in to change notification settings - Fork 172
Description
Issue summary
I'm trying to compile the project on Debian Buster with Default Rust Compiler 1.41.1
$ uname -a
Linux <hostname> 4.19.0-8-amd64 #1 SMP Debian 4.19.98-1+deb10u1 (2020-04-27) x86_64 GNU/Linux
$ rustc --version
rustc 1.41.1
This fails at the Crate bs58
with Error E0658
:
$ cargo build
[...]
Compiling bs58 v0.4.0
error[E0658]: `while` is not allowed in a `const fn`
--> /path/to/home/.cargo/registry/src/github.com-1ecc6299db9ec823/bs58-0.4.0/src/alphabet.rs:107:9
|
107 | / while i < encode.len() {
108 | | if base[i] >= 128 {
109 | | return Err(Error::NonAsciiCharacter { index: i });
110 | | }
... |
120 | | i += 1;
121 | | }
| |_________^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/52000
The GitHub Reference takes me to the Pull Request
Milestone 1.46 Pull Request
So, I understand this Error as the Crate bs58
requires at least rustc 1.46
to compile which only was released in August 2020.
The Project Documentation states that it only requires rustc 1.40
to compile. So, it should compile with the Default Debian Rust Compiler.
(I found most Ubuntu Distributions ship already Rust 1.47 but Debian Buster still ships the older version.)
Other information and links
$ rustc --explain E0658|more
An unstable feature was used.
Erroneous code example:
"
#[repr(u128)] // error: use of unstable library feature 'repr128'
enum Foo {
Bar(u64),
}
"
If you're using a stable or a beta version of rustc, you won't be able to use
any unstable features. In order to do so, please switch to a nightly version of
rustc (by using rustup).
If you're using a nightly version of rustc, just add the corresponding feature
to be able to use it:
"
#![feature(repr128)]
#[repr(u128)] // ok!
enum Foo {
Bar(u64),
}
"
The GitHub Reference takes me to the Pull Request
Milestone 1.46 Pull Request
Debian Buster Default Rust Compiler
Debian Buster Rust Package