diff options
Diffstat (limited to 'src/test/ui/binding/match-pattern-no-type-params.rs')
-rw-r--r-- | src/test/ui/binding/match-pattern-no-type-params.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/test/ui/binding/match-pattern-no-type-params.rs b/src/test/ui/binding/match-pattern-no-type-params.rs new file mode 100644 index 000000000..1fc7ddda0 --- /dev/null +++ b/src/test/ui/binding/match-pattern-no-type-params.rs @@ -0,0 +1,14 @@ +// run-pass +#![allow(dead_code)] +#![allow(non_camel_case_types)] + +enum maybe<T> { nothing, just(T), } + +fn foo(x: maybe<isize>) { + match x { + maybe::nothing => { println!("A"); } + maybe::just(_a) => { println!("B"); } + } +} + +pub fn main() { } |