2022-03-06 20:38:42 -06:00
|
|
|
#![feature(const_trait_impl, const_mut_refs)]
|
|
|
|
|
|
|
|
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();
|
2022-08-28 01:27:31 -05:00
|
|
|
//~^ the trait bound `Vec<usize>: ~const Index<_>` is not satisfied
|
|
|
|
//~| the trait bound `Vec<usize>: ~const IndexMut<usize>` is not satisfied
|
2022-03-06 20:38:42 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|