Change:
<ins> // Copyright 2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. //compile-flags: -Z borrowck=mir #![feature(slice_patterns)] fn nop(_s: &[& i32]) {} fn nop_subslice(_s: &[i32]) {} fn const_index_ok(s: &mut [i32]) { if let [ref first, ref second, _, ref fourth, ..] = *s { if let [_, _, ref mut third, ..] = *s { nop(&[first, second, third, fourth]); } } } fn const_index_err(s: &mut [i32]) { if let [ref first, ref second, ..] = *s { if let [_, ref mut  second2, ref mut third, ..] = *s { //~ERROR nop(&[first, second, second2, third]); } } } fn const_index_from_end_ok(s: &mut [i32]) { if let [.., ref fourth, ref third, _, ref first] = *s { if let [.., ref mut second, _] = *s { nop(&[first, second, third, fourth]); } } } fn const_index_from_end_err(s: &mut [i32]) { if let [.., ref fourth, ref third, _, ref first] = *s { if let [.., ref mut third2, _, _] = *s { //~ERROR nop(&[first, third, third2, fourth]); } } } fn const_index_mixed(s: &mut [i32]) { if let [.., _, ref from_end4, ref from_end3, _, ref from_end1] = *s { if let [ref mut from_begin0, ..] = *s { nop(&[from_begin0, from_end1, from_end3, from_end4]); } if let [_, ref mut from_begin1, ..] = *s { //~ERROR nop(&[from_begin1, from_end1, from_end3, from_end4]); } if let [_, _, ref mut from_begin2, ..] = *s { //~ERROR nop(&[from_begin2, from_end1, from_end3, from_end4]); } if let [_, _, _, ref mut from_begin3, ..] = *s { //~ERROR nop(&[from_begin3, from_end1, from_end3, from_end4]); } } if let [ref from_begin0, ref from_begin1, _, ref from_begin3, _, ..] = *s { if let [.., ref mut from_end1] = *s { nop(&[from_begin0, from_begin1, from_begin3, from_end1]); } if let [.., ref mut from_end2, _] = *s { //~ERROR nop(&[from_begin0, from_begin1, from_begin3, from_end2]); } if let [.., ref mut from_end3, _,  _] = *s { //~ERROR nop(&[from_begin0, from_begin1, from_begin3, from_end3]); } if let [.., ref mut from_end4, _, _, _] = *s { //~ERROR nop(&[from_begin0, from_begin1, from_begin3, from_end4]); } } } fn const_index_and_subslice_ok(s: &mut [i32]) { if let [ref first, ref second, ..] = *s { if let [_, _, ref mut tail..] = *s { nop(&[first, second]); nop_subslice(tail); } } } fn const_index_and_subslice_err(s: &mut [i32]) { if let [ref first, ref second, ..] = *s { if let [_, ref mut tail..] = *s { //~ERROR nop(&[first, second]); nop_subslice(tail); } } } fn const_index_and_subslice_from_end_ok(s: &mut [i32]) { if let [.., ref second, ref first] = *s { if let [ref mut tail.., _, _] = *s { nop(&[first, second]); nop_subslice(tail); } } } fn const_index_and_subslice_from_end_err(s: &mut [i32]) { if let [.., ref second, ref first] = *s { if let [ref mut tail.., _] = *s { //~ERROR nop(&[first, second]); nop_subslice(tail); } } } fn subslices(s: &mut [i32]) { if let [_, _, _, ref s1..] = *s { if let [ref mut s2.., _, _, _] = *s { //~ERROR nop_subslice(s1); nop_subslice(s2); } } } fn main() { let mut v = [1,2,3,4]; const_index_ok(&mut v); const_index_err(&mut v); const_index_from_end_ok(&mut v); const_index_from_end_err(&mut v); const_index_and_subslice_ok(&mut v); const_index_and_subslice_err(&mut v); const_index_and_subslice_from_end_ok(&mut v); const_index_and_subslice_from_end_err(&mut v); subslices(&mut v); } </ins>

Discussion:
I believe the following should work, since and are disjoint, and is just taking a slice into (this would mean that is inaccessible while the result of is kept around): Changing it to (and removing the ):
Generally, multiple in a vector pattern should be allowable:
cc me
An interesting subquestion is whether we also want this to be allowed: In other words, whether the borrow checker should know about and attempt to reason about the disjointness of borrows into a vec beyond the scope of an individual pattern match.
Depending on how we do the implementation, it's likely that both patterns would "just work".
Triage: Nothing has changed here, at least as it pertains to , would be pretty cool if it worked.
This limitation doesn't have anything to do with slice patterns. It is even well-documented as .
I don't think it is the same, e.g. for the first example in the issue, an binding in a slice pattern is actually binding by reference (it has type or , not ), and the second one is completely unrelated.
Updated code: See also:
should be closed after MIR borrowck will be by default