Files
rust/tests/ui/binding/method-call-nonsensical-pattern-binding-7092.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
366 B
Rust
Raw Normal View History

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