You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)]structX(u32);implconst core::ops::Add<u32>forX{typeOutput = u32;fnadd(self,other:u32) -> u32{self.0 + other
}}fnmain(){let y = X(2);println!("{}", y + 1u32);}
The text was updated successfully, but these errors were encountered:
This shouldn't be caused by RA, at least it seems suprising to me. I wonder if this is rustfmt eating that up for some reason, assuming you have format on save enabled 🤔
That seems to be a rustfmt issue
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 theimpl const
and even erase the const on saving.The text was updated successfully, but these errors were encountered: