]> git.proxmox.com Git - rustc.git/blob - tests/ui/consts/issue-94675.rs
New upstream version 1.71.1+dfsg1
[rustc.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 //~^ ERROR: cannot call
11 //~| ERROR: cannot call
12 //~| ERROR: the trait bound
13 }
14 }
15
16 fn main() {}