2025-08-20 14:02:44 -04:00
|
|
|
// https://github.com/rust-lang/rust/issues/7092
|
2014-05-20 20:39:15 -07:00
|
|
|
enum Whatever {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn foo(x: Whatever) {
|
2025-04-05 19:19:56 +03:00
|
|
|
match x { //~ NOTE this expression has type `Whatever`
|
2014-10-21 03:40:15 +02:00
|
|
|
Some(field) =>
|
2015-01-12 01:01:44 -05:00
|
|
|
//~^ ERROR mismatched types
|
2025-04-05 19:19:56 +03:00
|
|
|
//~| NOTE expected `Whatever`, found `Option<_>`
|
|
|
|
|
//~| NOTE expected enum `Whatever`
|
|
|
|
|
//~| NOTE found enum `Option<_>`
|
2016-04-26 12:49:05 -04:00
|
|
|
field.access(),
|
2014-05-20 20:39:15 -07:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn main(){}
|