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

Feature const_convert no longer available with rust 1.69 nightly #1

Closed
afternoon opened this issue Apr 23, 2023 · 3 comments
Closed

Comments

@afternoon
Copy link

afternoon commented Apr 23, 2023

Hi, thanks for building this. I just got a NeoKey1x4, which I'm working on adding to my project.

I'm getting the following error building 0.5.0 (14dc5a):

error[E0635]: unknown feature `const_convert`
 --> src/lib.rs:3:27
  |
3 | #![feature(array_try_map, const_convert, const_trait_impl, generic_const_exprs)]
  |                           ^^^^^^^^^^^^^

error: const `impl` for trait `From` which is not marked with `#[const_trait]`
 --> src/common.rs:9:12
  |
9 | impl const From<HardwareId> for u8 {
  |            ^^^^^^^^^^^^^^^^
  |
  = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
  = note: adding a non-const method body in the future would be a breaking change

error: const `impl` for trait `From` which is not marked with `#[const_trait]`
  --> src/common.rs:36:12
   |
36 | impl const From<Modules> for u8 {
   |            ^^^^^^^^^^^^^
   |
   = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
   = note: adding a non-const method body in the future would be a breaking change

error: const `impl` for trait `From` which is not marked with `#[const_trait]`
   --> src/modules/gpio.rs:152:12
    |
152 | impl const From<PinMode> for u8 {
    |            ^^^^^^^^^^^^^
    |
    = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
    = note: adding a non-const method body in the future would be a breaking change

error: const `impl` for trait `From` which is not marked with `#[const_trait]`
   --> src/modules/gpio.rs:171:12
    |
171 | impl const From<InterruptMode> for u8 {
    |            ^^^^^^^^^^^^^^^^^^^
    |
    = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
    = note: adding a non-const method body in the future would be a breaking change

A recent comment on rust-lang/rust#88674 suggests that the const_convert feature has been removed.

@afternoon afternoon changed the title Not compiling with rust 1.69 nightly Feature const_convert no longer available with rust 1.69 nightly Apr 23, 2023
@afternoon afternoon changed the title Feature const_convert no longer available with rust 1.69 nightly Feature const_convert no longer available with rust 1.69 nightly Apr 23, 2023
@eflukx
Copy link

eflukx commented Jun 13, 2023

For me this works for now by pinning the rust version to 1.70.0-nightly

rustup override set nightly-2023-04-14-x86_64-unknown-linux-gnu

@afternoon
Copy link
Author

Ah, that's a mistake on my part. I'm using nightly for the project that uses this crate.

This PR can probably sit on hold until the changes make it to stable Rust.

@alexeden
Copy link
Owner

Sorry for the delay. Just published 0.5.1 which removes the use of the const_convert feature.

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

3 participants