]> git.lizzy.rs Git - rust.git/blob - tests/ui/nll/user-annotations/downcast-infer.rs
Rollup merge of #106144 - tgross35:patch-1, r=Mark-Simulacrum
[rust.git] / tests / ui / nll / user-annotations / downcast-infer.rs
1 // check-pass
2
3 // Check that we don't try to downcast `_` when type-checking the annotation.
4 fn main() {
5     let x = Some(Some(Some(1)));
6
7     match x {
8         Some::<Option<_>>(Some(Some(v))) => (),
9         _ => (),
10     }
11 }