rust/tests/ui/consts/issue-94675.rs
2024-09-15 09:51:32 +02:00

19 lines
347 B
Rust

//@ known-bug: #103507
#![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();
//FIXME ~^ ERROR: cannot call
//FIXME ~| ERROR: cannot call
//FIXME ~| ERROR: the trait bound
}
}
fn main() {}