rust/tests/ui/issues/issue-61623.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

11 lines
208 B
Rust
Raw Normal View History

2019-06-18 20:39:08 -05:00
fn f1<'a>(_: &'a mut ()) {}
fn f2<P>(_: P, _: ()) {}
fn f3<'a>(x: &'a ((), &'a mut ())) {
f2(|| x.0, f1(x.1))
//~^ ERROR cannot borrow `*x.1` as mutable, as it is behind a `&` reference
}
fn main() {}