I have a build action that uses the latest nightly to build. I was using nightly toolchain version 2023-03-12 and everything was working. Then I noticed my GitHub action started failing the build and complaining about the feature const_ops not existing. I understand this is part of working with nightly, I'm not complaining about it breaking, just wondering what happened to the feature const_ops? Did it get renamed to something else or removed entirely?
Edit: I forgot to add that I checked Github and saw that the issue was closed, then reopened and that someone added the label const_trait_impl to it. I don't know if that means that const_trait_impl is supposed to enable const_ops. I know it doesn't as adding the feature does not enable const_ops. I have edited the code snippet to demonstrate this. Also, this code is pulled from an actual code base and was modified for simplicity, I realize that as is this is a completely silly and pointless function.
Example code to reproduce the issue.
Compiles with nightly-2023-03-12-{arch}
#![feature(const_ops, const_slice_index, const_trait_impl)]
#[must_use]
pub const fn get_data_length(msg: &[u8]) -> usize {
msg[1..msg.len() - 1].len()
}
fn main() {
let msg = [0x01, 0x02, 0x03];
let _ = get_data_length(msg.as_slice());
}
Fails to compile on nightly-2023-04-19-{arch}
cargo b
Compiling const_ops_question v0.1.0 (/Users/pittengermdp/development/const_ops_question)
error[E0635]: unknown feature `const_ops`
--> src/main.rs:1:12
|
1 | #![feature(const_ops)]
| ^^^^^^^^^
For more information about this error, try `rustc --explain E0635`.
error: could not compile `const_ops_question` (bin "const_ops_question") due to previous error