]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/issue-94675.rs
Auto merge of #106025 - matthiaskrgr:rollup-vz5rqah, r=matthiaskrgr
[rust.git] / src / test / ui / consts / issue-94675.rs
1 #![feature(const_trait_impl, const_mut_refs)]
2
3 struct Foo<'a> {
4     bar: &'a mut Vec<usize>,
5 }
6
7 impl<'a> Foo<'a> {
8     const fn spam(&mut self, baz: &mut Vec<u32>) {
9         self.bar[0] = baz.len();
10         //~^ the trait bound `Vec<usize>: ~const Index<_>` is not satisfied
11         //~| the trait bound `Vec<usize>: ~const IndexMut<usize>` is not satisfied
12     }
13 }
14
15 fn main() {}