Sign in
fuchsia
/
third_party
/
rust
/
0.4
/
.
/
src
/
test
/
compile-fail
/
pattern-tyvar-2.rs
blob: 36582c83a1eb334ce8d0a5afba998f3b5d8e7f1a [
file
] [
log
] [
blame
]
// -*- rust -*-
extern
mod
std
;
use
option
::
Some
;
// error-pattern: mismatched types
enum
bar
{
t1
((),
Option
<~[
int
]>),
t2
,
}
fn
foo
(
t
:
bar
)
->
int
{
match
t
{
t1
(
_
,
Some
(
x
))
=>
{
return
x
*
3
;
}
_
=>
{
fail
;
}
}
}
fn
main
()
{
}