fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0423]: expected value, found enum `A` 2 --> $DIR/issue-73427.rs:33:5 3 | 4LL | A.foo(); 5 | ^ 6 | 7note: the enum is defined here 8 --> $DIR/issue-73427.rs:1:1 9 | 10LL | / enum A { 11LL | | StructWithFields { x: () }, 12LL | | TupleWithFields(()), 13LL | | Struct {}, 14LL | | Tuple(), 15LL | | Unit, 16LL | | } 17 | |_^ 18help: you might have meant to use one of the following enum variants 19 | 20LL | (A::Tuple()).foo(); 21 | ~~~~~~~~~~~~ 22LL | A::Unit.foo(); 23 | ~~~~~~~ 24help: alternatively, the following enum variant is available 25 | 26LL | (A::TupleWithFields(/* fields */)).foo(); 27 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 28 29error[E0423]: expected value, found enum `B` 30 --> $DIR/issue-73427.rs:35:5 31 | 32LL | B.foo(); 33 | ^ help: the following enum variant is available: `(B::TupleWithFields(/* fields */))` 34 | 35note: the enum is defined here 36 --> $DIR/issue-73427.rs:9:1 37 | 38LL | / enum B { 39LL | | StructWithFields { x: () }, 40LL | | TupleWithFields(()), 41LL | | } 42 | |_^ 43 44error[E0423]: expected value, found enum `C` 45 --> $DIR/issue-73427.rs:37:5 46 | 47LL | C.foo(); 48 | ^ 49 | 50note: the enum is defined here 51 --> $DIR/issue-73427.rs:14:1 52 | 53LL | / enum C { 54LL | | StructWithFields { x: () }, 55LL | | TupleWithFields(()), 56LL | | Unit, 57LL | | } 58 | |_^ 59help: you might have meant to use the following enum variant 60 | 61LL | C::Unit.foo(); 62 | ~~~~~~~ 63help: alternatively, the following enum variant is available 64 | 65LL | (C::TupleWithFields(/* fields */)).foo(); 66 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 67 68error[E0423]: expected value, found enum `D` 69 --> $DIR/issue-73427.rs:39:5 70 | 71LL | D.foo(); 72 | ^ 73 | 74note: the enum is defined here 75 --> $DIR/issue-73427.rs:20:1 76 | 77LL | / enum D { 78LL | | TupleWithFields(()), 79LL | | Unit, 80LL | | } 81 | |_^ 82help: you might have meant to use the following enum variant 83 | 84LL | D::Unit.foo(); 85 | ~~~~~~~ 86help: alternatively, the following enum variant is available 87 | 88LL | (D::TupleWithFields(/* fields */)).foo(); 89 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 90 91error[E0423]: expected value, found enum `E` 92 --> $DIR/issue-73427.rs:41:5 93 | 94LL | E.foo(); 95 | ^ 96 | 97note: the enum is defined here 98 --> $DIR/issue-73427.rs:25:1 99 | 100LL | / enum E { 101LL | | TupleWithFields(()), 102LL | | } 103 | |_^ 104help: the following enum variant is available 105 | 106LL | (E::TupleWithFields(/* fields */)).foo(); 107 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 108help: consider importing one of these items instead 109 | 110LL + use std::f32::consts::E; 111 | 112LL + use std::f64::consts::E; 113 | 114 115error[E0532]: expected tuple struct or tuple variant, found enum `A` 116 --> $DIR/issue-73427.rs:48:12 117 | 118LL | if let A(3) = x { } 119 | ^ 120 | 121 = help: you might have meant to match against the enum's non-tuple variant 122note: the enum is defined here 123 --> $DIR/issue-73427.rs:1:1 124 | 125LL | / enum A { 126LL | | StructWithFields { x: () }, 127LL | | TupleWithFields(()), 128LL | | Struct {}, 129LL | | Tuple(), 130LL | | Unit, 131LL | | } 132 | |_^ 133help: try to match against one of the enum's variants 134 | 135LL | if let A::Tuple(3) = x { } 136 | ~~~~~~~~ 137LL | if let A::TupleWithFields(3) = x { } 138 | ~~~~~~~~~~~~~~~~~~ 139 140error[E0423]: expected function, tuple struct or tuple variant, found enum `A` 141 --> $DIR/issue-73427.rs:46:13 142 | 143LL | let x = A(3); 144 | ^ 145 | 146 = help: you might have meant to construct the enum's non-tuple variant 147note: the enum is defined here 148 --> $DIR/issue-73427.rs:1:1 149 | 150LL | / enum A { 151LL | | StructWithFields { x: () }, 152LL | | TupleWithFields(()), 153LL | | Struct {}, 154LL | | Tuple(), 155LL | | Unit, 156LL | | } 157 | |_^ 158help: try to construct one of the enum's variants 159 | 160LL | let x = A::Tuple(3); 161 | ~~~~~~~~ 162LL | let x = A::TupleWithFields(3); 163 | ~~~~~~~~~~~~~~~~~~ 164 165error: aborting due to 7 previous errors 166 167Some errors have detailed explanations: E0423, E0532. 168For more information about an error, try `rustc --explain E0423`.