]> git.lizzy.rs Git - rust.git/blob - tests/ui/rfc-2294-if-let-guard/typeck.rs
Rollup merge of #106644 - alexcrichton:update-wasi-toolchain, r=cuviper
[rust.git] / tests / ui / rfc-2294-if-let-guard / typeck.rs
1 #![feature(if_let_guard)]
2
3 fn ok() -> Result<Option<bool>, ()> {
4     Ok(Some(true))
5 }
6
7 fn main() {
8     match ok() {
9         Ok(x) if let Err(_) = x => {},
10         //~^ ERROR mismatched types
11         Ok(x) if let 0 = x => {},
12         //~^ ERROR mismatched types
13         _ => {}
14     }
15 }