summaryrefslogtreecommitdiffstats
path: root/tests/ui/consts/issue-94675.rs
blob: ce21ebdb9ac990f4843f06e3e4960ad2cad886fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#![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();
        //~^ the trait bound `Vec<usize>: ~const Index<_>` is not satisfied
        //~| the trait bound `Vec<usize>: ~const IndexMut<usize>` is not satisfied
    }
}

fn main() {}