1 // Copyright 2013 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.
13 #![allow(unused_assignments)]
14 #![allow(non_camel_case_types)]
15 #![allow(non_shorthand_field_patterns)]
18 fn foo(&self, mut x: isize) -> isize {
29 let (a, mut b) = (23, 4);
36 assert_eq!(X.foo(2), 76);
43 let (x, mut y) = (32, Bar::Foo(21));
55 y = Bar::Baz(10.0, 3);
58 fn check_bar(y: &Bar) {
70 fn foo1((x, mut y): (f64, isize), mut z: isize) -> isize {
79 let A { x: mut x } = A { x: 10 };
84 (|A { x: mut t }: A| { t = t+1; t })(A { x: 34 });