blob: a618aba9413f025d3585eecb6c0e563ab7dc1966 [file] [log] [blame]
struct R<'a> {
r: &'a R<'a>,
}
fn foo(res: Result<u32, &R>) -> u32 {
let Ok(x) = res;
//~^ ERROR refutable pattern
x
//~^ WARN use of possibly uninitialized variable: `x`
//~| WARN this error has been downgraded to a warning for backwards compatibility
//~| WARN this represents potential undefined behavior in your code and this warning will
}
fn main() {
foo(Ok(23));
}