rust/tests/ui/nll/user-annotations/downcast-infer.rs

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

12 lines
226 B
Rust
Raw Normal View History

2020-01-22 18:00:00 -06:00
// check-pass
// Check that we don't try to downcast `_` when type-checking the annotation.
fn main() {
let x = Some(Some(Some(1)));
match x {
Some::<Option<_>>(Some(Some(v))) => (),
_ => (),
}
}