ppmathis / const-bitfield Goto Github PK
View Code? Open in Web Editor NEWBitfield-like structures with const support for Rust
License: Apache License 2.0
Bitfield-like structures with const support for Rust
License: Apache License 2.0
I am using this crate in an osdev project, and after upgrading rustc
form version 1.62.0-beta
to 1.66.0-beta
the lib stopped working.
Error dump:
error: const `impl` for trait `Bit` which is not marked with `#[const_trait]`
--> /home/filip/.cargo/registry/src/github.com-1ecc6299db9ec823/const-bitfield-0.2.1/src/lib.rs:237:36
|
226 | pub trait Bit {
| - help: mark `Bit` as const: `#[const_trait]`
...
237 | impl<T: ~const BitRange<u8>> const Bit for T {
| ^^^
|
= 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 can only be applied to `#[const_trait]` traits
--> /home/filip/.cargo/registry/src/github.com-1ecc6299db9ec823/const-bitfield-0.2.1/src/lib.rs:237:16
|
237 | impl<T: ~const BitRange<u8>> const Bit for T {
| ^^^^^^^^^^^^
error: const `impl` for trait `BitMut` which is not marked with `#[const_trait]`
--> /home/filip/.cargo/registry/src/github.com-1ecc6299db9ec823/const-bitfield-0.2.1/src/lib.rs:243:61
|
232 | pub trait BitMut: Bit {
| - help: mark `BitMut` as const: `#[const_trait]`
...
243 | impl<T: ~const BitRange<u8> + ~const BitRangeMut<u8>> const BitMut for T {
| ^^^^^^
|
= 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 can only be applied to `#[const_trait]` traits
--> /home/filip/.cargo/registry/src/github.com-1ecc6299db9ec823/const-bitfield-0.2.1/src/lib.rs:243:16
|
243 | impl<T: ~const BitRange<u8> + ~const BitRangeMut<u8>> const BitMut for T {
| ^^^^^^^^^^^^
error: ~const can only be applied to `#[const_trait]` traits
--> /home/filip/.cargo/registry/src/github.com-1ecc6299db9ec823/const-bitfield-0.2.1/src/lib.rs:243:38
|
243 | impl<T: ~const BitRange<u8> + ~const BitRangeMut<u8>> const BitMut for T {
| ^^^^^^^^^^^^^^^
error: const `impl` for trait `BitRange` which is not marked with `#[const_trait]`
--> /home/filip/.cargo/registry/src/github.com-1ecc6299db9ec823/const-bitfield-0.2.1/src/lib.rs:263:20
|
214 | pub trait BitRange<V> {
| - help: mark `BitRange` as const: `#[const_trait]`
...
263 | impl const BitRange<$range_type> for $storage_type {
| ^^^^^^^^^^^^^^^^^^^^^
...
317 | impl_bitrange! {uint, (u8, u16, u32, u64, u128), (u8, u16, u32, u64, u128)}
| --------------------------------------------------------------------------- in this macro invocation
|
= 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
= note: this error originates in the macro `impl_bitrange` (in Nightly builds, run with -Z macro-backtrace for more info)
error: const `impl` for trait `BitRangeMut` which is not marked with `#[const_trait]`
--> /home/filip/.cargo/registry/src/github.com-1ecc6299db9ec823/const-bitfield-0.2.1/src/lib.rs:284:20
|
220 | pub trait BitRangeMut<V>: BitRange<V> {
| - help: mark `BitRangeMut` as const: `#[const_trait]`
...
284 | impl const BitRangeMut<$range_type> for $storage_type {
| ^^^^^^^^^^^^^^^^^^^^^^^^
...
317 | impl_bitrange! {uint, (u8, u16, u32, u64, u128), (u8, u16, u32, u64, u128)}
| --------------------------------------------------------------------------- in this macro invocation
|
= 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
= note: this error originates in the macro `impl_bitrange` (in Nightly builds, run with -Z macro-backtrace for more info)
error: const `impl` for trait `BitRange` which is not marked with `#[const_trait]`
--> /home/filip/.cargo/registry/src/github.com-1ecc6299db9ec823/const-bitfield-0.2.1/src/lib.rs:263:20
|
214 | pub trait BitRange<V> {
| - help: mark `BitRange` as const: `#[const_trait]`
...
263 | impl const BitRange<$range_type> for $storage_type {
| ^^^^^^^^^^^^^^^^^^^^^
...
318 | impl_bitrange! {uint, (u8, u16, u32, u64, u128), (i8, i16, i32, i64, i128)}
| --------------------------------------------------------------------------- in this macro invocation
|
= 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
= note: this error originates in the macro `impl_bitrange` (in Nightly builds, run with -Z macro-backtrace for more info)
error: const `impl` for trait `BitRangeMut` which is not marked with `#[const_trait]`
--> /home/filip/.cargo/registry/src/github.com-1ecc6299db9ec823/const-bitfield-0.2.1/src/lib.rs:284:20
|
220 | pub trait BitRangeMut<V>: BitRange<V> {
| - help: mark `BitRangeMut` as const: `#[const_trait]`
...
284 | impl const BitRangeMut<$range_type> for $storage_type {
| ^^^^^^^^^^^^^^^^^^^^^^^^
...
318 | impl_bitrange! {uint, (u8, u16, u32, u64, u128), (i8, i16, i32, i64, i128)}
| --------------------------------------------------------------------------- in this macro invocation
|
= 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
= note: this error originates in the macro `impl_bitrange` (in Nightly builds, run with -Z macro-backtrace for more info)
error: could not compile `const-bitfield` due to 105 previous errors
@ppmathis Are you still maintaining this project or should i find a different solution?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.