1 // Copyright 2012 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
12 a(isize), b(isize), c(isize)
15 fn matcher1(x: opts) {
17 opts::a(ref i) | opts::b(i) => {}
18 //~^ ERROR variable `i` is bound with different mode in pattern #2 than in pattern #1
19 //~^^ ERROR mismatched types
24 fn matcher2(x: opts) {
26 opts::a(ref i) | opts::b(i) => {}
27 //~^ ERROR variable `i` is bound with different mode in pattern #2 than in pattern #1
28 //~^^ ERROR mismatched types
33 fn matcher4(x: opts) {
35 opts::a(ref mut i) | opts::b(ref i) => {}
36 //~^ ERROR variable `i` is bound with different mode in pattern #2 than in pattern #1
37 //~^^ ERROR mismatched types
43 fn matcher5(x: opts) {
45 opts::a(ref i) | opts::b(ref i) => {}