Move /src/test to /tests
This commit is contained in:
parent
ca855e6e42
commit
cf2dff2b1e
27592 changed files with 0 additions and 0 deletions
16
tests/ui/binding/nested-pattern.rs
Normal file
16
tests/ui/binding/nested-pattern.rs
Normal file
|
@ -0,0 +1,16 @@
|
|||
// run-pass
|
||||
#![allow(dead_code)]
|
||||
#![allow(non_camel_case_types)]
|
||||
|
||||
// a bug was causing this to complain about leaked memory on exit
|
||||
|
||||
enum t { foo(isize, usize), bar(isize, Option<isize>), }
|
||||
|
||||
fn nested(o: t) {
|
||||
match o {
|
||||
t::bar(_i, Some::<isize>(_)) => { println!("wrong pattern matched"); panic!(); }
|
||||
_ => { println!("succeeded"); }
|
||||
}
|
||||
}
|
||||
|
||||
pub fn main() { nested(t::bar(1, None::<isize>)); }
|
Loading…
Add table
Add a link
Reference in a new issue