1 // FIXME: should be run-rustfix, but rustfix doesn't currently support multipart suggestions, see
16 pub fn no_ref(x: MyEnum) {
20 A { i, j } | B { i, j } => { //~ ERROR unused variable
26 pub fn with_ref(x: MyEnum) {
30 A { i, ref j } | B { i, ref j } => { //~ ERROR unused variable
36 pub fn inner_no_ref(x: Option<MyEnum>) {
40 Some(A { i, j } | B { i, j }) => { //~ ERROR unused variable
48 pub fn inner_with_ref(x: Option<MyEnum>) {
52 Some(A { i, ref j } | B { i, ref j }) => { //~ ERROR unused variable
60 pub fn mixed_no_ref(x: MixedEnum) {
62 MixedEnum::A { i } | MixedEnum::B(i) => { //~ ERROR unused variable
68 pub fn mixed_with_ref(x: MixedEnum) {
70 MixedEnum::A { ref i } | MixedEnum::B(ref i) => { //~ ERROR unused variable
77 no_ref(MyEnum::A { i: 1, j: 2 });
78 with_ref(MyEnum::A { i: 1, j: 2 });
80 inner_no_ref(Some(MyEnum::A { i: 1, j: 2 }));
81 inner_with_ref(Some(MyEnum::A { i: 1, j: 2 }));
83 mixed_no_ref(MixedEnum::B(5));
84 mixed_with_ref(MixedEnum::B(5));