1 // Check that when making a ref mut binding with type `&mut T`, the
2 // type `T` must match precisely the type `U` of the value being
3 // matched, and in particular cannot be some supertype of `U`. Issue
4 // #23116. This test focuses on a `match`.
9 fn bar<'a>(&'a mut self) -> &'a mut &'a i32 {
10 match self.0 { ref mut x => x } //~ ERROR mismatched types