]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-61623.rs
Enable full revision in const generics ui tests
[rust.git] / src / test / ui / issues / issue-61623.rs
1 fn f1<'a>(_: &'a mut ()) {}
2
3 fn f2<P>(_: P, _: ()) {}
4
5 fn f3<'a>(x: &'a ((), &'a mut ())) {
6     f2(|| x.0, f1(x.1))
7 //~^ ERROR cannot borrow `*x.1` as mutable, as it is behind a `&` reference
8 //~| ERROR cannot borrow `*x.1` as mutable because it is also borrowed as immutable
9 }
10
11 fn main() {}