2025-02-20 17:04:36 +01:00
|
|
|
#![feature(const_trait_impl)]
|
2022-03-06 18:38:42 -08:00
|
|
|
|
|
|
|
|
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();
|
2025-01-15 09:21:51 +01:00
|
|
|
//~^ ERROR: cannot call
|
2022-03-06 18:38:42 -08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn main() {}
|