This feature was approved for stabilization in https://github.com/rust-lang/rust/issues/129041#issuecomment-2508940661 so this change stabilizes it.
15 lines
237 B
Rust
15 lines
237 B
Rust
#![feature(const_trait_impl)]
|
|
|
|
struct Foo<'a> {
|
|
bar: &'a mut Vec<usize>,
|
|
}
|
|
|
|
impl<'a> Foo<'a> {
|
|
const fn spam(&mut self, baz: &mut Vec<u32>) {
|
|
self.bar[0] = baz.len();
|
|
//~^ ERROR: cannot call
|
|
}
|
|
}
|
|
|
|
fn main() {}
|