]> git.lizzy.rs Git - rust.git/blob - tests/ui/consts/issue-94675.rs
Rollup merge of #106962 - compiler-errors:use-sugg-span, r=oli-obk
[rust.git] / tests / 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() {}