Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.
//@ run-rustfix
enum Enum {
Variant(i32),
}
struct Struct(i32);
fn foo(x: Enum) -> i32 {
let Enum::Variant(value) = x;
value
fn bar(x: Enum) -> i32 {
let x = value + 1;
x
fn baz(x: Struct) -> i32 {
let Struct(value) = x;
fn main() {
let _ = foo(Enum::Variant(42));
let _ = bar(Enum::Variant(42));
let _ = baz(Struct(42));