blob: b9f7b650892f1ec6857bbd90517d5a7c52169175 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
An unknown field was specified into an enum's structure variant.
Erroneous code example:
```compile_fail,E0559
enum Field {
Fool { x: u32 },
}
let s = Field::Fool { joke: 0 };
// error: struct variant `Field::Fool` has no field named `joke`
```
Verify you didn't misspell the field's name or that the field exists. Example:
```
enum Field {
Fool { joke: u32 },
}
let s = Field::Fool { joke: 0 }; // ok!
```
|