Hi,
experimental feature const_trait_impl is treated as a syntax error by rust-analyzer. For example, on nightly, the following compiles, but rust-analyzer would complain about the impl const and even erase the const on saving.
#![allow(incomplete_features)]
#![feature(const_trait_impl)]
struct X(u32);
impl const core::ops::Add<u32> for X {
type Output = u32;
fn add(self, other: u32) -> u32 {
self.0 + other
}
}
fn main(){
let y = X(2);
println!("{}", y + 1u32);
}
Hi,
experimental feature
const_trait_implis treated as a syntax error by rust-analyzer. For example, on nightly, the following compiles, but rust-analyzer would complain about theimpl constand even erase the const on saving.