rust/src/test/ui/feature-gates/feature-gate-exhaustive-patterns.rs
2020-03-23 02:04:43 -04:00

15 lines
295 B
Rust

// FIXME: missing sysroot spans (#53081)
// ignore-i586-unknown-linux-gnu
// ignore-i586-unknown-linux-musl
// ignore-i686-unknown-linux-musl
#![feature(never_type)]
fn foo() -> Result<u32, !> {
Ok(123)
}
fn main() {
let Ok(_x) = foo(); //~ ERROR refutable pattern in local binding
}