]> git.proxmox.com Git - rustc.git/blame - src/test/run-pass/shadow.rs
New upstream version 1.33.0+dfsg1
[rustc.git] / src / test / run-pass / shadow.rs
CommitLineData
0bf4aa26
XL
1#![allow(non_camel_case_types)]
2#![allow(dead_code)]
c34b1796
AL
3fn foo(c: Vec<isize> ) {
4 let a: isize = 5;
5 let mut b: Vec<isize> = Vec::new();
223e47cc
LB
6
7
c34b1796
AL
8 match t::none::<isize> {
9 t::some::<isize>(_) => {
85aaf69f 10 for _i in &c {
1a4d82fc 11 println!("{}", a);
85aaf69f 12 let a = 17;
970d7e83
LB
13 b.push(a);
14 }
223e47cc 15 }
970d7e83 16 _ => { }
223e47cc
LB
17 }
18}
19
20enum t<T> { none, some(T), }
21
62682a34 22pub fn main() { let x = 10; let x = x + 20; assert_eq!(x, 30); foo(Vec::new()); }