diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/unique/unique-pat-3.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/ui/unique/unique-pat-3.rs b/src/test/ui/unique/unique-pat-3.rs new file mode 100644 index 000000000..2e81f898d --- /dev/null +++ b/src/test/ui/unique/unique-pat-3.rs @@ -0,0 +1,16 @@ +// run-pass +#![allow(dead_code)] +#![allow(non_camel_case_types)] + +enum bar { u(Box<isize>), w(isize), } + +pub fn main() { + let v = match bar::u(10.into()) { + bar::u(a) => { + println!("{}", a); + *a + } + _ => { 66 } + }; + assert_eq!(v, 10); +} |